Class Step

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware

    public class Step
    extends Object
    implements org.springframework.beans.factory.BeanNameAware
    A class that contains all the data of an xlworkflow step
    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 Detail

      • Step

        public Step()
    • Method Detail

      • hasUI

        public boolean hasUI()
        Boolean that returns whether or not the actions in this step have a ui
        Returns:
        a boolean
      • getNextStep

        public Step getNextStep​(int outcome)
        Get the next step based on out the outcome
        Parameters:
        outcome - the outcome of the previous step
        Returns:
        the next stepp or NULL if there is no step configured for this outcome
      • getId

        public String getId()
      • getWorkflow

        public Workflow getWorkflow()
      • isFinished

        public boolean isFinished​(Context c,
                                  XmlWorkflowItem wfi)
                           throws SQLException
        Check if enough users have finished this step for it to continue
        Parameters:
        c - The relevant DSpace Context.
        wfi - the workflow item to check
        Returns:
        if enough users have finished this task
        Throws:
        SQLException - An exception that provides information on a database access error or other errors.
      • getRequiredUsers

        public int getRequiredUsers()
      • getRole

        public Role getRole()
      • setUserSelectionMethod

        public void setUserSelectionMethod​(UserSelectionActionConfig userSelectionMethod)
        Set the user selection configuration, this is required as every step requires one
        Parameters:
        userSelectionMethod - the user selection method configuration
      • setOutcomes

        public void setOutcomes​(Map<Integer,​Step> outcomes)
        Set the outcomes as a map, if no outcomes are configured this step will be last step in the workflow
        Parameters:
        outcomes - the map containing the outcomes.
      • getActions

        public List<WorkflowActionConfig> getActions()
        Get the processing actions for the step. Processing actions contain the logic required to execute the required operations in each step.
        Returns:
        the actions configured for this step
      • setActions

        public void setActions​(List<WorkflowActionConfig> actions)
        Set the processing actions for the step. Processing actions contain the logic required to execute the required operations in each step.
        Parameters:
        actions - the list of actions
      • setWorkflow

        protected void setWorkflow​(Workflow workflow)
        Set the workflow this step belongs to
        Parameters:
        workflow - the workflow configuration
      • setBeanName

        public void setBeanName​(String s)
        Store the name of the bean in the identifier
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
        Parameters:
        s - the bean name
      • setRequiredUsers

        public void setRequiredUsers​(int requiredUsers)
        Set the number of required users that need to execute this step before it is completed, the default is a single user
        Parameters:
        requiredUsers - the number of required users
      • setRole

        public void setRole​(Role role)
        Set the role of which users role should execute this step
        Parameters:
        role - the role to be configured for this step