Class ProcessManagerImpl
java.lang.Object
org.chenile.workflow.service.impl.StateEntityServiceImpl<Process>
org.chenile.orchestrator.process.service.impl.ProcessManagerImpl
- All Implemented Interfaces:
ProcessManager, StateEntityService<Process>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectMapperprivate ProcessOutboxRepository(package private) IProcessConfigurator(package private) ProcessRepositoryprivate TransactionTemplateFields inherited from class StateEntityServiceImpl
entityStore -
Constructor Summary
ConstructorsConstructorDescriptionProcessManagerImpl(STM<Process> stm, STMActionsInfoProvider stmActionsInfoProvider, EntityStore<Process> entityStore) -
Method Summary
Modifier and TypeMethodDescription(package private) voidconfigureTransactions(ProcessOutboxRepository repository, PlatformTransactionManager manager) An implementation of the create method that delegates to the entity store after filling up the mandatory attributes.create(ProcessDto processDto) private StateEntityServiceResponse<Process> createFromDto(ProcessDto processDto, String processDefName, String predecessorId, String tenantId, Map<String, Object> args) getSubProcesses(String processId, boolean recursive) private voidgetSubProcesses(List<Process> childProcesses, Process process, boolean recursive) private voidmakeProcessLeafIfConfigured(Process process) private <T> TAn implementation of the process method that allows to track all the changes to the entity via events.processById(String id, String event, Object payload) This form is expected from the web.private StringreceiptKey(String predecessor, String successor) private List<StateEntityServiceResponse<Process>> Methods inherited from class StateEntityServiceImpl
config, getAllowedActionsAndMetadata, getAllowedActionsAndMetadata, makeStateEntityResponse, processEntity, retrieveMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StateEntityService
config, getAllowedActionsAndMetadata, getAllowedActionsAndMetadata, retrieve
-
Field Details
-
processConfigurator
-
processRepository
-
objectMapper
-
outbox
-
transactionTemplate
-
-
Constructor Details
-
ProcessManagerImpl
public ProcessManagerImpl(STM<Process> stm, STMActionsInfoProvider stmActionsInfoProvider, EntityStore<Process> entityStore) - Parameters:
stm- the state machine that has read the corresponding State Transition DiagramstmActionsInfoProvider- the provider that gives out info about the state diagramentityStore- the store for persisting the entity
-
-
Method Details
-
configureTransactions
@Autowired void configureTransactions(ProcessOutboxRepository repository, PlatformTransactionManager manager) -
mutate
-
create
Description copied from class:StateEntityServiceImplAn implementation of the create method that delegates to the entity store after filling up the mandatory attributes. It makes sure that it empties out the state if state has been supplied because we want STM to supply the initial state.- Specified by:
createin interfaceStateEntityService<Process>- Overrides:
createin classStateEntityServiceImpl<Process>- Parameters:
process- the state entity that needs to be created.- Returns:
- the entity with the allowed actions
-
create
- Specified by:
createin interfaceProcessManager
-
processById
Description copied from class:StateEntityServiceImplThis form is expected from the web. The client merely must pass the ID and the event rather than the whole entity.- Specified by:
processByIdin interfaceStateEntityService<Process>- Overrides:
processByIdin classStateEntityServiceImpl<Process>- 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:
- the mutated entity along with allowed actions
-
process
Description copied from class:StateEntityServiceImplAn implementation of the process method that allows to track all the changes to the entity via events. This form is best suited for internal use and will not be exposed to the web. (We made the method public for some rare situations. This will be made protected over future releases)- Specified by:
processin interfaceStateEntityService<Process>- Overrides:
processin classStateEntityServiceImpl<Process>- Parameters:
process- 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:
- the mutated entity along with allowed actions
-
processCompleted
- Specified by:
processCompletedin interfaceProcessManager
-
startSuccessors
-
receiptKey
-
createFromDto
private StateEntityServiceResponse<Process> createFromDto(ProcessDto processDto, String processDefName, String predecessorId, String tenantId, Map<String, Object> args) -
makeProcessLeafIfConfigured
-
getSubProcesses
@Transactional(readOnly=true) public List<Process> getSubProcesses(String processId, boolean recursive) - Specified by:
getSubProcessesin interfaceProcessManager
-
getSubProcesses
-
CHENILE