Package org.silverpeas.processmanager

## Class ProcessManagerSessionController

- java.lang.Object
- - org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
  - - org.silverpeas.processmanager.ProcessManagerSessionController

- All Implemented Interfaces:
    `Serializable`, `org.silverpeas.core.web.mvc.controller.ComponentSessionController`, `org.silverpeas.core.web.session.SessionCloseable`

      public class ProcessManagerSessionController
      extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  The ProcessManager Session controller
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

      `context`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProcessManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext context)` | Builds and init a new session controller for the process manager instance.
    `ProcessManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext context, ProcessManagerException fatal)` | Builds a ill session controller.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clearFilter()` |
    `String` | `createProcessInstance​(org.silverpeas.core.contribution.content.form.DataRecord data, boolean isDraft, boolean firstTimeSaved)` | Create a new process instance with the filled form.
    `org.silverpeas.core.web.export.ExportCSVBuilder` | `exportListAsCSV()` |
    `org.silverpeas.core.workflow.api.model.Action` | `getAction​(String actionName)` | Get the named action
    `org.silverpeas.core.contribution.content.form.Form` | `getActionForm​(String actionName)` | Returns the form associated to the named action.
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getActionRecord​(String actionName)` | Returns a new DataRecord filled with the folder data and which will be be completed by the action form.
    `List<CurrentState>` | `getActiveStates()` | Get the active states.
    `org.silverpeas.core.contribution.content.form.Form` | `getAssignFormOfActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance)` | Gets a form with the assignation of users to roles for all the active states (for the re-affectations of some roles in the active states)
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getAssignRecordOfActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance)` | Gets the assignation data of the users working on the active states (for the re-affectations of some roles in the active states).
    `NamedValue[]` | `getComponentInstanceRoleLabels()` | Returns the component instance roles as a list of (name, label) pair.
    `org.silverpeas.core.contribution.content.form.Form` | `getCreationForm()` | Returns the form which starts a new instance.
    `boolean` | `getCreationRights()` | Get the creation rights
    `List<org.silverpeas.core.workflow.api.user.Replacement>` | `getCurrentAndNextUserReplacementsAsIncumbent()` | Gets current and next replacements at date of day in which the current user can be replaced in the workflow.
    `ProcessFilter` | `getCurrentFilter()` | Returns the current ProcessFilter.
    `org.silverpeas.core.workflow.api.instance.ProcessInstance` | `getCurrentProcessInstance()` | Get the current process instance
    `List<org.silverpeas.core.contribution.content.form.DataRecord>` | `getCurrentProcessList()` | Returns the current process instance list.
    `org.silverpeas.core.workflow.api.user.Replacement` | `getCurrentReplacement()` |
    `String` | `getCurrentRole()` |
    `String` | `getCurrentRoleLabel()` |
    `String` | `getCurrentTokenId()` | Get the current tokenId.
    `String[]` | `getDeleteAction()` | Search for an hypothetical action of kind "delete", allowed for the current user with the given role
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getEmptyCreationRecord()` | Returns the an empty creation record which will be filled with the creation form.
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getEmptyQuestionRecord()` | Returns an empty question record which will be filled with the question form.
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getEmptyUserSettingsRecord()` | Returns the an empty date record which will be filled with the user settings form.
    `ProcessManagerException` | `getFatalException()` | Returns the last fatal exception
    `org.silverpeas.core.workflow.api.model.Item[]` | `getFolderItems()` |
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getFolderRecord()` | Returns the folder data of the current process instance.
    `List<LockVO>` | `getLockingUsers()` | Get locking users list
    `int` | `getNbEntriesAboutQuestions()` |
    `org.silverpeas.core.contribution.content.form.Form` | `getPresentationForm()` | Returns the form presenting the folder of the current process instance.
    `org.silverpeas.core.contribution.content.form.Form` | `getPresentationForm​(String name)` | Returns the named form (Read only).
    `org.silverpeas.core.workflow.api.error.WorkflowError[]` | `getProcessInstanceErrors​(String processId)` | Get all the errors occurred while processing the current process instance
    `String` | `getProcessInstanceIdFromExternalTodoId​(String externalTodoId)` | Get the process instance Id referred by the todo with the given todo id
    `org.silverpeas.core.contribution.content.form.RecordTemplate` | `getProcessListHeaders()` | Returns the current instance list rows template.
    `org.silverpeas.core.workflow.api.model.ProcessModel` | `getProcessModel​(String modelId)` | Returns the process model having the given id.
    `org.silverpeas.core.workflow.api.instance.Question` | `getQuestion​(String questionId)` | get the question with the given id
    `org.silverpeas.core.contribution.content.form.Form` | `getQuestionForm​(boolean readonly)` | Returns the form to ask a question
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getQuestionRecord​(String questionId)` | Returns the an empty question record which will be filled with the question form.
    `String` | `getRoleNameFromExternalTodoId​(String externalTodoId)` | Get the role name of task referred by the todo with the given todo id
    `org.silverpeas.core.workflow.api.instance.HistoryStep` | `getSavedStep()` | Get step saved by given user id.
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getSavedStepRecord​(org.silverpeas.core.workflow.api.instance.HistoryStep savedStep)` | Get step data record saved.
    `org.silverpeas.core.workflow.api.instance.HistoryStep[]` | `getSortedHistorySteps​(boolean ascending)` |
    `org.silverpeas.core.workflow.api.model.State` | `getState​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance, String stateName)` | Get the state with the given name in the specified process instance.
    `org.silverpeas.core.workflow.api.instance.HistoryStep` | `getStep​(String stepId)` | Returns the required step
    `String` | `getStepAction​(org.silverpeas.core.workflow.api.instance.HistoryStep step)` | Get the list of actions in History Step of current process instance
    `String` | `getStepActor​(org.silverpeas.core.workflow.api.instance.HistoryStep step)` | Get the list of actors in History Step of current process instance
    `org.silverpeas.core.contribution.content.form.Form` | `getStepForm​(org.silverpeas.core.workflow.api.instance.HistoryStep step)` | Returns the form used to display the i-th step.
    `List<StepVO>` | `getSteps​(String strEnlightedStep)` |
    `String` | `getStepSubstitute​(org.silverpeas.core.workflow.api.instance.HistoryStep step)` |
    `org.silverpeas.core.workflow.api.task.Task` | `getTask​(String stateName)` | Returns the named task.
    `org.silverpeas.core.workflow.api.task.Task[]` | `getTasks()` | Get all tasks assigned for current user on current process instance
    `org.silverpeas.core.workflow.api.user.User` | `getUser​(String userId)` | Returns the workflow user having the given id.
    `NamedValue[]` | `getUserRoleLabels()` | Returns the user roles as a list of (name, label) pair.
    `org.silverpeas.core.contribution.content.form.Form` | `getUserSettingsForm()` | Returns the form to fill user settings
    `org.silverpeas.core.contribution.content.form.DataRecord` | `getUserSettingsRecord()` | Returns the an empty data record which will be filled with the user settings form.
    `boolean` | `hasPendingQuestions()` | Tests if there is some question for current user in current processInstance
    `boolean` | `hasUserSettings()` | Returns true if : the model has any user settings.
    `boolean` | `isAttachmentTabEnabled()` |
    `boolean` | `isCSVExportEnabled()` |
    `boolean` | `isCurrentUserIsLockingUser()` | Is current user is part of the locking users for current process instance ?
    `boolean` | `isHistoryCanBeFiltered()` | Is the history can be filtered?
    `boolean` | `isHistoryTabVisible()` |
    `boolean` | `isPrintButtonEnabled()` | Print button on an action can be disabled.
    `boolean` | `isProcessIdVisible()` |
    `boolean` | `isResumingInstance()` |
    `boolean` | `isSaveButtonEnabled()` | Save button on an action can be disabled.
    `boolean` | `isUserAllowedOnActiveStates()` |
    `boolean` | `isUserSettingsOK()` | Returns true if : the user settings are correct
    `boolean` | `isVersionControlled()` |
    `boolean` | `isViewReturn()` |
    `void` | `lock​(String stateName)` | Lock the current instance for current user and given state
    `void` | `processAction​(String stateName, String actionName, org.silverpeas.core.contribution.content.form.DataRecord data, boolean isDraft, boolean isFirstTimeSaved)` | Create a new history step instance with the filled form.
    `void` | `processQuestion​(String stepId, String state, org.silverpeas.core.contribution.content.form.DataRecord data)` | Send the question as a QuestionEvent to the workflowEngine.
    `void` | `processResponse​(String questionId, org.silverpeas.core.contribution.content.form.DataRecord data)` | Send the answer as a ResponseEvent to the workflowEngine.
    `void` | `reassignInActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance, org.silverpeas.core.contribution.content.form.DataRecord data)` | Reassign the roles in the active states of the specified process instance to the users defined in the given assignation data.
    `void` | `removeProcess​(String processId)` | Remove process instance with given id
    `void` | `replaceInAllAssignedStates​(String userId, String substituteId)` | Replaces the specified user by the other one in all the states of the current process instances.
    `void` | `resetCreationRights()` | Compute the creation rights set creationRight to true if user can do the "Creation" action
    `void` | `resetCurrentProcessInstance()` | Set current Process instance to null
    `void` | `resetCurrentProcessInstance​(String instanceId)` | Updates the current process instance from the given id and returns the associated ProcessInstance object.
    `List<org.silverpeas.core.contribution.content.form.DataRecord>` | `resetCurrentProcessList​(boolean doAPause)` | Updates the current process instance list with current filter and returns this list.
    `void` | `resetCurrentProcessListHeaders()` | Reset the current instance list rows template.
    `void` | `resetCurrentRole​(String role)` | Returns the current role name.
    `<T extends org.silverpeas.core.workflow.api.user.Replacement<T>> void` | `resetCurrentRoleAsSubstitute​(String role, String incumbentId)` |
    `void` | `saveUserSettings​(org.silverpeas.core.contribution.content.form.DataRecord data)` | Save the user settings which have been filled with the user settings form.
    `void` | `setCurrentTokenId​(String newTokenId)` | Set the current tokenId.
    `void` | `setResumingInstance​(boolean isResumingInstance)` |
    `void` | `unlock​(String stateName)` | Un-Lock the current instance for current user and given state
    `void` | `unlock​(String userId, String stateName)` | Un-Lock the current instance for given user and given state

    - ### Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

      `addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessManagerSessionController

          public ProcessManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                                 org.silverpeas.core.web.mvc.controller.ComponentContext context)
                                          throws ProcessManagerException

      Builds and init a new session controller for the process manager instance.
      Parameters:
        `mainSessionCtrl` - the main session controller of the current user in Silverpeas.
        `context` - the context of the user navigation in the process manager instance.
      Throws:
        `ProcessManagerException` - if the initialization of the controller failed.

    - #### ProcessManagerSessionController

          public ProcessManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                                 org.silverpeas.core.web.mvc.controller.ComponentContext context,
                                                 ProcessManagerException fatal)

      Builds a ill session controller. Initialization is skipped and this session controller can only display the fatal exception. Used by the request router when a full session controller can't be built.
      Parameters:
        `mainSessionCtrl` - the main session controller of the user in Silverpeas.
        `context` - the user navigation context in the process manager instance.
        `fatal` - the exception to display in case of failure.

  - ### Method Detail

    - #### getCreationRights

          public boolean getCreationRights()

      Get the creation rights
      Returns:
        true if user can do the "Creation" action

    - #### resetCreationRights

          public final void resetCreationRights()

      Compute the creation rights set creationRight to true if user can do the "Creation" action

    - #### isHistoryCanBeFiltered

          public boolean isHistoryCanBeFiltered()

      Is the history can be filtered? In this case, the forms mapped to each state are visible only if the current user was a working or an interested user.
      Returns:
        true if the history can be filtered.

    - #### isHistoryTabVisible

          public boolean isHistoryTabVisible()

    - #### isCSVExportEnabled

          public boolean isCSVExportEnabled()

    - #### isPrintButtonEnabled

          public boolean isPrintButtonEnabled()

      Print button on an action can be disabled. So it's return the visibility status of that button.
      Returns:
        true is print button is visible

    - #### isSaveButtonEnabled

          public boolean isSaveButtonEnabled()

      Save button on an action can be disabled. So it's return the visibility status of that button.
      Returns:
        true is save button is visible

    - #### getFatalException

          public ProcessManagerException getFatalException()

      Returns the last fatal exception

    - #### resetCurrentProcessInstance

          public void resetCurrentProcessInstance()

      Set current Process instance to null

    - #### resetCurrentProcessInstance

          public void resetCurrentProcessInstance​(String instanceId)
                                           throws ProcessManagerException

      Updates the current process instance from the given id and returns the associated ProcessInstance object. If the instanceId parameter is null, updates nothing and returns the current ProcessInstance. Throws ProcessManagerException when the instanceId is unknown and when the current user is not allowed to access the instance. Doesn't change the current process instance when an error occurs.
      Throws:
        `ProcessManagerException`

    - #### getCurrentProcessInstance

          public org.silverpeas.core.workflow.api.instance.ProcessInstance getCurrentProcessInstance()

      Get the current process instance

    - #### getProcessListHeaders

          public org.silverpeas.core.contribution.content.form.RecordTemplate getProcessListHeaders()

      Returns the current instance list rows template.

    - #### resetCurrentProcessListHeaders

          public void resetCurrentProcessListHeaders()

      Reset the current instance list rows template.

    - #### getCurrentProcessList

          public List<org.silverpeas.core.contribution.content.form.DataRecord> getCurrentProcessList()
                                                                                               throws ProcessManagerException

      Returns the current process instance list.
      Throws:
        `ProcessManagerException`

    - #### resetCurrentProcessList

          public List<org.silverpeas.core.contribution.content.form.DataRecord> resetCurrentProcessList​(boolean doAPause)
                                                                                                 throws ProcessManagerException

      Updates the current process instance list with current filter and returns this list. Doesn't change the current process instance when an error occurs.
      Throws:
        `ProcessManagerException`

    - #### getRoleNameFromExternalTodoId

          public String getRoleNameFromExternalTodoId​(String externalTodoId)
                                               throws ProcessManagerException

      Get the role name of task referred by the todo with the given todo id
      Throws:
        `ProcessManagerException`

    - #### getProcessInstanceIdFromExternalTodoId

          public String getProcessInstanceIdFromExternalTodoId​(String externalTodoId)
                                                        throws ProcessManagerException

      Get the process instance Id referred by the todo with the given todo id
      Parameters:
        `externalTodoId` - external todo identifier
      Returns:
        the process instance Id referred by the todo with the given todo id.
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### isUserAllowedOnActiveStates

          public boolean isUserAllowedOnActiveStates()
                                              throws ProcessManagerException

      Throws:
        `ProcessManagerException`

    - #### getActiveStates

          public List<CurrentState> getActiveStates()
                                             throws ProcessManagerException

      Get the active states.
      Returns:
        the active states.
      Throws:
        `ProcessManagerException`

    - #### getUser

          public org.silverpeas.core.workflow.api.user.User getUser​(String userId)
                                                             throws ProcessManagerException

      Returns the workflow user having the given id.
      Parameters:
        `userId` - the user identifier
      Returns:
        the workflow user having the given id.
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### getProcessModel

          public final org.silverpeas.core.workflow.api.model.ProcessModel getProcessModel​(String modelId)
                                                                                    throws ProcessManagerException

      Returns the process model having the given id.
      Parameters:
        `modelId` - the model identifier
      Returns:
        the process model having the given id.
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### getCurrentRole

          public String getCurrentRole()

      Returns:
        the current role name.

    - #### getCurrentReplacement

          public org.silverpeas.core.workflow.api.user.Replacement getCurrentReplacement()

      Returns:
        the current replacement if any.

    - #### resetCurrentRoleAsSubstitute

          public <T extends org.silverpeas.core.workflow.api.user.Replacement<T>> void resetCurrentRoleAsSubstitute​(String role,
                                                                                                                    String incumbentId)
                                                                                                             throws ProcessManagerException

      Throws:
        `ProcessManagerException`

    - #### resetCurrentRole

          public void resetCurrentRole​(String role)
                                throws ProcessManagerException

      Returns the current role name.
      Parameters:
        `role` - a role
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### getUserRoleLabels

          public NamedValue[] getUserRoleLabels()

      Returns the user roles as a list of (name, label) pair.

    - #### getComponentInstanceRoleLabels

          public NamedValue[] getComponentInstanceRoleLabels()

      Returns the component instance roles as a list of (name, label) pair.

    - #### getPresentationForm

          public org.silverpeas.core.contribution.content.form.Form getPresentationForm()
                                                                                 throws ProcessManagerException

      Returns the form presenting the folder of the current process instance.
      Throws:
        `ProcessManagerException`

    - #### getFolderItems

          public org.silverpeas.core.workflow.api.model.Item[] getFolderItems()

    - #### getFolderRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getFolderRecord()
                                                                                   throws ProcessManagerException

      Returns the folder data of the current process instance.
      Throws:
        `ProcessManagerException`

    - #### getCreationForm

          public org.silverpeas.core.contribution.content.form.Form getCreationForm()
                                                                             throws ProcessManagerException

      Returns the form which starts a new instance.
      Throws:
        `ProcessManagerException`

    - #### getEmptyCreationRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getEmptyCreationRecord()
                                                                                          throws ProcessManagerException

      Returns the an empty creation record which will be filled with the creation form.
      Throws:
        `ProcessManagerException`

    - #### getQuestionForm

          public org.silverpeas.core.contribution.content.form.Form getQuestionForm​(boolean readonly)
                                                                             throws ProcessManagerException

      Returns the form to ask a question
      Throws:
        `ProcessManagerException`

    - #### getEmptyQuestionRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getEmptyQuestionRecord()

      Returns an empty question record which will be filled with the question form.

    - #### getQuestion

          public org.silverpeas.core.workflow.api.instance.Question getQuestion​(String questionId)

      get the question with the given id
      Parameters:
        `questionId` - question id
      Returns:
        the found question

    - #### getQuestionRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getQuestionRecord​(String questionId)

      Returns the an empty question record which will be filled with the question form.

    - #### getAssignFormOfActiveStates

          public org.silverpeas.core.contribution.content.form.Form getAssignFormOfActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance)
                                                                                         throws ProcessManagerException

      Gets a form with the assignation of users to roles for all the active states (for the re-affectations of some roles in the active states)
      Parameters:
        `processInstance` - the instance of the process for which the assignation form is asked.
      Returns:
        a form with for active states a field with the roles required by the state.
      Throws:
        `ProcessManagerException` - if the build of the form fails.

    - #### getAssignRecordOfActiveStates

          public org.silverpeas.core.contribution.content.form.DataRecord getAssignRecordOfActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance)

      Gets the assignation data of the users working on the active states (for the re-affectations of some roles in the active states).
      Parameters:
        `processInstance` - the instance of the process for which the assignation data is asked.
      Returns:
        a data record with all the assignation of the working users to the different roles of each active states. Each field of the record is a mapping between a role in an active state to a working user.

    - #### reassignInActiveStates

          public void reassignInActiveStates​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance,
                                             org.silverpeas.core.contribution.content.form.DataRecord data)
                                      throws ProcessManagerException

      Reassign the roles in the active states of the specified process instance to the users defined in the given assignation data.
      Parameters:
        `processInstance` - the instance of the process in which the reassignation will be operated
        `data` - the record data in which are defined the assignation of the working users to the different roles of each active states. Each field of the record should be a mapping between a role in an active state to a working user.
      Throws:
        `ProcessManagerException` - if the reassignation failed.

    - #### replaceInAllAssignedStates

          public void replaceInAllAssignedStates​(String userId,
                                                 String substituteId)
                                          throws ProcessManagerException

      Replaces the specified user by the other one in all the states of the current process instances. All the roles assigned to the user in all the state in each process instance are reassigned to the specified substitute. So, the constrain is the substitute must have the ability to play the same roles than the given user. Otherwise an exception is thrown.
      Parameters:
        `userId` - the unique identifier of the user to replace.
        `substituteId` - the unique identifier of the user that will substitute the above user.
      Throws:
        `ProcessManagerException` - if an error occurs while performing the substitution.

    - #### createProcessInstance

          public String createProcessInstance​(org.silverpeas.core.contribution.content.form.DataRecord data,
                                              boolean isDraft,
                                              boolean firstTimeSaved)
                                       throws ProcessManagerException

      Create a new process instance with the filled form.
      Parameters:
        `data` - the form data
        `isDraft` - true if form has just been saved as draft
        `firstTimeSaved` - true if form is saved as draft for the first time
      Throws:
        `ProcessManagerException`

    - #### getTasks

          public org.silverpeas.core.workflow.api.task.Task[] getTasks()
                                                                throws ProcessManagerException

      Get all tasks assigned for current user on current process instance
      Throws:
        `ProcessManagerException`

    - #### getDeleteAction

          public String[] getDeleteAction()

      Search for an hypothetical action of kind "delete", allowed for the current user with the given role
      Returns:
        an array of 3 Strings { action.name, state.name, action.label }, an empty array if no action found

    - #### getTask

          public org.silverpeas.core.workflow.api.task.Task getTask​(String stateName)
                                                             throws ProcessManagerException

      Returns the named task.
      Throws:
        `ProcessManagerException`

    - #### getPresentationForm

          public org.silverpeas.core.contribution.content.form.Form getPresentationForm​(String name)
                                                                                 throws ProcessManagerException

      Returns the named form (Read only). Throws an exception if the form is unknown.
      Throws:
        `ProcessManagerException`

    - #### getActionForm

          public org.silverpeas.core.contribution.content.form.Form getActionForm​(String actionName)
                                                                           throws ProcessManagerException

      Returns the form associated to the named action. Returns null if this action has no form. Throws an exception if the action is unknown.
      Throws:
        `ProcessManagerException`

    - #### getActionRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getActionRecord​(String actionName)
                                                                                   throws ProcessManagerException

      Returns a new DataRecord filled with the folder data and which will be be completed by the action form.
      Throws:
        `ProcessManagerException`

    - #### processAction

          public void processAction​(String stateName,
                                    String actionName,
                                    org.silverpeas.core.contribution.content.form.DataRecord data,
                                    boolean isDraft,
                                    boolean isFirstTimeSaved)
                             throws ProcessManagerException

      Create a new history step instance with the filled form.
      Throws:
        `ProcessManagerException`

    - #### getStep

          public org.silverpeas.core.workflow.api.instance.HistoryStep getStep​(String stepId)

      Returns the required step

    - #### processQuestion

          public void processQuestion​(String stepId,
                                      String state,
                                      org.silverpeas.core.contribution.content.form.DataRecord data)
                               throws ProcessManagerException

      Send the question as a QuestionEvent to the workflowEngine.
      Throws:
        `ProcessManagerException`

    - #### processResponse

          public void processResponse​(String questionId,
                                      org.silverpeas.core.contribution.content.form.DataRecord data)
                               throws ProcessManagerException

      Send the answer as a ResponseEvent to the workflowEngine.
      Throws:
        `ProcessManagerException`

    - #### getLockingUsers

          public List<LockVO> getLockingUsers()
                                       throws ProcessManagerException

      Get locking users list
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### lock

          public void lock​(String stateName)
                    throws ProcessManagerException

      Lock the current instance for current user and given state
      Parameters:
        `stateName` - state name
      Throws:
        `ProcessManagerException`

    - #### unlock

          public void unlock​(String userId,
                             String stateName)
                      throws ProcessManagerException

      Un-Lock the current instance for given user and given state
      Parameters:
        `userId` - user Id
        `stateName` - state name
      Throws:
        `ProcessManagerException`

    - #### unlock

          public void unlock​(String stateName)
                      throws ProcessManagerException

      Un-Lock the current instance for current user and given state
      Parameters:
        `stateName` - state name
      Throws:
        `ProcessManagerException`

    - #### getSteps

          public List<StepVO> getSteps​(String strEnlightedStep)
                                throws ProcessManagerException

      Throws:
        `ProcessManagerException`

    - #### getSortedHistorySteps

          public org.silverpeas.core.workflow.api.instance.HistoryStep[] getSortedHistorySteps​(boolean ascending)

    - #### getStepActor

          public String getStepActor​(org.silverpeas.core.workflow.api.instance.HistoryStep step)

      Get the list of actors in History Step of current process instance
      Returns:
        an array of string containing actors full name

    - #### getStepSubstitute

          public String getStepSubstitute​(org.silverpeas.core.workflow.api.instance.HistoryStep step)

    - #### getStepAction

          public String getStepAction​(org.silverpeas.core.workflow.api.instance.HistoryStep step)

      Get the list of actions in History Step of current process instance
      Returns:
        an array of string containing actions names

    - #### getStepForm

          public org.silverpeas.core.contribution.content.form.Form getStepForm​(org.silverpeas.core.workflow.api.instance.HistoryStep step)
                                                                         throws ProcessManagerException

      Returns the form used to display the i-th step. Returns null if the step is unknown.
      Throws:
        `ProcessManagerException` - if an error occurs

    - #### getSavedStep

          public org.silverpeas.core.workflow.api.instance.HistoryStep getSavedStep()
                                                                             throws ProcessManagerException

      Get step saved by given user id.
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### getSavedStepRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getSavedStepRecord​(org.silverpeas.core.workflow.api.instance.HistoryStep savedStep)
                                                                                      throws ProcessManagerException

      Get step data record saved.
      Throws:
        `ProcessManagerException` - if an error occurs.

    - #### getState

          public org.silverpeas.core.workflow.api.model.State getState​(org.silverpeas.core.workflow.api.instance.ProcessInstance processInstance,
                                                                       String stateName)
                                                                throws ProcessManagerException

      Get the state with the given name in the specified process instance.
      Parameters:
        `processInstance` - the process in which the state is defined
        `stateName` - state name
      Returns:
        the `State` instance corresponding to the asked name.
      Throws:
        `ProcessManagerException` - if the state cannot be got.

    - #### getAction

          public org.silverpeas.core.workflow.api.model.Action getAction​(String actionName)

      Get the named action
      Parameters:
        `actionName` - action name
      Returns:
        action

    - #### hasPendingQuestions

          public boolean hasPendingQuestions()

      Tests if there is some question for current user in current processInstance
      Returns:
        true if there is one or more question

    - #### getUserSettingsForm

          public org.silverpeas.core.contribution.content.form.Form getUserSettingsForm()
                                                                                 throws ProcessManagerException

      Returns the form to fill user settings
      Throws:
        `ProcessManagerException`

    - #### getEmptyUserSettingsRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getEmptyUserSettingsRecord()
                                                                                              throws ProcessManagerException

      Returns the an empty date record which will be filled with the user settings form.
      Throws:
        `ProcessManagerException`

    - #### getUserSettingsRecord

          public org.silverpeas.core.contribution.content.form.DataRecord getUserSettingsRecord()
                                                                                         throws ProcessManagerException

      Returns the an empty data record which will be filled with the user settings form.
      Throws:
        `ProcessManagerException`

    - #### saveUserSettings

          public void saveUserSettings​(org.silverpeas.core.contribution.content.form.DataRecord data)
                                throws ProcessManagerException

      Save the user settings which have been filled with the user settings form.
      Throws:
        `ProcessManagerException`

    - #### getCurrentFilter

          public ProcessFilter getCurrentFilter()
                                         throws ProcessManagerException

      Returns the current ProcessFilter.
      Throws:
        `ProcessManagerException`

    - #### clearFilter

          public void clearFilter()

    - #### removeProcess

          public void removeProcess​(String processId)
                             throws ProcessManagerException

      Remove process instance with given id
      Throws:
        `ProcessManagerException`

    - #### getProcessInstanceErrors

          public org.silverpeas.core.workflow.api.error.WorkflowError[] getProcessInstanceErrors​(String processId)

      Get all the errors occurred while processing the current process instance

    - #### isUserSettingsOK

          public boolean isUserSettingsOK()

      Returns true if : the user settings are correct

    - #### hasUserSettings

          public boolean hasUserSettings()

      Returns true if : the model has any user settings.

    - #### isVersionControlled

          public boolean isVersionControlled()

    - #### isAttachmentTabEnabled

          public boolean isAttachmentTabEnabled()

    - #### isProcessIdVisible

          public boolean isProcessIdVisible()

    - #### isViewReturn

          public boolean isViewReturn()

    - #### exportListAsCSV

          public org.silverpeas.core.web.export.ExportCSVBuilder exportListAsCSV()
                                                                          throws ProcessManagerException

      Throws:
        `ProcessManagerException`

    - #### isCurrentUserIsLockingUser

          public boolean isCurrentUserIsLockingUser()

      Is current user is part of the locking users for current process instance ?
      Returns:
        true is current user is part of the locking users for current process instance

    - #### setResumingInstance

          public void setResumingInstance​(boolean isResumingInstance)

    - #### isResumingInstance

          public boolean isResumingInstance()

    - #### getCurrentTokenId

          public String getCurrentTokenId()

      Get the current tokenId. Token Id prevents users to use several windows with same session.
      Returns:
        the current token id

    - #### setCurrentTokenId

          public void setCurrentTokenId​(String newTokenId)

      Set the current tokenId. Token Id prevents users to use several windows with same session.
      Parameters:
        `newTokenId` - the current token id

    - #### getNbEntriesAboutQuestions

          public int getNbEntriesAboutQuestions()

    - #### getCurrentAndNextUserReplacementsAsIncumbent

          public List<org.silverpeas.core.workflow.api.user.Replacement> getCurrentAndNextUserReplacementsAsIncumbent()

      Gets current and next replacements at date of day in which the current user can be replaced in the workflow.
      Returns:
        a list of possible replacements.

    - #### getCurrentRoleLabel

          public String getCurrentRoleLabel()