org.camunda.bpm.engine.cdi
Class CurrentProcessInstance

java.lang.Object
  extended by org.camunda.bpm.engine.cdi.CurrentProcessInstance

public class CurrentProcessInstance
extends Object

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
CurrentProcessInstance()
           
 
Method Summary
 Execution getExecution()
          Returns the currently associated execution or 'null'
 String getExecutionId()
           
 ProcessInstance getProcessInstance()
          Returns the ProcessInstance currently associated or 'null'
 String getProcessInstanceId()
          Returns the id of the currently associated process instance or 'null'
 Task getTask()
          Returns the currently associated Task or 'null'
 String getTaskId()
          Returns the id of the task associated with the current conversation or 'null'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentProcessInstance

public CurrentProcessInstance()
Method Detail

getProcessInstance

@Produces
@Named
@Typed(value=org.camunda.bpm.engine.runtime.ProcessInstance.class)
public ProcessInstance getProcessInstance()
Returns the ProcessInstance currently associated or 'null'

Throws:
ProcessEngineCdiException - if no Execution is associated. Use BusinessProcess.isAssociated() to check whether an association exists.

getProcessInstanceId

@Produces
@Named
public String getProcessInstanceId()
Returns the id of the currently associated process instance or 'null'


getExecution

@Produces
@Named
public Execution getExecution()
Returns the currently associated execution or 'null'


getExecutionId

@Produces
@Named
public String getExecutionId()
See Also:
BusinessProcess.getExecution()

getTask

@Produces
@Named
public Task getTask()
Returns the currently associated Task or 'null'

Throws:
ProcessEngineCdiException - if no Task is associated. Use BusinessProcess.isTaskAssociated() to check whether an association exists.

getTaskId

@Produces
@Named
public String getTaskId()
Returns the id of the task associated with the current conversation or 'null'.



Copyright © 2016 camunda services GmbH. All rights reserved.