Interface WorkflowManager

All Superinterfaces:
java.util.EventListener, Initializable, WikiEventListener
All Known Implementing Classes:
DefaultWorkflowManager

public interface WorkflowManager
extends WikiEventListener, Initializable

Monitor class that tracks running Workflows. The WorkflowManager also keeps track of the names of users or groups expected to approve particular Workflows.

  • Field Details

  • Method Details

    • getWorkflows

      java.util.Set<Workflow> getWorkflows()
      Returns a collection of the currently active workflows.
      Returns:
      the current workflows
    • getCompletedWorkflows

      java.util.List<Workflow> getCompletedWorkflows()
      Returns a collection of finished workflows; that is, those that have aborted or completed.
      Returns:
      the finished workflows
    • requiresApproval

      boolean requiresApproval​(java.lang.String messageKey)
      Returns true if a workflow matching a particular key contains an approval step.
      Parameters:
      messageKey - the name of the workflow; corresponds to the value returned by Workflow.getMessageKey().
      Returns:
      the result
    • getApprover

      java.security.Principal getApprover​(java.lang.String messageKey) throws WikiException
      Looks up and resolves the actor who approves a Decision for a particular Workflow, based on the Workflow's message key. If not found, or if Principal is Unresolved, throws WikiException. This particular implementation always returns the GroupPrincipal Admin
      Parameters:
      messageKey - the Decision's message key
      Returns:
      the actor who approves Decisions
      Throws:
      WikiException - if the message key was not found, or the Principal value corresponding to the key could not be resolved
    • getDecisionQueue

      Returns the DecisionQueue associated with this WorkflowManager
      Returns:
      the decision queue
    • getOwnerWorkflows

      java.util.List<Workflow> getOwnerWorkflows​(Session session)
      Returns the current workflows a wiki session owns. These are workflows whose Workflow.getOwner() method returns a Principal also possessed by the wiki session (see Session.getPrincipals()). If the wiki session is not authenticated, this method returns an empty Collection.
      Parameters:
      session - the wiki session
      Returns:
      the collection workflows the wiki session owns, which may be empty