Class Workflow

java.lang.Object
org.dspace.xmlworkflow.state.Workflow
All Implemented Interfaces:
Aware, BeanNameAware

public class Workflow extends Object implements BeanNameAware
Contains all the steps involved in a certain configured workflow.
Author:
Bram De Schouwer (bram.deschouwer at dot com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
  • Constructor Details

    • Workflow

      public Workflow()
  • Method Details

    • getFirstStep

      public Step getFirstStep()
    • getID

      public String getID()
      Get the name of this Workflow.
      Returns:
      the name.
      See Also:
    • getStep

      public Step getStep(String stepID) throws WorkflowConfigurationException
      Return a step with a given name.
      Parameters:
      stepID - name of the Step to find.
      Returns:
      the identified Step.
      Throws:
      WorkflowConfigurationException - if the named step is not found.
    • getNextStep

      public Step getNextStep(Context context, XmlWorkflowItem wfi, Step currentStep, int outcome) throws WorkflowConfigurationException, SQLException
      Find the Step that follows a given Step given an outcome.
      Parameters:
      context -
      wfi - the item whose steps are consulted.
      currentStep - the step being consulted.
      outcome - the outcome of currentStep.
      Returns:
      the next step.
      Throws:
      WorkflowConfigurationException - if the next step is invalid.
      SQLException - passed through.
    • setFirstStep

      @Autowired(required=true) public void setFirstStep(Step firstStep)
    • getSteps

      public List<Step> getSteps()
      Get the steps that need to be executed in this workflow before the item is archived
      Returns:
      the workflow steps
    • setSteps

      @Autowired(required=true) public void setSteps(List<Step> steps)
      Set the steps that need to be executed in this workflow before the item is archived
      Parameters:
      steps - the workflow steps
    • getRoles

      public Map<String,Role> getRoles()
      Get the roles that are used in this workflow
      Returns:
      a map containing the roles, the role name will the key, the role itself the value
    • setBeanName

      public void setBeanName(String s)
      Specified by:
      setBeanName in interface BeanNameAware