Package org.chenile.workflow.api
Interface StateEntityService<T extends StateEntity>
- Type Parameters:
T
- the actual state entity
- All Known Implementing Classes:
StateEntityServiceImpl
public interface StateEntityService<T extends StateEntity>
All workflow entities (aka State entities) are managed using this interface.
Workflow entities contain state. State marches forward in accordance with a State Transition Diagram (STD)
The STD is read by a State Transition Machine.
All State entities are either created or processed in accordance with certain rules defined in the State Transition Diagram. Read more about state machines here.
Workflow entities contain state. State marches forward in accordance with a State Transition Diagram (STD)
The STD is read by a State Transition Machine.
All State entities are either created or processed in accordance with certain rules defined in the State Transition Diagram. Read more about state machines here.
-
Method Summary
-
Method Details
-
process
- Parameters:
entity
- the entity on which the event has happenedevent
- - the name of the event that happened on the entitypayload
- - Additional parameters for the event (event specific)- Returns:
- a StateEntityServiceResponse with the mutated entity
-
processById
- Parameters:
id
- - the ID of the event. This is useful if the entire entity is not passed by the front endevent
- - Name of the event that has happened on the entitypayload
- - Additional parameters for the event (event specific)- Returns:
- a StateEntityServiceResponse with the mutated entity
-
create
- Parameters:
entity
- the state entity that needs to be created.- Returns:
- the state entity along with the allowed actions on the state entity. The state entity that is returned, will have the initial state initialized (along with other obvious attributes such as ID, created by, tenancy (if applicable) etc.
-
retrieve
- Parameters:
id
- The ID of the state entity- Returns:
- the state entity along with allowed actions
-
getAllowedActionsAndMetadata
-
getAllowedActionsAndMetadata
-