Class 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:
    Serialized Form
    • Constructor Detail

      • TimeoutJob

        public TimeoutJob​(WorkItem item,
                          String handler)
        Creates a new WorkflowJob.
        Parameters:
        item - the work item
        handler - the timeout job handler
    • Method Detail

      • getWorkItemId

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

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

        public Event createEvent​(boolean executeParallel,
                                 long seconds,
                                 boolean addOffset)
        Convenience method to create a job event for the workflow job.
        Parameters:
        executeParallel - whether to execute in parallel or not
        seconds - number of seconds
        addOffset - whether to add the current time to the specified number of seconds
        Returns:
        the created event
      • cancelEvent

        public Event cancelEvent​(boolean executeParallel)