Class DelegateExecutionFake

  • All Implemented Interfaces:
    Serializable, org.camunda.bpm.engine.delegate.BaseDelegateExecution, org.camunda.bpm.engine.delegate.BpmnModelExecutionContext, org.camunda.bpm.engine.delegate.DelegateExecution, org.camunda.bpm.engine.delegate.ProcessEngineServicesAware, org.camunda.bpm.engine.delegate.VariableScope, org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher

    public class DelegateExecutionFake
    extends VariableScopeFake<T>
    implements org.camunda.bpm.engine.delegate.DelegateExecution
    Fake delegateExecution to test simple delegates/listeners without mocking.

    Not all operations are support, extend if needed.

    See Also:
    Serialized Form
    • Constructor Detail

      • DelegateExecutionFake

        public DelegateExecutionFake()
      • DelegateExecutionFake

        public DelegateExecutionFake​(String id)
    • Method Detail

      • getProcessInstanceId

        public String getProcessInstanceId()
        Specified by:
        getProcessInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getProcessBusinessKey

        public String getProcessBusinessKey()
        Specified by:
        getProcessBusinessKey in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • setProcessBusinessKey

        public void setProcessBusinessKey​(String processBusinessKey)
        Specified by:
        setProcessBusinessKey in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getProcessDefinitionId

        public String getProcessDefinitionId()
        Specified by:
        getProcessDefinitionId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getParentId

        public String getParentId()
        Specified by:
        getParentId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getCurrentActivityId

        public String getCurrentActivityId()
        Specified by:
        getCurrentActivityId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getCurrentActivityName

        public String getCurrentActivityName()
        Specified by:
        getCurrentActivityName in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getActivityInstanceId

        public String getActivityInstanceId()
        Specified by:
        getActivityInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getParentActivityInstanceId

        public String getParentActivityInstanceId()
        Specified by:
        getParentActivityInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getCurrentTransitionId

        public String getCurrentTransitionId()
        Specified by:
        getCurrentTransitionId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getProcessInstance

        public org.camunda.bpm.engine.delegate.DelegateExecution getProcessInstance()
        Specified by:
        getProcessInstance in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • withProcessInstance

        public DelegateExecutionFake withProcessInstance​(org.camunda.bpm.engine.delegate.DelegateExecution processInstance)
      • getSuperExecution

        public org.camunda.bpm.engine.delegate.DelegateExecution getSuperExecution()
        Specified by:
        getSuperExecution in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • withSuperExecution

        public DelegateExecutionFake withSuperExecution​(org.camunda.bpm.engine.delegate.DelegateExecution superExecution)
      • isCanceled

        public boolean isCanceled()
        Specified by:
        isCanceled in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getTenantId

        public String getTenantId()
        Specified by:
        getTenantId in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • setVariable

        public void setVariable​(String variableName,
                                Object value,
                                String activityId)
        Specified by:
        setVariable in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • createIncident

        public org.camunda.bpm.engine.runtime.Incident createIncident​(String incidentType,
                                                                      String configuration)
        Specified by:
        createIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • createIncident

        public org.camunda.bpm.engine.runtime.Incident createIncident​(String incidentType,
                                                                      String configuration,
                                                                      String message)
        Specified by:
        createIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • resolveIncident

        public void resolveIncident​(String incidentId)
        Specified by:
        resolveIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
      • getId

        public String getId()
        Specified by:
        getId in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
      • getEventName

        public String getEventName()
        Specified by:
        getEventName in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
      • getBusinessKey

        public String getBusinessKey()
        Specified by:
        getBusinessKey in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
      • getBpmnModelInstance

        public org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance()
        Specified by:
        getBpmnModelInstance in interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContext
      • getBpmnModelElementInstance

        public org.camunda.bpm.model.bpmn.instance.FlowElement getBpmnModelElementInstance()
        Specified by:
        getBpmnModelElementInstance in interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContext
      • getIncidents

        public Map<String,​org.camunda.bpm.engine.runtime.Incident> getIncidents()
      • getProcessEngineServices

        public org.camunda.bpm.engine.ProcessEngineServices getProcessEngineServices()
        Specified by:
        getProcessEngineServices in interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
      • withProcessEngineServices

        public T withProcessEngineServices​(org.camunda.bpm.engine.ProcessEngineServices processEngineServices)
      • getProcessEngine

        public org.camunda.bpm.engine.ProcessEngine getProcessEngine()
        Specified by:
        getProcessEngine in interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
      • withProcessEngine

        public T withProcessEngine​(org.camunda.bpm.engine.ProcessEngine processEngine)