Class AbstractStateTaskService
java.lang.Object
fr.paris.lutece.plugins.workflow.modules.state.service.AbstractStateTaskService
- Direct Known Subclasses:
ChangeStateTaskService,ChooseStateTaskService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoChangeState(fr.paris.lutece.plugins.workflowcore.service.task.ITask task, int nIdResource, String strResourceType, int nIdWorkflow, int newState) booleandoChangeStateIfInState(fr.paris.lutece.plugins.workflowcore.service.task.ITask task, int nIdResource, String strResourceType, int nIdWorkflow, int nIdCurrentState, int newState) Changes the state of a resource outside the processing of an action (daemons).fr.paris.lutece.util.ReferenceListgetListStates(int nIdAction) fr.paris.lutece.plugins.workflowcore.business.resource.ResourceWorkflowgetResourceByHistory(int nIdHistory, int nIdWorkflow)
-
Constructor Details
-
AbstractStateTaskService
public AbstractStateTaskService()
-
-
Method Details
-
getListStates
public fr.paris.lutece.util.ReferenceList getListStates(int nIdAction) -
getResourceByHistory
public fr.paris.lutece.plugins.workflowcore.business.resource.ResourceWorkflow getResourceByHistory(int nIdHistory, int nIdWorkflow) -
doChangeState
public void doChangeState(fr.paris.lutece.plugins.workflowcore.service.task.ITask task, int nIdResource, String strResourceType, int nIdWorkflow, int newState) -
doChangeStateIfInState
public boolean doChangeStateIfInState(fr.paris.lutece.plugins.workflowcore.service.task.ITask task, int nIdResource, String strResourceType, int nIdWorkflow, int nIdCurrentState, int newState) Changes the state of a resource outside the processing of an action (daemons). The resource is claimed in the database while it is still in its current state, so that it is changed once when the daemon runs on several instances. The automatic reflexive actions of the new state run after the claim is released, as they claim the resource themselves.- Parameters:
task- the tasknIdResource- the resource idstrResourceType- the resource typenIdWorkflow- the workflow idnIdCurrentState- the state the resource must still be innewState- the new state id- Returns:
- true if the state has been changed, false if the resource is claimed by another processing or is no longer in the current state
-