1 Reply Latest reply on Aug 4, 2012 6:00 PM by Sham HC

    How to Schedule a workflow Item?




      I need to schedule a workflow item to trigger at a particular date specified by the content author.


      My Existing Workflow :


      Approval1 ----> Approval2 ------>Approval3-----> MyCustomWorkFlowProcessStep----> Archive&ActivateItem(com.day.cq.wcm.workflow.process.CreateVersionProcess) ------> Activate Page/Asset(com.day.cq.wcm.workflow.process.ActivatePageProcess)



      In MyCustomWorkFlowProcessStep, I want to schedule the next 2 steps to execute on the particular date specified by the author. How can this be done?



      My Approach :


      I created a class which implements WorkflowProcess. In that class I am scheduling a job using sling schedulig jobs to fire the job at the particular day. Now I need to call the other 2 pending workflow Items in the workflow, How can I achieve this? Can I directly call the CreateVersionProcess and ActivatePageProcess since they are osgi services? Also, is this the right way to do this?


      Thanks a lot in advance