Class TimeoutJob

java.lang.Object
com.day.cq.workflow.job.TimeoutJob
All Implemented Interfaces:
Serializable

public class TimeoutJob extends Object implements Serializable
The TimeoutJob class provides a utility for creating event triggered job used for programmed/scripted workflow steps.
See Also:
  • Field Details

  • Constructor Details

    • TimeoutJob

      public TimeoutJob(WorkItem item, String handler)
      Creates a new WorkflowJob.
      Parameters:
      item - WorkItem of the job to be created
      handler - Handler of the job
  • Method Details

    • getWorkItemId

      public String getWorkItemId()
      Returns the WorkItem Id of the job
      Returns:
      String work item id
    • getHandler

      public String getHandler()
      Returns the timeout handler
      Returns:
      String the name of the handler
    • createEvent

      public Event createEvent(boolean executeParallel, long seconds, boolean addOffset)
      Convenience method to create a job event for the workflow job.
      Parameters:
      executeParallel - true or false. Execute job event in parallel
      seconds - timeout value in seconds
      addOffset - boolean. add current date/time as starting offset
      Returns:
      Event Event object created
    • cancelEvent

      public Event cancelEvent(boolean executeParallel)
      Convenience method to create a job cancel event for the workflow job.
      Parameters:
      executeParallel - true or false. Execute job event in parallel
      Returns:
      Event Event object created