Class WorkflowUtil

java.lang.Object
com.day.cq.workflow.util.WorkflowUtil

public abstract class WorkflowUtil extends Object
The WorkflowUtil class ...
  • Constructor Details

    • WorkflowUtil

      public WorkflowUtil()
  • Method Details

    • getWorkflowJobs

      public static Collection<Job> getWorkflowJobs(JobManager jobManager, WorkflowSession wfSession)
      Returns a collection of jobs for active workflow instances.
      Parameters:
      jobManager - used to query for sling jobs on workflow topics
      wfSession - used to retrieve the workflow models
      Returns:
      a collection of jobs for active workflow instances.
    • isStaleWorkflow

      public static boolean isStaleWorkflow(Workflow workflow, Collection<Job> wfJobs)
      Deprecated.
      No longer useful (stale workflows don't occur enymore). Always return false. Can't be removed as it is a documented API.
      Checks if the job specified by the provided workflow instance exists in the collection of sling jobs.
      Parameters:
      workflow - to check for associate sling jobs, if any
      wfJobs - list of existing sling jobs in the system
      Returns:
      false if the workflow specifies a job but the job was not found, true otherwise.
    • getAuthorizableFromLastStep

      public static String getAuthorizableFromLastStep(WorkflowSession session, Workflow workflow, String nodeId) throws WorkflowException
      This method returns the userId of the user who completed the previous step.
      Parameters:
      session - workflow session
      workflow - workflow instance
      nodeId - node id of workflow node in question
      Returns:
      user id as string or null if no user could be matched
      Throws:
      WorkflowException