Class TimeoutJob

  • All Implemented Interfaces:
    java.io.Serializable

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

      Fields 
      Modifier and Type Field Description
      static java.lang.String TIMEOUT_JOB
      The event property holding the TimeoutJob.
      static java.lang.String TIMEOUT_JOB_TOPIC
      The job topic for adding an entry to the audit log.
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeoutJob​(WorkItem item, java.lang.String handler)
      Creates a new WorkflowJob.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Event cancelEvent​(boolean executeParallel)
      Convenience method to create a job cancel event for the workflow job.
      Event createEvent​(boolean executeParallel, long seconds, boolean addOffset)
      Convenience method to create a job event for the workflow job.
      java.lang.String getHandler()
      Returns the timeout handler
      java.lang.String getWorkItemId()
      Returns the WorkItem Id of the job
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TIMEOUT_JOB_TOPIC

        public static final java.lang.String TIMEOUT_JOB_TOPIC
        The job topic for adding an entry to the audit log.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TimeoutJob

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

      • getWorkItemId

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

        public java.lang.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