Interface DelegateExecution

  • All Superinterfaces:
    org.flowable.common.engine.api.variable.VariableContainer, org.flowable.variable.api.delegate.VariableScope

    public interface DelegateExecution
    extends org.flowable.variable.api.delegate.VariableScope
    Execution used in JavaDelegates and ExecutionListeners.
    Author:
    Tom Baeyens, Joram Barrez
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getCurrentActivityId()
      Gets the id of the current activity.
      org.flowable.bpmn.model.FlowableListener getCurrentFlowableListener()
      Returns the FlowableListener instance matching an ExecutionListener if currently an execution listener is being execution.
      org.flowable.bpmn.model.FlowElement getCurrentFlowElement()
      The BPMN element where the execution currently is at.
      String getEventName()
      Will contain the event name in case this execution is passed in for an ExecutionListener.
      List<? extends DelegateExecution> getExecutions()
      returns the list of execution of which this execution the parent of.
      String getId()
      Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.
      DelegateExecution getParent()
      returns the parent of this execution, or null if there no parent.
      String getParentId()
      Gets the id of the parent of this execution.
      String getProcessDefinitionId()
      The process definition key for the process instance this execution is associated with.
      String getProcessInstanceBusinessKey()
      The business key for the process instance this execution is associated with.
      String getProcessInstanceId()
      Reference to the overall process instance
      String getPropagatedStageInstanceId()
      If this execution runs in the context of a case and stage, this method returns it's closest parent stage instance id (the stage plan item instance id to be precise).
      String getRootProcessInstanceId()
      The 'root' process instance.
      String getSuperExecutionId()
      Gets the id of the calling execution.
      String getTenantId()
      Returns the tenant id, if any is set before on the process definition or process instance.
      void inactivate()
      Inactivates this execution.
      boolean isActive()
      returns whether this execution is currently active.
      boolean isConcurrent()
      returns whether this execution is concurrent or not.
      boolean isEnded()
      returns whether this execution has ended or not.
      boolean isMultiInstanceRoot()
      Returns whether this execution is the root of a multi instance execution.
      boolean isProcessInstanceType()
      returns whether this execution is a process instance or not.
      boolean isScope()
      Returns whether this execution is a scope.
      void setActive​(boolean isActive)
      makes this execution active or inactive.
      void setConcurrent​(boolean isConcurrent)
      changes the concurrent indicator on this execution.
      void setCurrentFlowableListener​(org.flowable.bpmn.model.FlowableListener currentListener)
      Called when an ExecutionListener is being executed.
      void setCurrentFlowElement​(org.flowable.bpmn.model.FlowElement flowElement)
      Change the current BPMN element the execution is at.
      void setEventName​(String eventName)
      Sets the current event (typically when execution an ExecutionListener).
      void setMultiInstanceRoot​(boolean isMultiInstanceRoot)
      Changes whether this execution is a multi instance root or not.
      void setScope​(boolean isScope)
      Changes whether this execution is a scope or not.
      ReadOnlyDelegateExecution snapshotReadOnly()
      Create a snapshot read only delegate execution of this delegate execution.
      • Methods inherited from interface org.flowable.variable.api.delegate.VariableScope

        getTransientVariable, getTransientVariableLocal, getTransientVariables, getTransientVariablesLocal, getVariable, getVariable, getVariable, getVariableInstance, getVariableInstance, getVariableInstanceLocal, getVariableInstanceLocal, getVariableInstances, getVariableInstances, getVariableInstances, getVariableInstancesLocal, getVariableInstancesLocal, getVariableInstancesLocal, getVariableLocal, getVariableLocal, getVariableLocal, getVariableNames, getVariableNamesLocal, getVariables, getVariables, getVariables, getVariablesLocal, getVariablesLocal, getVariablesLocal, hasVariable, hasVariableLocal, hasVariables, hasVariablesLocal, removeTransientVariable, removeTransientVariableLocal, removeTransientVariables, removeTransientVariablesLocal, removeVariable, removeVariableLocal, removeVariables, removeVariables, removeVariablesLocal, removeVariablesLocal, setTransientVariable, setTransientVariableLocal, setTransientVariables, setTransientVariablesLocal, setVariable, setVariable, setVariableLocal, setVariableLocal, setVariables, setVariablesLocal
    • Method Detail

      • getId

        String getId()
        Unique id of this path of execution that can be used as a handle to provide external signals back into the engine after wait states.
      • getProcessInstanceId

        String getProcessInstanceId()
        Reference to the overall process instance
      • getRootProcessInstanceId

        String getRootProcessInstanceId()
        The 'root' process instance. When using call activity for example, the processInstance set will not always be the root. This method returns the topmost process instance.
      • getEventName

        String getEventName()
        Will contain the event name in case this execution is passed in for an ExecutionListener.
      • setEventName

        void setEventName​(String eventName)
        Sets the current event (typically when execution an ExecutionListener).
      • getProcessInstanceBusinessKey

        String getProcessInstanceBusinessKey()
        The business key for the process instance this execution is associated with.
      • getProcessDefinitionId

        String getProcessDefinitionId()
        The process definition key for the process instance this execution is associated with.
      • getPropagatedStageInstanceId

        String getPropagatedStageInstanceId()
        If this execution runs in the context of a case and stage, this method returns it's closest parent stage instance id (the stage plan item instance id to be precise).
        Returns:
        the stage instance id this execution belongs to or null, if this execution is not part of a case at all or is not a child element of a stage
      • getParentId

        String getParentId()
        Gets the id of the parent of this execution. If null, the execution represents a process-instance.
      • getSuperExecutionId

        String getSuperExecutionId()
        Gets the id of the calling execution. If not null, the execution is part of a subprocess.
      • getCurrentActivityId

        String getCurrentActivityId()
        Gets the id of the current activity.
      • getTenantId

        String getTenantId()
        Returns the tenant id, if any is set before on the process definition or process instance.
        Specified by:
        getTenantId in interface org.flowable.common.engine.api.variable.VariableContainer
      • getCurrentFlowElement

        org.flowable.bpmn.model.FlowElement getCurrentFlowElement()
        The BPMN element where the execution currently is at.
      • setCurrentFlowElement

        void setCurrentFlowElement​(org.flowable.bpmn.model.FlowElement flowElement)
        Change the current BPMN element the execution is at.
      • getCurrentFlowableListener

        org.flowable.bpmn.model.FlowableListener getCurrentFlowableListener()
        Returns the FlowableListener instance matching an ExecutionListener if currently an execution listener is being execution. Returns null otherwise.
      • setCurrentFlowableListener

        void setCurrentFlowableListener​(org.flowable.bpmn.model.FlowableListener currentListener)
        Called when an ExecutionListener is being executed.
      • getParent

        DelegateExecution getParent()
        returns the parent of this execution, or null if there no parent.
      • getExecutions

        List<? extends DelegateExecution> getExecutions()
        returns the list of execution of which this execution the parent of.
      • setActive

        void setActive​(boolean isActive)
        makes this execution active or inactive.
      • isActive

        boolean isActive()
        returns whether this execution is currently active.
      • isEnded

        boolean isEnded()
        returns whether this execution has ended or not.
      • setConcurrent

        void setConcurrent​(boolean isConcurrent)
        changes the concurrent indicator on this execution.
      • isConcurrent

        boolean isConcurrent()
        returns whether this execution is concurrent or not.
      • isProcessInstanceType

        boolean isProcessInstanceType()
        returns whether this execution is a process instance or not.
      • inactivate

        void inactivate()
        Inactivates this execution. This is useful for example in a join: the execution still exists, but it is not longer active.
      • isScope

        boolean isScope()
        Returns whether this execution is a scope.
      • setScope

        void setScope​(boolean isScope)
        Changes whether this execution is a scope or not.
      • isMultiInstanceRoot

        boolean isMultiInstanceRoot()
        Returns whether this execution is the root of a multi instance execution.
      • setMultiInstanceRoot

        void setMultiInstanceRoot​(boolean isMultiInstanceRoot)
        Changes whether this execution is a multi instance root or not.
        Parameters:
        isMultiInstanceRoot -