public class SimpleWorkflowService<T extends StateAware> extends Object implements WorkflowService<T>
<bean id="myStateAwareWorkflowService" parent="workflowService">
<constructor-arg index="0" ref="myStateAwarePersistenceService"/>
</bean>
| Constructor and Description |
|---|
SimpleWorkflowService(PersistenceService<T,Long> stateAwarePersistenceService) |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(T stateAware) |
Object |
execute(T stateAware,
String comments) |
WorkFlowMatrix |
getPreviousStateFromWfMatrix(String type,
String department,
BigDecimal amountRule,
String additionalRule,
String currentState,
String pendingActions) |
List<WorkflowAction> |
getValidActions(T stateAware)
Returns a set of valid actions that can be executed on the stateAware.
|
WorkFlowMatrix |
getWfMatrix(String type,
String department,
BigDecimal amountRule,
String additionalRule,
String currentState,
String pendingActions)
Returns WorkFlowMatrix for following combination of arguments
|
WorkFlowMatrix |
getWfMatrix(String type,
String department,
BigDecimal amountRule,
String additionalRule,
String currentState,
String pendingActions,
Date date)
Returns WorkFlowMatrix for following combination of arguments
|
T |
transition(String actionName,
T stateAware,
String comment)
Moves the stateAware from the current state to the next state.
|
T |
transition(WorkflowAction workflowAction,
T stateAware,
String comments)
Moves the stateAware from the current state to the next state.
|
public SimpleWorkflowService(PersistenceService<T,Long> stateAwarePersistenceService)
public T transition(WorkflowAction workflowAction, T stateAware, String comments)
WorkflowServicetransition in interface WorkflowService<T extends StateAware>workflowAction - the actionstateAware - the state aware stateAwarecomments - the commentpublic T transition(String actionName, T stateAware, String comment)
WorkflowServicetransition in interface WorkflowService<T extends StateAware>actionName - the action namestateAware - the state aware stateAwarecomment - the commentpublic List<WorkflowAction> getValidActions(T stateAware)
WorkflowServicegetValidActions in interface WorkflowService<T extends StateAware>stateAware - the state awarepublic WorkFlowMatrix getWfMatrix(String type, String department, BigDecimal amountRule, String additionalRule, String currentState, String pendingActions)
WorkflowServicegetWfMatrix in interface WorkflowService<T extends StateAware>type - the Object type of objectdepartment - Name of the departmentamountRule - the amountadditionalRule - the additional rule defined for the objecttypecurrentState - the current state of the objectpendingActions - the pendingActions for the objecttypepublic WorkFlowMatrix getWfMatrix(String type, String department, BigDecimal amountRule, String additionalRule, String currentState, String pendingActions, Date date)
WorkflowServicegetWfMatrix in interface WorkflowService<T extends StateAware>type - the Object type of objectdepartment - Name of the departmentamountRule - the amountadditionalRule - the additional rule defined for the objecttypecurrentState - the current state of the objectpendingActions - the pendingActions for the objecttypepublic WorkFlowMatrix getPreviousStateFromWfMatrix(String type, String department, BigDecimal amountRule, String additionalRule, String currentState, String pendingActions)
Copyright © 2015–2016 eGovernments Foundation. All rights reserved.