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 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, ReadPersistenceService persistenceRead, FlowNodeInstanceService flowNodeInstanceService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkMergingCondition(SProcessDefinition sDefinition, SGatewayInstance gatewayInstance)
void
createGatewayInstance(SGatewayInstance gatewayInstance)
Create gatewayInstance in DB according to the given gateway instance objectSGatewayInstance
getActiveGatewayInstanceOfTheProcess(long parentProcessInstanceId, java.lang.String name)
Get active gatewayInstance in the specific process instanceSGatewayInstance
getGatewayInstance(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)
void
hitTransition(SGatewayInstance gatewayInstance, long transitionIndex)
Add transitionDefinitionName to hitBy of specific gatewayInstancejava.util.List<SGatewayInstance>
setFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance)
void
setState(SGatewayInstance gatewayInstance, int stateId)
Change state of the specific gateway
-
-
-
Constructor Detail
-
GatewayInstanceServiceImpl
public GatewayInstanceServiceImpl(Recorder recorder, ReadPersistenceService persistenceRead, FlowNodeInstanceService flowNodeInstanceService)
-
-
Method Detail
-
createGatewayInstance
public void createGatewayInstance(SGatewayInstance gatewayInstance) throws SGatewayCreationException
Description copied from interface:GatewayInstanceService
Create gatewayInstance in DB according to the given gateway instance object- Specified by:
createGatewayInstance
in interfaceGatewayInstanceService
- Parameters:
gatewayInstance
- the gatewayInsttance object- Throws:
SGatewayCreationException
-
getGatewayInstance
public SGatewayInstance getGatewayInstance(long gatewayInstanceId) throws SGatewayNotFoundException, SGatewayReadException
Description copied from interface:GatewayInstanceService
Get gateway instance by its id- Specified by:
getGatewayInstance
in interfaceGatewayInstanceService
- Parameters:
gatewayInstanceId
- identifier of gateway instance- Returns:
- an SGatewayInstance object
- Throws:
SGatewayNotFoundException
SGatewayReadException
-
checkMergingCondition
public boolean checkMergingCondition(SProcessDefinition sDefinition, SGatewayInstance gatewayInstance) throws SBonitaException
- Specified by:
checkMergingCondition
in 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:GatewayInstanceService
Change state of the specific gateway- Specified by:
setState
in 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:GatewayInstanceService
Add transitionDefinitionName to hitBy of specific gatewayInstance- Specified by:
hitTransition
in 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:GatewayInstanceService
Get active gatewayInstance in the specific process instance- Specified by:
getActiveGatewayInstanceOfTheProcess
in interfaceGatewayInstanceService
- Parameters:
parentProcessInstanceId
- identifier of parent process instancename
- name of gateway instance- Returns:
- Throws:
SGatewayNotFoundException
SGatewayReadException
-
setFinishAndCreateNewGatewayForRemainingToken
public java.util.List<SGatewayInstance> setFinishAndCreateNewGatewayForRemainingToken(SProcessDefinition processDefinition, SGatewayInstance gatewayInstance) throws SBonitaException
- Specified by:
setFinishAndCreateNewGatewayForRemainingToken
in interfaceGatewayInstanceService
- Throws:
SBonitaException
-
getInclusiveGatewaysOfProcessInstanceThatShouldFire
public java.util.List<SGatewayInstance> getInclusiveGatewaysOfProcessInstanceThatShouldFire(SProcessDefinition processDefinition, long processInstanceId) throws SBonitaReadException
- Specified by:
getInclusiveGatewaysOfProcessInstanceThatShouldFire
in interfaceGatewayInstanceService
- Throws:
SBonitaReadException
-
-