Class GatewayInstanceServiceImpl
java.lang.Object
org.bonitasoft.engine.core.process.instance.impl.GatewayInstanceServiceImpl
- All Implemented Interfaces:
GatewayInstanceService
- Author:
- Feng Hui, Zhao Na, Matthieu Chaffotte
-
Field Summary
Fields inherited from interface org.bonitasoft.engine.core.process.instance.api.GatewayInstanceService
FINISH, GATEWAYINSTANCE, GATEWAYINSTANCE_HITBYS, GATEWAYINSTANCE_STATE -
Constructor Summary
ConstructorsConstructorDescriptionGatewayInstanceServiceImpl(Recorder recorder, ReadPersistenceService persistenceRead, FlowNodeInstanceService flowNodeInstanceService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckMergingCondition(SProcessDefinition sDefinition, SGatewayInstance gatewayInstance) voidcreateGatewayInstance(SGatewayInstance gatewayInstance) Create gatewayInstance in DB according to the given gateway instance objectgetActiveGatewayInstanceOfTheProcess(long parentProcessInstanceId, String name) Get active gatewayInstance in the specific process instancegetGatewayInstance(long gatewayInstanceId) Get gateway instance by its idgetInclusiveGatewaysOfProcessInstanceThatShouldFire(SProcessDefinition processDefinition, long processInstanceId) protected List<STransitionDefinition>getTransitionDefinitions(SGatewayInstance gatewayInstance, SProcessDefinition processDefinition) voidhitTransition(SGatewayInstance gatewayInstance, long transitionIndex) Add transitionDefinitionName to hitBy of specific gatewayInstancesetFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance) voidsetState(SGatewayInstance gatewayInstance, int stateId) Change state of the specific gateway
-
Constructor Details
-
GatewayInstanceServiceImpl
public GatewayInstanceServiceImpl(Recorder recorder, ReadPersistenceService persistenceRead, FlowNodeInstanceService flowNodeInstanceService)
-
-
Method Details
-
createGatewayInstance
public void createGatewayInstance(SGatewayInstance gatewayInstance) throws SGatewayCreationException Description copied from interface:GatewayInstanceServiceCreate gatewayInstance in DB according to the given gateway instance object- Specified by:
createGatewayInstancein interfaceGatewayInstanceService- Parameters:
gatewayInstance- the gatewayInsttance object- Throws:
SGatewayCreationException
-
getGatewayInstance
public SGatewayInstance getGatewayInstance(long gatewayInstanceId) throws SGatewayNotFoundException, SGatewayReadException Description copied from interface:GatewayInstanceServiceGet gateway instance by its id- Specified by:
getGatewayInstancein interfaceGatewayInstanceService- Parameters:
gatewayInstanceId- identifier of gateway instance- Returns:
- an SGatewayInstance object
- Throws:
SGatewayNotFoundExceptionSGatewayReadException
-
checkMergingCondition
public boolean checkMergingCondition(SProcessDefinition sDefinition, SGatewayInstance gatewayInstance) throws SBonitaException - Specified by:
checkMergingConditionin interfaceGatewayInstanceService- Returns:
- Throws:
SBonitaException
-
getTransitionDefinitions
protected List<STransitionDefinition> getTransitionDefinitions(SGatewayInstance gatewayInstance, SProcessDefinition processDefinition) -
setState
public void setState(SGatewayInstance gatewayInstance, int stateId) throws SGatewayModificationException Description copied from interface:GatewayInstanceServiceChange state of the specific gateway- Specified by:
setStatein interfaceGatewayInstanceService- Parameters:
gatewayInstance- the gateway instance will be updatedstateId- identifier of gateway state- Throws:
SGatewayModificationException
-
hitTransition
public void hitTransition(SGatewayInstance gatewayInstance, long transitionIndex) throws SGatewayModificationException Description copied from interface:GatewayInstanceServiceAdd transitionDefinitionName to hitBy of specific gatewayInstance- Specified by:
hitTransitionin interfaceGatewayInstanceService- Parameters:
gatewayInstance- the gateway instance will be updatedtransitionIndex- value will be added to hitBy of gatewayInstance- Throws:
SGatewayModificationException
-
getActiveGatewayInstanceOfTheProcess
public SGatewayInstance getActiveGatewayInstanceOfTheProcess(long parentProcessInstanceId, String name) throws SGatewayNotFoundException, SGatewayReadException Description copied from interface:GatewayInstanceServiceGet active gatewayInstance in the specific process instance- Specified by:
getActiveGatewayInstanceOfTheProcessin interfaceGatewayInstanceService- Parameters:
parentProcessInstanceId- identifier of parent process instancename- name of gateway instance- Returns:
- Throws:
SGatewayNotFoundExceptionSGatewayReadException
-
setFinishAndCreateNewGatewayForRemainingToken
public List<SGatewayInstance> setFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance) throws SBonitaException - Specified by:
setFinishAndCreateNewGatewayForRemainingTokenin interfaceGatewayInstanceService- Throws:
SBonitaException
-
getInclusiveGatewaysOfProcessInstanceThatShouldFire
public List<SGatewayInstance> getInclusiveGatewaysOfProcessInstanceThatShouldFire(SProcessDefinition processDefinition, long processInstanceId) throws SBonitaReadException - Specified by:
getInclusiveGatewaysOfProcessInstanceThatShouldFirein interfaceGatewayInstanceService- Throws:
SBonitaReadException
-