Data Infrastructure Management Software Discussions

REST Workflow Scheduling


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

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



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

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

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

<userInputEntry key="Email" value=""/>

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

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

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

<userInputEntry key="BISO" value=""/>

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



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



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?



Re: REST Workflow Scheduling

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

Re: REST Workflow Scheduling

Thanks ranjeetr - this worked perfectly.

Re: REST Workflow Scheduling

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.

Re: REST Workflow Scheduling

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.

Re: REST Workflow Scheduling



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



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

Re: REST Workflow Scheduling

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.

Cloud Volumes ONTAP
Review Banner
All Community Forums