0 Replies Latest reply on Aug 6, 2012 4:33 AM by prajesh86

    How to schedule CreateVersionProcess() using sling scheduler?


      I Created a custom workflow process step by implementing


      Inside my custom workflow process step. I want to call sling scheduler and add a job


      This is my custom workflow step class :


      class MyStep implements WorkflowProcess



      public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException



      //blah //blah


      // Here I am scheduling the job using Sling scheduler.

      // it throws NullPointer Exception at this line.


      this.scheduler.fireJobAt("ProductNewsPublishJob",job, null,fireDate);








      This is my job class:


      class MyJobClass implements Runnable



      public void run()



      //blah blah //blah


      CreateVersionProcess cp = new CreateVersionProcess();


      cp.execute(workitem, session, metadata);


      ActivatePageProcess ap = new ActivatePageProcess();










      Basically What I am trying to do is, I want to schedule the Versioning and Activation of the page at a later date, depending on some conditions. Is it possible to call CreateVersionProcess and ActivatePageProcess like this?? Also, if there is any better advice/solution for this scenario, I would love to take it.