Active IQ Unified Manager Discussions

REST Workflow Scheduling

brycedeutsche
5,444 Views

Hello

I am initiating WFA workflows via REST and this is working great.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<workflowInput>

<userInputValues>

<userInputEntry key="Region" value="LAB"/>

<userInputEntry key="Rep" value="No"/>

<userInputEntry key="Backup" value="No"/>

<userInputEntry key="Email" value="user@email.com"/>

<userInputEntry key="NARid" value="60028-1"/>

<userInputEntry key="Description" value="Portal"/>

<userInputEntry key="DFSpath" value="Lab-test"/>

<userInputEntry key="BISO" value="user@email.com"/>

<userInputEntry key="CClist" value="0840867585:100"/>

</userInputValues>

</workflowInput>

However, I have noticed there is jobStatus field in the output

<jobStatus>COMPLETED</jobStatus>

<scheduleType>Immediate</scheduleType>

I presume I can submit the job as DELAYED and provide a PlannedExecutionTime - but can anyone supply me with the REST input/format to post this instruction to my workflow?

Thanks

1 ACCEPTED SOLUTION

ranjeetr
5,444 Views

For delayed execution of workflow following element can be added before </workflowInput>

<executionDateAndTime>07/11/14 08:14 PM</executionDateAndTime>

Here date format is "mm/dd/yy HH:MM AM/PM"

View solution in original post

6 REPLIES 6

ranjeetr
5,445 Views

For delayed execution of workflow following element can be added before </workflowInput>

<executionDateAndTime>07/11/14 08:14 PM</executionDateAndTime>

Here date format is "mm/dd/yy HH:MM AM/PM"

brycedeutsche
5,444 Views

Thanks ranjeetr - this worked perfectly.

Rutul
4,552 Views

When I am trying this format it gives error as 

 

 

 

Response Code: 400. Error executing workflow: Inv

alidInputException{Message: Got incorrect date and time format '"09/25/16 09:47
PM"'. Correct format 'M/d/yy h:mm a', for example: 9/3/16 9:47 PM, Cause: null}

 

So I think correct format should be M/d/yy h:mm a when there is only one digit in the date or time.

Rutul
4,531 Views

It is solved. The format was not a problem. I put the date format in quotes. So it was not taking. Now I am able to schedule the workflow.

sinhaa
4,496 Views

@Rutul

 

Use the below doc and you would never have to worry about manually creating User-Input XML body for any workflow with any number of user-input of any type. It will get you your XML within seconds.

 

Since its code generated, the user mistakes like you were doing will all get eliminated. 

 

How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Rutul
4,469 Views

Yes.. I had referred the REST API document link from Support Links in WFA. I got XML format from there for every REST API URL and successfully Scheduled the workflow using REST API of WFA.

Public