Package com.day.cq.workflow.util
Class WorkflowUtil
- java.lang.Object
-
- com.day.cq.workflow.util.WorkflowUtil
-
public abstract class WorkflowUtil extends java.lang.ObjectTheWorkflowUtilclass ...
-
-
Constructor Summary
Constructors Constructor Description WorkflowUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgetAuthorizableFromLastStep(WorkflowSession session, Workflow workflow, java.lang.String nodeId)This method returns the userId of the user who completed the previous step.static java.util.Collection<Job>getWorkflowJobs(JobManager jobManager, WorkflowSession wfSession)Returns a collection of jobs for active workflow instances.static booleanisStaleWorkflow(Workflow workflow, java.util.Collection<Job> wfJobs)Deprecated.No longer useful (stale workflows don't occur enymore).
-
-
-
Method Detail
-
getWorkflowJobs
public static java.util.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 topicswfSession- used to retrieve the workflow models- Returns:
- a collection of jobs for active workflow instances.
-
isStaleWorkflow
public static boolean isStaleWorkflow(Workflow workflow, java.util.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 anywfJobs- 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 java.lang.String getAuthorizableFromLastStep(WorkflowSession session, Workflow workflow, java.lang.String nodeId) throws WorkflowException
This method returns the userId of the user who completed the previous step.- Parameters:
session- workflow sessionworkflow- workflow instancenodeId- node id of workflow node in question- Returns:
- user id as string or
nullif no user could be matched - Throws:
WorkflowException
-
-