Schedule Workflows to run at a later date

Hi all,

I have a scenario where I need to schedule a workflow to be launched at a later date(5 days after a certain WF is launched). Can I do this from the master WF?

How can this be achieved?

Thanks in advance

You can put below step for schedule the workflow , customize according to your requirement -

<Step action="call:scheduleWorkflowEvent" condition="script:(!isNull(date5))" name="Test 5th Day Workflow" posX="1474" posY="10">
    <Arg name="requestName" value="Test 5th Day : $(identityDisplayName)"/>
    <Arg name="identityName" value="ref:identityName"/>
    <Arg name="workflow" value="Test Workflow"/>
    <Arg name="scheduleDate" value="ref:date5"/>
    <Arg name="trigger" value="ref:trigger"/>
    <Arg name="event" value="ref:event"/>
    <Arg name="launcher" value="ref:launcher"/>
    <Transition to="Finalize"/>
  </Step>

you should be able to find below sample in exampleworkflow.xml in identityiq folder

<

<Step name='Operate' action='call:scheduleWorkflowEvent'>
    <Arg name='workflow' value='Identity Event'/>
    <Arg name='delaySeconds' value='1'/>
    <Arg name='identityName' value='ref:identityName'/>
  </Step>

>

1 Like

Hi @rishavghoshacc

You can achieve this programmatically also by using beanshell code. Refer the article below:

Scheduling a workflow to run in the future from BeanShell/rule code - Compass