Class HvlBpmnRuntimeServiceImpl
- All Implemented Interfaces:
HvlBpmnRuntimeService
HvlBpmnRuntimeService
.-
Constructor Summary
ConstructorsConstructorDescriptionHvlBpmnRuntimeServiceImpl
(org.flowable.engine.RuntimeService runtimeService, HvlBpmnProcessInstanceMapper processInstanceMapper, HvlBpmnProcessInstanceQueryGenerator processInstanceQueryGenerator) Instantiates a new HvlBpmnRuntimeServiceImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activateProcessInstanceById
(@NotBlank String processInstanceId) Activates the process instance with the given id.void
addEventListener
(@NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToAdd) Adds an event-listener which will be notified of ALL events by the dispatcher.void
addEventListener
(@NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToAdd, org.flowable.common.engine.api.delegate.event.FlowableEngineEventType... types) Adds an event-listener which will only be notified when an event occurs, which type is in the given types.void
addEventRegistryConsumer
(@NotNull org.flowable.eventregistry.api.EventRegistryEventConsumer eventConsumer) Add event registry consumer.void
addGroupIdentityLink
(@NotBlank String processInstanceId, @NotBlank String groupId, @NotBlank String identityLinkType) Involves a group with a process instance.org.flowable.engine.runtime.Execution
addMultiInstanceExecution
(@NotBlank String activityId, @NotBlank String parentExecutionId, Map<String, Object> executionVariables) Adds a new execution to a running multi-instance parent executionvoid
addParticipantGroup
(@NotBlank String processInstanceId, @NotBlank String groupId) Convenience shorthand forHvlBpmnRuntimeService.addGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
void
addParticipantUser
(@NotBlank String processInstanceId, @NotBlank String userId) Convenience shorthand forHvlBpmnRuntimeService.addUserIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
void
addUserIdentityLink
(@NotBlank String processInstanceId, @NotBlank String userId, @NotBlank String identityLinkType) Involves a user with a process instance.void
completeAdhocSubProcess
(@NotBlank String executionId) Completes the ad-hoc sub processorg.flowable.engine.runtime.ActivityInstanceQuery
Creates a newActivityInstanceQuery
instance, that can be used to query activities in the currently running process instances.org.flowable.engine.runtime.ChangeActivityStateBuilder
Create aChangeActivityStateBuilder
, that allows to set various options for changing the state of a process instance.org.flowable.eventsubscription.api.EventSubscriptionQuery
Creates a newEventSubscriptionQuery
instance, that can be used to query the event subscriptions.org.flowable.engine.runtime.ExecutionQuery
Creates a newExecutionQuery
instance, that can be used to query the executions and process instances.org.flowable.engine.runtime.NativeActivityInstanceQuery
creates a newNativeActivityInstanceQuery
to queryActivityInstance
s which are included in the cuby SQL directly.org.flowable.engine.runtime.NativeExecutionQuery
creates a newNativeExecutionQuery
to queryExecution
s by SQL directlyorg.flowable.engine.runtime.NativeProcessInstanceQuery
creates a newNativeProcessInstanceQuery
to queryProcessInstance
s by SQL directlyorg.flowable.engine.runtime.ProcessInstanceBuilder
Create aProcessInstanceBuilder
, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.org.flowable.engine.runtime.ProcessInstanceQuery
Creates a newProcessInstanceQuery
instance, that can be used to query process instances.void
deleteGroupIdentityLink
(@NotBlank String processInstanceId, @NotBlank String groupId, @NotBlank String identityLinkType) Removes the association between a group and a process instance for the given identityLinkType.void
deleteMultiInstanceExecution
(@NotBlank String executionId, boolean executionIsCompleted) Deletes a multi-instance executionvoid
deleteParticipantGroup
(@NotBlank String processInstanceId, @NotBlank String groupId) Convenience shorthand forHvlBpmnRuntimeService.deleteGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
void
deleteParticipantUser
(@NotBlank String processInstanceId, @NotBlank String userId) Convenience shorthand forHvlBpmnRuntimeService.deleteUserIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
void
deleteProcessInstance
(@NotBlank String processInstanceId, String deleteReason) Delete an existing runtime process instance.void
deleteUserIdentityLink
(@NotBlank String processInstanceId, @NotBlank String userId, @NotBlank String identityLinkType) Removes the association between a user and a process instance for the given identityLinkType.void
dispatchEvent
(@NotNull org.flowable.common.engine.api.delegate.event.FlowableEvent event) Dispatches the given event to any listeners that are registered.void
evaluateConditionalEvents
(@NotBlank String processInstanceId) Evaluate waiting conditional events (boundary, intermediate catch and event sub process start events) and trigger them if a condition evaluates to true.void
evaluateConditionalEvents
(@NotBlank String processInstanceId, Map<String, Object> processVariables) Evaluate waiting conditional events (boundary, intermediate catch and event sub process start events) and trigger them if a condition evaluates to true.org.flowable.engine.runtime.Execution
executeActivityInAdhocSubProcess
(@NotBlank String executionId, @NotBlank String activityId) Executes an activity in a ad-hoc sub processgetActiveActivityIds
(@NotBlank String processInstanceId) Finds the activity ids for all executions that are waiting in activities.List
<org.flowable.engine.runtime.Execution> getAdhocSubProcessExecutions
(@NotBlank String processInstanceId) Gets executions with an adhoc sub process as current flow elementorg.flowable.engine.runtime.DataObject
getDataObject
(@NotNull HvlBpmnExecutionDataObjectQueryModel executionDataObjectQueryModel) The DataObject.getDataObjects
(@NotNull HvlBpmnExecutionDataObjectQueryModel executionDataObjectQueryModel) All DataObjects visible from the given execution scope (including parent scopes).List
<org.flowable.bpmn.model.FlowNode> getEnabledActivitiesFromAdhocSubProcess
(@NotBlank String executionId) Gets enabled activities from ad-hoc sub processList
<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForProcessInstance
(@NotBlank String instanceId) Retrieves theIdentityLink
s associated with the given process instance.List
<org.flowable.engine.task.Event> getProcessInstanceEvents
(@NotBlank String processInstanceId) The all events related to the given Process Instance.getVariable
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) The variable value.<T> T
getVariable
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel, @NotNull Class<T> variableClass) The variable value.org.flowable.variable.api.persistence.entity.VariableInstance
getVariableInstance
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) The variable.List
<org.flowable.variable.api.persistence.entity.VariableInstance> getVariableInstancesByExecutionIds
(@NotEmpty Set<String> executionIds) All variables visible from the given execution scope (including parent scopes).boolean
hasVariable
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Check whether or not this execution has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes).void
messageEventReceived
(@NotNull HvlBpmnMessageEventModel messageEventModel) Notifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'.tr.com.havelsan.javarch.data.commons.pageable.HvlPage
<HvlBpmnProcessInstanceModel> queryPage
(@NotNull HvlBpmnProcessInstanceQueryModel processDefinitionQueryModel) Query as page.queryVariableInstances
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Query variable instances map.queryVariables
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Query variables map.void
removeEventListener
(@NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToRemove) Removes the given listener from this dispatcher.void
removeEventRegistryConsumer
(@NotNull org.flowable.eventregistry.api.EventRegistryEventConsumer eventConsumer) Remove event registry consumer.void
removeVariable
(@NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Removes a variable for an execution.void
setProcessInstanceName
(@NotBlank String processInstanceId, String name) Sets the name for the process instance with the given id.void
setVariable
(@NotBlank String executionId, @NotBlank String variableName, Object value, boolean isLocal) Update or create a variable for an execution.void
setVariables
(@NotBlank String executionId, @NotEmpty Map<String, ?> variables, boolean isLocal) Update or create given variables for an execution (including parent scopes).void
signalEventReceived
(@NotNull HvlBpmnSignalEventModel signalEventModel) Notifies the process engine that a signal event of name 'signalName' has been received.startProcessInstanceById
(@NotBlank String processDefinitionId, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Starts a new process instance in the latest version of the process definition with the given process definition query model.startProcessInstanceByKey
(@NotBlank String processDefinitionKey, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Start process instance by key process instance.startProcessInstanceByMessage
(@NotBlank String messageName, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Signals the process engine that a message is received and starts a newProcessInstance
.void
suspendProcessInstanceById
(@NotBlank String processInstanceId) Suspends the process instance with the given id.void
trigger
(@NotNull HvlBpmnTriggerModel flowableTriggerModel) Sends an external trigger to an activity instance that is waiting inside the given execution.void
updateBusinessKey
(@NotBlank String processInstanceId, String businessKey) Updates the business key for the provided process instancevoid
updateBusinessStatus
(@NotBlank String processInstanceId, String businessStatus) Updates the business status for the provided process instance
-
Constructor Details
-
HvlBpmnRuntimeServiceImpl
public HvlBpmnRuntimeServiceImpl(org.flowable.engine.RuntimeService runtimeService, HvlBpmnProcessInstanceMapper processInstanceMapper, HvlBpmnProcessInstanceQueryGenerator processInstanceQueryGenerator) Instantiates a new HvlBpmnRuntimeServiceImpl.- Parameters:
runtimeService
- the runtime serviceprocessInstanceMapper
- the process instance mapperprocessInstanceQueryGenerator
- the process instance query generator
-
-
Method Details
-
createProcessInstanceBuilder
public org.flowable.engine.runtime.ProcessInstanceBuilder createProcessInstanceBuilder()Create aProcessInstanceBuilder
, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.- Specified by:
createProcessInstanceBuilder
in interfaceHvlBpmnRuntimeService
- Returns:
- the process instance builder
-
startProcessInstanceById
public HvlBpmnProcessInstanceModel startProcessInstanceById(@NotBlank @NotBlank String processDefinitionId, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Starts a new process instance in the latest version of the process definition with the given process definition query model.- Specified by:
startProcessInstanceById
in interfaceHvlBpmnRuntimeService
- Parameters:
processDefinitionId
- the process definition idstartProcessInstanceModel
- the start process instance model- Returns:
- the process instance
-
startProcessInstanceByKey
public HvlBpmnProcessInstanceModel startProcessInstanceByKey(@NotBlank @NotBlank String processDefinitionKey, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Start process instance by key process instance.- Specified by:
startProcessInstanceByKey
in interfaceHvlBpmnRuntimeService
- Parameters:
processDefinitionKey
- the process definition keystartProcessInstanceModel
- the start process instance model- Returns:
- the process instance
-
startProcessInstanceByMessage
public HvlBpmnProcessInstanceModel startProcessInstanceByMessage(@NotBlank @NotBlank String messageName, HvlBpmnStartProcessInstanceModel startProcessInstanceModel) Signals the process engine that a message is received and starts a new
ProcessInstance
.Calling this method can have two different outcomes:
- If the message name is associated with a message start event, a new process instance is started.
- If no subscription to a message with the given name exists,
FlowableException
is thrown
- Specified by:
startProcessInstanceByMessage
in interfaceHvlBpmnRuntimeService
- Parameters:
messageName
- the 'name' of the message as specified as an attribute on the bpmn20<message name="messageName" />
element.startProcessInstanceModel
- the start process instance model- Returns:
- the
ProcessInstance
object representing the started process instance
-
deleteProcessInstance
public void deleteProcessInstance(@NotBlank @NotBlank String processInstanceId, String deleteReason) Delete an existing runtime process instance.- Specified by:
deleteProcessInstance
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of process instance to delete, cannot be null.deleteReason
- reason for deleting, can be null.
-
getActiveActivityIds
Finds the activity ids for all executions that are waiting in activities. This is a list because a single activity can be active multiple times.- Specified by:
getActiveActivityIds
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.- Returns:
- the active activity ids
-
trigger
Sends an external trigger to an activity instance that is waiting inside the given execution.- Specified by:
trigger
in interfaceHvlBpmnRuntimeService
- Parameters:
flowableTriggerModel
- the flowable trigger model
-
evaluateConditionalEvents
Evaluate waiting conditional events (boundary, intermediate catch and event sub process start events) and trigger them if a condition evaluates to true.- Specified by:
evaluateConditionalEvents
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of process instance, cannot be null.
-
evaluateConditionalEvents
public void evaluateConditionalEvents(@NotBlank @NotBlank String processInstanceId, Map<String, Object> processVariables) Evaluate waiting conditional events (boundary, intermediate catch and event sub process start events) and trigger them if a condition evaluates to true.- Specified by:
evaluateConditionalEvents
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of process instance, cannot be null.processVariables
- a map of process variables to be set before evaluation
-
updateBusinessKey
Updates the business key for the provided process instance- Specified by:
updateBusinessKey
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance to set the business key, cannot be nullbusinessKey
- new businessKey value
-
updateBusinessStatus
public void updateBusinessStatus(@NotBlank @NotBlank String processInstanceId, String businessStatus) Updates the business status for the provided process instance- Specified by:
updateBusinessStatus
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance to set the business status, cannot be nullbusinessStatus
- new business status value
-
addUserIdentityLink
public void addUserIdentityLink(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String userId, @NotBlank @NotBlank String identityLinkType) Involves a user with a process instance. The type of identity link is defined by the given identityLinkType.- Specified by:
addUserIdentityLink
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
addGroupIdentityLink
public void addGroupIdentityLink(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String groupId, @NotBlank @NotBlank String identityLinkType) Involves a group with a process instance. The type of identityLink is defined by the given identityLink.- Specified by:
addGroupIdentityLink
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@seeIdentityLinkType
).
-
addParticipantUser
public void addParticipantUser(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String userId) Convenience shorthand forHvlBpmnRuntimeService.addUserIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
- Specified by:
addParticipantUser
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user to use as candidate, cannot be null.
-
addParticipantGroup
public void addParticipantGroup(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String groupId) Convenience shorthand forHvlBpmnRuntimeService.addGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
- Specified by:
addParticipantGroup
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to use as candidate, cannot be null.
-
deleteParticipantUser
public void deleteParticipantUser(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String userId) Convenience shorthand forHvlBpmnRuntimeService.deleteUserIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
- Specified by:
deleteParticipantUser
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user to use as candidate, cannot be null.
-
deleteParticipantGroup
public void deleteParticipantGroup(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String groupId) Convenience shorthand forHvlBpmnRuntimeService.deleteGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.PARTICIPANT
- Specified by:
deleteParticipantGroup
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to use as candidate, cannot be null.
-
deleteUserIdentityLink
public void deleteUserIdentityLink(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String userId, @NotBlank @NotBlank String identityLinkType) Removes the association between a user and a process instance for the given identityLinkType.- Specified by:
deleteUserIdentityLink
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).
-
deleteGroupIdentityLink
public void deleteGroupIdentityLink(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String groupId, @NotBlank @NotBlank String identityLinkType) Removes the association between a group and a process instance for the given identityLinkType.- Specified by:
deleteGroupIdentityLink
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@seeIdentityLinkType
).
-
getIdentityLinksForProcessInstance
public List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForProcessInstance(@NotBlank @NotBlank String instanceId) Retrieves theIdentityLink
s associated with the given process instance. Such anIdentityLink
informs how a certain user is involved with a process instance.- Specified by:
getIdentityLinksForProcessInstance
in interfaceHvlBpmnRuntimeService
- Parameters:
instanceId
- the instance id- Returns:
- the identity links for process instance
-
queryVariables
public Map<String,Object> queryVariables(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Query variables map.- Specified by:
queryVariables
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model- Returns:
- the map
-
queryVariableInstances
public Map<String,org.flowable.variable.api.persistence.entity.VariableInstance> queryVariableInstances(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Query variable instances map.- Specified by:
queryVariableInstances
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model- Returns:
- the map
-
getVariableInstancesByExecutionIds
public List<org.flowable.variable.api.persistence.entity.VariableInstance> getVariableInstancesByExecutionIds(@NotEmpty @NotEmpty Set<String> executionIds) All variables visible from the given execution scope (including parent scopes).- Specified by:
getVariableInstancesByExecutionIds
in interfaceHvlBpmnRuntimeService
- Parameters:
executionIds
- ids of execution, cannot be null.- Returns:
- the variables.
-
getVariable
public Object getVariable(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) The variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariable
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
-
getVariableInstance
public org.flowable.variable.api.persistence.entity.VariableInstance getVariableInstance(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) The variable. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null.- Specified by:
getVariableInstance
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model- Returns:
- the variable or null if the variable is undefined.
-
getVariable
public <T> T getVariable(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel, @NotNull @NotNull Class<T> variableClass) The variable value. Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no variable value is found with the given name or when the value is set to null. Throws ClassCastException when cannot cast variable to given class- Specified by:
getVariable
in interfaceHvlBpmnRuntimeService
- Type Parameters:
T
- the type parameter- Parameters:
executionVariableQueryModel
- the execution variable query modelvariableClass
- name of variable, cannot be null.- Returns:
- the variable value or null if the variable is undefined or the value of the variable is null.
-
hasVariable
public boolean hasVariable(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Check whether or not this execution has variable set with the given name, Searching for the variable is done in all scopes that are visible to the given execution (including parent scopes).- Specified by:
hasVariable
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model- Returns:
- the boolean
-
setVariable
public void setVariable(@NotBlank @NotBlank String executionId, @NotBlank @NotBlank String variableName, Object value, boolean isLocal) Update or create a variable for an execution.The variable is set according to the algorithm as documented for
VariableScope.setVariable(String, Object)
.- Specified by:
setVariable
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of execution to set variable in, cannot be null.variableName
- name of variable to set, cannot be null.value
- value to set. When null is passed, the variable is not removed, only it's value will be set to null.isLocal
- the is local- See Also:
-
setVariables
public void setVariables(@NotBlank @NotBlank String executionId, @NotEmpty @NotEmpty Map<String, ?> variables, boolean isLocal) Update or create given variables for an execution (including parent scopes).Variables are set according to the algorithm as documented for
VariableScope.setVariables(Map)
, applied separately to each variable.- Specified by:
setVariables
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of the execution, cannot be null.variables
- map containing name (key) and value of variables, can be null.isLocal
- the is local- See Also:
-
removeVariable
public void removeVariable(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel) Removes a variable for an execution.- Specified by:
removeVariable
in interfaceHvlBpmnRuntimeService
- Parameters:
executionVariableQueryModel
- the execution variable query model
-
getDataObjects
public Map<String,org.flowable.engine.runtime.DataObject> getDataObjects(@NotNull @NotNull HvlBpmnExecutionDataObjectQueryModel executionDataObjectQueryModel) All DataObjects visible from the given execution scope (including parent scopes).- Specified by:
getDataObjects
in interfaceHvlBpmnRuntimeService
- Parameters:
executionDataObjectQueryModel
- data object query model- Returns:
- the DataObjects or an empty map if no such variables are found.
-
getDataObject
public org.flowable.engine.runtime.DataObject getDataObject(@NotNull @NotNull HvlBpmnExecutionDataObjectQueryModel executionDataObjectQueryModel) The DataObject. Searching for the DataObject is done in all scopes that are visible to the given execution (including parent scopes). Returns null when no DataObject value is found with the given name or when the value is set to null.- Specified by:
getDataObject
in interfaceHvlBpmnRuntimeService
- Parameters:
executionDataObjectQueryModel
- data object query model- Returns:
- the DataObject or null if the variable is undefined.
-
createExecutionQuery
public org.flowable.engine.runtime.ExecutionQuery createExecutionQuery()Creates a newExecutionQuery
instance, that can be used to query the executions and process instances.- Specified by:
createExecutionQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the execution query
-
createNativeExecutionQuery
public org.flowable.engine.runtime.NativeExecutionQuery createNativeExecutionQuery()creates a newNativeExecutionQuery
to queryExecution
s by SQL directly- Specified by:
createNativeExecutionQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the native execution query
-
createProcessInstanceQuery
public org.flowable.engine.runtime.ProcessInstanceQuery createProcessInstanceQuery()Creates a newProcessInstanceQuery
instance, that can be used to query process instances.- Specified by:
createProcessInstanceQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the process instance query
-
createNativeProcessInstanceQuery
public org.flowable.engine.runtime.NativeProcessInstanceQuery createNativeProcessInstanceQuery()creates a newNativeProcessInstanceQuery
to queryProcessInstance
s by SQL directly- Specified by:
createNativeProcessInstanceQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the native process instance query
-
createActivityInstanceQuery
public org.flowable.engine.runtime.ActivityInstanceQuery createActivityInstanceQuery()Creates a newActivityInstanceQuery
instance, that can be used to query activities in the currently running process instances.- Specified by:
createActivityInstanceQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the activity instance query
-
createNativeActivityInstanceQuery
public org.flowable.engine.runtime.NativeActivityInstanceQuery createNativeActivityInstanceQuery()creates a newNativeActivityInstanceQuery
to queryActivityInstance
s which are included in the cuby SQL directly.- Specified by:
createNativeActivityInstanceQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the native activity instance query
-
createEventSubscriptionQuery
public org.flowable.eventsubscription.api.EventSubscriptionQuery createEventSubscriptionQuery()Creates a newEventSubscriptionQuery
instance, that can be used to query the event subscriptions.- Specified by:
createEventSubscriptionQuery
in interfaceHvlBpmnRuntimeService
- Returns:
- the event subscription query
-
suspendProcessInstanceById
Suspends the process instance with the given id.If a process instance is in state suspended, flowable will not execute jobs (timers, messages) associated with this instance.
If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.
- Specified by:
suspendProcessInstanceById
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- the process instance id
-
activateProcessInstanceById
Activates the process instance with the given id.If you have a process instance hierarchy, suspending one process instance form the hierarchy will not suspend other process instances form that hierarchy.
- Specified by:
activateProcessInstanceById
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- the process instance id
-
signalEventReceived
Notifies the process engine that a signal event of name 'signalName' has been received. This method delivers the signal to all executions waiting on the signal.
NOTE: The waiting executions are notified synchronously.- Specified by:
signalEventReceived
in interfaceHvlBpmnRuntimeService
- Parameters:
signalEventModel
- signal event model
-
messageEventReceived
Notifies the process engine that a message event with name 'messageName' has been received and has been correlated to an execution with id 'executionId'.The waiting execution is notified synchronously.
- Specified by:
messageEventReceived
in interfaceHvlBpmnRuntimeService
- Parameters:
messageEventModel
- message event query model
-
addEventListener
public void addEventListener(@NotNull @NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToAdd) Adds an event-listener which will be notified of ALL events by the dispatcher.- Specified by:
addEventListener
in interfaceHvlBpmnRuntimeService
- Parameters:
listenerToAdd
- the listener to add
-
addEventListener
public void addEventListener(@NotNull @NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToAdd, org.flowable.common.engine.api.delegate.event.FlowableEngineEventType... types) Adds an event-listener which will only be notified when an event occurs, which type is in the given types.- Specified by:
addEventListener
in interfaceHvlBpmnRuntimeService
- Parameters:
listenerToAdd
- the listener to addtypes
- types of events the listener should be notified for
-
removeEventListener
public void removeEventListener(@NotNull @NotNull org.flowable.common.engine.api.delegate.event.FlowableEventListener listenerToRemove) Removes the given listener from this dispatcher. The listener will no longer be notified, regardless of the type(s) it was registered for in the first place.- Specified by:
removeEventListener
in interfaceHvlBpmnRuntimeService
- Parameters:
listenerToRemove
- listener to remove
-
dispatchEvent
public void dispatchEvent(@NotNull @NotNull org.flowable.common.engine.api.delegate.event.FlowableEvent event) Dispatches the given event to any listeners that are registered.- Specified by:
dispatchEvent
in interfaceHvlBpmnRuntimeService
- Parameters:
event
- event to dispatch.
-
addEventRegistryConsumer
public void addEventRegistryConsumer(@NotNull @NotNull org.flowable.eventregistry.api.EventRegistryEventConsumer eventConsumer) Add event registry consumer.- Specified by:
addEventRegistryConsumer
in interfaceHvlBpmnRuntimeService
- Parameters:
eventConsumer
- the event consumer
-
removeEventRegistryConsumer
public void removeEventRegistryConsumer(@NotNull @NotNull org.flowable.eventregistry.api.EventRegistryEventConsumer eventConsumer) Remove event registry consumer.- Specified by:
removeEventRegistryConsumer
in interfaceHvlBpmnRuntimeService
- Parameters:
eventConsumer
- the event consumer
-
setProcessInstanceName
Sets the name for the process instance with the given id.- Specified by:
setProcessInstanceName
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance to updatename
- new name for the process instance
-
getAdhocSubProcessExecutions
public List<org.flowable.engine.runtime.Execution> getAdhocSubProcessExecutions(@NotBlank @NotBlank String processInstanceId) Gets executions with an adhoc sub process as current flow element- Specified by:
getAdhocSubProcessExecutions
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- id of the process instance that is used to search for child executions- Returns:
- a list of executions
-
getEnabledActivitiesFromAdhocSubProcess
public List<org.flowable.bpmn.model.FlowNode> getEnabledActivitiesFromAdhocSubProcess(@NotBlank @NotBlank String executionId) Gets enabled activities from ad-hoc sub process- Specified by:
getEnabledActivitiesFromAdhocSubProcess
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of the execution that has an ad-hoc sub process as current flow element- Returns:
- a list of enabled activities
-
executeActivityInAdhocSubProcess
public org.flowable.engine.runtime.Execution executeActivityInAdhocSubProcess(@NotBlank @NotBlank String executionId, @NotBlank @NotBlank String activityId) Executes an activity in a ad-hoc sub process- Specified by:
executeActivityInAdhocSubProcess
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of the execution that has an ad-hoc sub process as current flow elementactivityId
- id of the activity id to enable- Returns:
- the newly created execution of the enabled activity
-
completeAdhocSubProcess
Completes the ad-hoc sub process- Specified by:
completeAdhocSubProcess
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of the execution that has an ad-hoc sub process as current flow element
-
createChangeActivityStateBuilder
public org.flowable.engine.runtime.ChangeActivityStateBuilder createChangeActivityStateBuilder()Create aChangeActivityStateBuilder
, that allows to set various options for changing the state of a process instance.- Specified by:
createChangeActivityStateBuilder
in interfaceHvlBpmnRuntimeService
- Returns:
- the change activity state builder
-
addMultiInstanceExecution
public org.flowable.engine.runtime.Execution addMultiInstanceExecution(@NotBlank @NotBlank String activityId, @NotBlank @NotBlank String parentExecutionId, Map<String, Object> executionVariables) Adds a new execution to a running multi-instance parent execution- Specified by:
addMultiInstanceExecution
in interfaceHvlBpmnRuntimeService
- Parameters:
activityId
- id of the multi-instance activity (id attribute in the BPMN XML)parentExecutionId
- can be the process instance id, in case there's one multi-instance execution for the provided activity id. In case of multiple multi-instance executions with the same activity id this can be a specific parent execution id.executionVariables
- variables to be set on as local variable on the newly created multi-instance execution- Returns:
- the newly created multi-instance execution
-
deleteMultiInstanceExecution
public void deleteMultiInstanceExecution(@NotBlank @NotBlank String executionId, boolean executionIsCompleted) Deletes a multi-instance execution- Specified by:
deleteMultiInstanceExecution
in interfaceHvlBpmnRuntimeService
- Parameters:
executionId
- id of the multi-instance execution to be deletedexecutionIsCompleted
- defines if the deleted execution should be marked as completed on the parent multi-instance execution
-
getProcessInstanceEvents
public List<org.flowable.engine.task.Event> getProcessInstanceEvents(@NotBlank @NotBlank String processInstanceId) The all events related to the given Process Instance.- Specified by:
getProcessInstanceEvents
in interfaceHvlBpmnRuntimeService
- Parameters:
processInstanceId
- the process instance id- Returns:
- the process instance events
-
queryPage
public tr.com.havelsan.javarch.data.commons.pageable.HvlPage<HvlBpmnProcessInstanceModel> queryPage(@NotNull @RequestBody @NotNull HvlBpmnProcessInstanceQueryModel processDefinitionQueryModel) Query as page.- Specified by:
queryPage
in interfaceHvlBpmnRuntimeService
- Parameters:
processDefinitionQueryModel
- the process instance query model- Returns:
- the hvl page
-