Package com.day.cq.workflow.util
Class WorkflowUtil
java.lang.Object
com.day.cq.workflow.util.WorkflowUtil
The
WorkflowUtil
class ...-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAuthorizableFromLastStep
(WorkflowSession session, Workflow workflow, String nodeId) This method returns the userId of the user who completed the previous step.static Collection
<Job> getWorkflowJobs
(JobManager jobManager, WorkflowSession wfSession) Returns a collection of jobs for active workflow instances.static boolean
isStaleWorkflow
(Workflow workflow, Collection<Job> wfJobs) Deprecated.No longer useful (stale workflows don't occur enymore).
-
Constructor Details
-
WorkflowUtil
public WorkflowUtil()
-
-
Method Details
-
getWorkflowJobs
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
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 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 sessionworkflow
- workflow instancenodeId
- node id of workflow node in question- Returns:
- user id as string or
null
if no user could be matched - Throws:
WorkflowException
-