org.camunda.bpm.engine.cdi.annotation
Annotation Type BusinessProcessScoped


@Target(value={TYPE,FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface BusinessProcessScoped

Declare a bean to be BusinessProcessScoped. Instances of BusinessProcessScoped beans are stored as process variables in a ProcessInstance.

Note: BusinessProcessScoped beans need to be PassivationCapable.

Note: BusinessProcessScoped is not capable of managing local process variables, and there is currently also no respective other implementation for that. Please use BusinessProcess.setVariableLocal(String, Object) and BusinessProcess.getVariableLocal(String) or an injected Map of local process variables instead.

If no ProcessInstance is currently managed, instances of BusinessProcessScoped beans are temporarily stored in a local scope (I.e. the Conversation or the Request, depending on the context, see javadoc on ConversationScoped and RequestScoped to find out when either context is active). If this scope is later associated with a business process instance, the bean instances are flushed to the ProcessInstance.

Example:

 @BusinessProcessScoped
 public class Authorization implements Serializable {
    ...
 }
 

Author:
Daniel Meyer



Copyright © 2016 camunda services GmbH. All rights reserved.