Class GatewayInstanceServiceImpl
- java.lang.Object
-
- org.bonitasoft.engine.core.process.instance.impl.GatewayInstanceServiceImpl
-
- All Implemented Interfaces:
GatewayInstanceService
public class GatewayInstanceServiceImpl extends java.lang.Object implements GatewayInstanceService
- Author:
- Feng Hui, Zhao Na, Matthieu Chaffotte
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<GatewayInstanceServiceImpl>TAG-
Fields inherited from interface org.bonitasoft.engine.core.process.instance.api.GatewayInstanceService
FINISH, GATEWAYINSTANCE, GATEWAYINSTANCE_HITBYS, GATEWAYINSTANCE_STATE
-
-
Constructor Summary
Constructors Constructor Description GatewayInstanceServiceImpl(Recorder recorder, EventService eventService, ReadPersistenceService persistenceRead, TechnicalLoggerService logger, FlowNodeInstanceService flowNodeInstanceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckMergingCondition(SProcessDefinition sDefinition, SGatewayInstance gatewayInstance)voidcreateGatewayInstance(SGatewayInstance gatewayInstance)Create gatewayInstance in DB according to the given gateway instance objectSGatewayInstancegetActiveGatewayInstanceOfTheProcess(long parentProcessInstanceId, java.lang.String name)Get active gatewayInstance in the specific process instanceSGatewayInstancegetGatewayInstance(long gatewayInstanceId)Get gateway instance by its idjava.util.List<SGatewayInstance>getInclusiveGatewaysOfProcessInstanceThatShouldFire(SProcessDefinition processDefinition, long processInstanceId)protected java.util.List<STransitionDefinition>getTransitionDefinitions(SGatewayInstance gatewayInstance, SProcessDefinition processDefinition)voidhitTransition(SGatewayInstance gatewayInstance, long transitionIndex)Add transitionDefinitionName to hitBy of specific gatewayInstancejava.util.List<SGatewayInstance>setFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance)voidsetState(SGatewayInstance gatewayInstance, int stateId)Change state of the specific gateway
-
-
-
Field Detail
-
TAG
public static final java.lang.Class<GatewayInstanceServiceImpl> TAG
-
-
Constructor Detail
-
GatewayInstanceServiceImpl
public GatewayInstanceServiceImpl(Recorder recorder, EventService eventService, ReadPersistenceService persistenceRead, TechnicalLoggerService logger, FlowNodeInstanceService flowNodeInstanceService)
-
-
Method Detail
-
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 java.util.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, java.lang.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 java.util.List<SGatewayInstance> setFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance) throws SBonitaException
- Specified by:
setFinishAndCreateNewGatewayForRemainingTokenin interfaceGatewayInstanceService- Throws:
SBonitaException
-
getInclusiveGatewaysOfProcessInstanceThatShouldFire
public java.util.List<SGatewayInstance> getInclusiveGatewaysOfProcessInstanceThatShouldFire(SProcessDefinition processDefinition, long processInstanceId) throws SBonitaReadException
- Specified by:
getInclusiveGatewaysOfProcessInstanceThatShouldFirein interfaceGatewayInstanceService- Throws:
SBonitaReadException
-
-