Class AbstractAmetysWorkflow

java.lang.Object
com.opensymphony.workflow.AbstractWorkflow
org.ametys.plugins.workflow.AbstractAmetysWorkflow
All Implemented Interfaces:
com.opensymphony.workflow.Workflow
Direct Known Subclasses:
WorkflowProvider.AmetysObjectWorkflow, WorkflowProvider.ExternalWorkflow, WorkflowProvider.GenericWorkflow

public abstract class AbstractAmetysWorkflow extends com.opensymphony.workflow.AbstractWorkflow
Base Ametys class for manipulating workflow instances.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Reentrant locks for synchronizing access to each instance
    protected static Logger
    Logger available to subclasses.
    protected WorkflowHelper
    workflow helper

    Fields inherited from class com.opensymphony.workflow.AbstractWorkflow

    configuration, context, log

    Fields inherited from interface com.opensymphony.workflow.Workflow

    BSF_COL, BSF_LANGUAGE, BSF_ROW, BSF_SCRIPT, BSF_SOURCE, BSH_SCRIPT, CLASS_NAME, EJB_LOCATION, JNDI_LOCATION
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractAmetysWorkflow(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doAction(long id, int actionId, Map inputs)
     
    int[]
    Deprecated.
    int[]
    getAvailableActions(long id, Map inputs)
     
    long
    initialize(String workflowName, int initialActionId, Map inputs)
    Creates a new workflow instance of a particular type of workflow.
    protected boolean
    transitionWorkflow(com.opensymphony.workflow.spi.WorkflowEntry entry, List currentSteps, com.opensymphony.workflow.spi.WorkflowStore store, com.opensymphony.workflow.loader.WorkflowDescriptor wf, com.opensymphony.workflow.loader.ActionDescriptor action, Map transientVars, Map inputs, com.opensymphony.module.propertyset.PropertySet ps)
     

    Methods inherited from class com.opensymphony.workflow.AbstractWorkflow

    canInitialize, canInitialize, canInitialize, canModifyEntryState, changeEntryState, checkImplicitFinish, completeEntry, createNewCurrentStep, executeFunction, executeTriggerFunction, getAvailableActionsForStep, getAvailableAutoActions, getAvailableAutoActionsForStep, getConfiguration, getCurrentStep, getCurrentSteps, getEntryState, getHistorySteps, getPersistence, getPersistenceProperties, getPropertySet, getResolver, getSecurityPermissions, getSecurityPermissions, getWorkflowDescriptor, getWorkflowName, getWorkflowNames, isActionAvailable, passesCondition, passesConditions, passesConditions, populateTransientMap, query, query, removeWorkflowDescriptor, saveWorkflowDescriptor, setConfiguration, setResolver, verifyInputs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AbstractAmetysWorkflow

      protected AbstractAmetysWorkflow(WorkflowHelper workflowHelper, com.opensymphony.workflow.WorkflowContext workflowContext)
      Constructor
      Parameters:
      workflowHelper - The workflow helper
      workflowContext - The workflow context
  • Method Details

    • initialize

      public long initialize(String workflowName, int initialActionId, Map inputs) throws com.opensymphony.workflow.WorkflowException
      Creates a new workflow instance of a particular type of workflow.
      Specified by:
      initialize in interface com.opensymphony.workflow.Workflow
      Overrides:
      initialize in class com.opensymphony.workflow.AbstractWorkflow
      Parameters:
      workflowName - the type of the workflow.
      initialActionId - the initial action to perform or Integer.MIN_VALUE in order to use the first initial action.
      inputs - the arguments to transmit to the workflow. Can not be null.
      Returns:
      the workflow instance id.
      Throws:
      com.opensymphony.workflow.WorkflowException
    • getAvailableActions

      public int[] getAvailableActions(long id, Map inputs)
      Specified by:
      getAvailableActions in interface com.opensymphony.workflow.Workflow
      Overrides:
      getAvailableActions in class com.opensymphony.workflow.AbstractWorkflow
    • getAvailableActions

      @Deprecated public int[] getAvailableActions(long id)
      Deprecated.
      Specified by:
      getAvailableActions in interface com.opensymphony.workflow.Workflow
      Overrides:
      getAvailableActions in class com.opensymphony.workflow.AbstractWorkflow
    • doAction

      public void doAction(long id, int actionId, Map inputs) throws com.opensymphony.workflow.WorkflowException
      Specified by:
      doAction in interface com.opensymphony.workflow.Workflow
      Overrides:
      doAction in class com.opensymphony.workflow.AbstractWorkflow
      Throws:
      com.opensymphony.workflow.WorkflowException
    • transitionWorkflow

      protected boolean transitionWorkflow(com.opensymphony.workflow.spi.WorkflowEntry entry, List currentSteps, com.opensymphony.workflow.spi.WorkflowStore store, com.opensymphony.workflow.loader.WorkflowDescriptor wf, com.opensymphony.workflow.loader.ActionDescriptor action, Map transientVars, Map inputs, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
      Overrides:
      transitionWorkflow in class com.opensymphony.workflow.AbstractWorkflow
      Throws:
      com.opensymphony.workflow.WorkflowException