Class HvlBpmnRuntimeServiceImpl

java.lang.Object
tr.com.havelsan.javarch.bpmn.service.provider.runtime.service.HvlBpmnRuntimeServiceImpl
All Implemented Interfaces:
HvlBpmnRuntimeService

@Service public class HvlBpmnRuntimeServiceImpl extends Object implements HvlBpmnRuntimeService
The class which implements HvlBpmnRuntimeService.
  • Constructor Details

    • HvlBpmnRuntimeServiceImpl

      public HvlBpmnRuntimeServiceImpl(org.flowable.engine.RuntimeService runtimeService, HvlBpmnProcessInstanceMapper processInstanceMapper, HvlBpmnProcessInstanceQueryGenerator processInstanceQueryGenerator)
      Instantiates a new HvlBpmnRuntimeServiceImpl.
      Parameters:
      runtimeService - the runtime service
      processInstanceMapper - the process instance mapper
      processInstanceQueryGenerator - the process instance query generator
  • Method Details

    • createProcessInstanceBuilder

      public org.flowable.engine.runtime.ProcessInstanceBuilder createProcessInstanceBuilder()
      Create a ProcessInstanceBuilder, that allows to set various options for starting a process instance, as an alternative to the various startProcessInstanceByXX methods.
      Specified by:
      createProcessInstanceBuilder in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      processDefinitionId - the process definition id
      startProcessInstanceModel - 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 interface HvlBpmnRuntimeService
      Parameters:
      processDefinitionKey - the process definition key
      startProcessInstanceModel - 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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of process instance to delete, cannot be null.
      deleteReason - reason for deleting, can be null.
    • getActiveActivityIds

      public List<String> getActiveActivityIds(@NotBlank @NotBlank String processInstanceId)
      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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of the process instance, cannot be null.
      Returns:
      the active activity ids
    • trigger

      public void trigger(@NotNull @NotNull HvlBpmnTriggerModel flowableTriggerModel)
      Sends an external trigger to an activity instance that is waiting inside the given execution.
      Specified by:
      trigger in interface HvlBpmnRuntimeService
      Parameters:
      flowableTriggerModel - the flowable trigger model
    • evaluateConditionalEvents

      public void evaluateConditionalEvents(@NotBlank @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.
      Specified by:
      evaluateConditionalEvents in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of process instance, cannot be null.
      processVariables - a map of process variables to be set before evaluation
    • updateBusinessKey

      public void updateBusinessKey(@NotBlank @NotBlank String processInstanceId, String businessKey)
      Updates the business key for the provided process instance
      Specified by:
      updateBusinessKey in interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of the process instance to set the business key, cannot be null
      businessKey - 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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of the process instance to set the business status, cannot be null
      businessStatus - 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 interface HvlBpmnRuntimeService
      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 (@see IdentityLinkType).
    • 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 interface HvlBpmnRuntimeService
      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 (@see IdentityLinkType).
    • addParticipantUser

      public void addParticipantUser(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String userId)
      Convenience shorthand for HvlBpmnRuntimeService.addUserIdentityLink(String, String, String); with type IdentityLinkType.PARTICIPANT
      Specified by:
      addParticipantUser in interface HvlBpmnRuntimeService
      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 for HvlBpmnRuntimeService.addGroupIdentityLink(String, String, String); with type IdentityLinkType.PARTICIPANT
      Specified by:
      addParticipantGroup in interface HvlBpmnRuntimeService
      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 for HvlBpmnRuntimeService.deleteUserIdentityLink(String, String, String); with type IdentityLinkType.PARTICIPANT
      Specified by:
      deleteParticipantUser in interface HvlBpmnRuntimeService
      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 for HvlBpmnRuntimeService.deleteGroupIdentityLink(String, String, String); with type IdentityLinkType.PARTICIPANT
      Specified by:
      deleteParticipantGroup in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 (@see IdentityLinkType).
    • 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 interface HvlBpmnRuntimeService
      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 (@see IdentityLinkType).
    • getIdentityLinksForProcessInstance

      public List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForProcessInstance(@NotBlank @NotBlank String instanceId)
      Retrieves the IdentityLinks associated with the given process instance. Such an IdentityLink informs how a certain user is involved with a process instance.
      Specified by:
      getIdentityLinksForProcessInstance in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Type Parameters:
      T - the type parameter
      Parameters:
      executionVariableQueryModel - the execution variable query model
      variableClass - 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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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:
      • VariableScope#setVariable(String, Object)VariableScope#setVariable(String, Object)
    • 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 interface HvlBpmnRuntimeService
      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:
      • VariableScope#setVariables(Map)VariableScope#setVariables(Map)
    • removeVariable

      public void removeVariable(@NotNull @NotNull HvlBpmnExecutionVariableQueryModel executionVariableQueryModel)
      Removes a variable for an execution.
      Specified by:
      removeVariable in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 new ExecutionQuery instance, that can be used to query the executions and process instances.
      Specified by:
      createExecutionQuery in interface HvlBpmnRuntimeService
      Returns:
      the execution query
    • createNativeExecutionQuery

      public org.flowable.engine.runtime.NativeExecutionQuery createNativeExecutionQuery()
      creates a new NativeExecutionQuery to query Executions by SQL directly
      Specified by:
      createNativeExecutionQuery in interface HvlBpmnRuntimeService
      Returns:
      the native execution query
    • createProcessInstanceQuery

      public org.flowable.engine.runtime.ProcessInstanceQuery createProcessInstanceQuery()
      Creates a new ProcessInstanceQuery instance, that can be used to query process instances.
      Specified by:
      createProcessInstanceQuery in interface HvlBpmnRuntimeService
      Returns:
      the process instance query
    • createNativeProcessInstanceQuery

      public org.flowable.engine.runtime.NativeProcessInstanceQuery createNativeProcessInstanceQuery()
      creates a new NativeProcessInstanceQuery to query ProcessInstances by SQL directly
      Specified by:
      createNativeProcessInstanceQuery in interface HvlBpmnRuntimeService
      Returns:
      the native process instance query
    • createActivityInstanceQuery

      public org.flowable.engine.runtime.ActivityInstanceQuery createActivityInstanceQuery()
      Creates a new ActivityInstanceQuery instance, that can be used to query activities in the currently running process instances.
      Specified by:
      createActivityInstanceQuery in interface HvlBpmnRuntimeService
      Returns:
      the activity instance query
    • createNativeActivityInstanceQuery

      public org.flowable.engine.runtime.NativeActivityInstanceQuery createNativeActivityInstanceQuery()
      creates a new NativeActivityInstanceQuery to query ActivityInstances which are included in the cuby SQL directly.
      Specified by:
      createNativeActivityInstanceQuery in interface HvlBpmnRuntimeService
      Returns:
      the native activity instance query
    • createEventSubscriptionQuery

      public org.flowable.eventsubscription.api.EventSubscriptionQuery createEventSubscriptionQuery()
      Creates a new EventSubscriptionQuery instance, that can be used to query the event subscriptions.
      Specified by:
      createEventSubscriptionQuery in interface HvlBpmnRuntimeService
      Returns:
      the event subscription query
    • suspendProcessInstanceById

      public void suspendProcessInstanceById(@NotBlank @NotBlank String processInstanceId)
      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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - the process instance id
    • activateProcessInstanceById

      public void activateProcessInstanceById(@NotBlank @NotBlank String processInstanceId)
      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 interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - the process instance id
    • signalEventReceived

      public void signalEventReceived(@NotNull @NotNull HvlBpmnSignalEventModel signalEventModel)

      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 interface HvlBpmnRuntimeService
      Parameters:
      signalEventModel - signal event model
    • messageEventReceived

      public void messageEventReceived(@NotNull @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'.

      The waiting execution is notified synchronously.

      Specified by:
      messageEventReceived in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      listenerToAdd - the listener to add
      types - 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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      eventConsumer - the event consumer
    • setProcessInstanceName

      public void setProcessInstanceName(@NotBlank @NotBlank String processInstanceId, String name)
      Sets the name for the process instance with the given id.
      Specified by:
      setProcessInstanceName in interface HvlBpmnRuntimeService
      Parameters:
      processInstanceId - id of the process instance to update
      name - 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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      executionId - id of the execution that has an ad-hoc sub process as current flow element
      activityId - id of the activity id to enable
      Returns:
      the newly created execution of the enabled activity
    • completeAdhocSubProcess

      public void completeAdhocSubProcess(@NotBlank @NotBlank String executionId)
      Completes the ad-hoc sub process
      Specified by:
      completeAdhocSubProcess in interface HvlBpmnRuntimeService
      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 a ChangeActivityStateBuilder, that allows to set various options for changing the state of a process instance.
      Specified by:
      createChangeActivityStateBuilder in interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      executionId - id of the multi-instance execution to be deleted
      executionIsCompleted - 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 interface HvlBpmnRuntimeService
      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 interface HvlBpmnRuntimeService
      Parameters:
      processDefinitionQueryModel - the process instance query model
      Returns:
      the hvl page