Package org.camunda.bpm.engine.cdi
Class CurrentProcessInstance
java.lang.Object
org.camunda.bpm.engine.cdi.CurrentProcessInstance
Allows to access executions and tasks of a managed process instance via
dependency injection. A process instance can be managed, using the
BusinessProcess-bean.
The producer methods provided by this class have been extracted from the
BusinessProcess-bean in order to allow for specializing it.- Author:
- Falko Menge
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.camunda.bpm.engine.runtime.ExecutionReturns the currently associated execution or 'null'org.camunda.bpm.engine.runtime.ProcessInstanceReturns theProcessInstancecurrently associated or 'null'Returns the id of the currently associated process instance or 'null'org.camunda.bpm.engine.task.TaskgetTask()Returns the currently associatedTaskor 'null'Returns the id of the task associated with the current conversation or 'null'.
-
Constructor Details
-
CurrentProcessInstance
public CurrentProcessInstance()
-
-
Method Details
-
getProcessInstance
@Produces @Named @Typed(org.camunda.bpm.engine.runtime.ProcessInstance.class) public org.camunda.bpm.engine.runtime.ProcessInstance getProcessInstance()Returns theProcessInstancecurrently associated or 'null'- Throws:
ProcessEngineCdiException- if noExecutionis associated. UseBusinessProcess.isAssociated()to check whether an association exists.
-
getProcessInstanceId
Returns the id of the currently associated process instance or 'null' -
getExecution
@Produces @Named public org.camunda.bpm.engine.runtime.Execution getExecution()Returns the currently associated execution or 'null' -
getExecutionId
- See Also:
-
getTask
@Produces @Named public org.camunda.bpm.engine.task.Task getTask()Returns the currently associatedTaskor 'null'- Throws:
ProcessEngineCdiException- if noTaskis associated. UseBusinessProcess.isTaskAssociated()to check whether an association exists.
-
getTaskId
Returns the id of the task associated with the current conversation or 'null'.
-