Class ProcessInstanceIdContext
- java.lang.Object
-
- org.kie.internal.runtime.manager.context.ProcessInstanceIdContext
-
- All Implemented Interfaces:
org.kie.api.runtime.manager.Context<Long>
public class ProcessInstanceIdContext extends Object implements org.kie.api.runtime.manager.Context<Long>
Process instance id aware implementation of theContext
interface. It's main responsibility is to be the data holder between caller and runtime manager to obtain proper instances ofRuntimeEngine
.
Used by strategy:- PerProcessInstance
get()
to get empty context when starting process instancesget(Long)
to get context for specific process instance
-
-
Constructor Summary
Constructors Constructor Description ProcessInstanceIdContext(Long processInstanceId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProcessInstanceIdContext
get()
Returns new instance ofProcessInstanceIdContext
without process instance id.static ProcessInstanceIdContext
get(Long processInstanceId)
Returns new instance ofProcessInstanceIdContext
with id of already existing process instanceLong
getContextId()
void
setContextId(long id)
-
-
-
Constructor Detail
-
ProcessInstanceIdContext
public ProcessInstanceIdContext(Long processInstanceId)
-
-
Method Detail
-
getContextId
public Long getContextId()
- Specified by:
getContextId
in interfaceorg.kie.api.runtime.manager.Context<Long>
-
setContextId
public void setContextId(long id)
-
get
public static ProcessInstanceIdContext get()
Returns new instance ofProcessInstanceIdContext
without process instance id. Used for starting new instances of the process.- Returns:
-
get
public static ProcessInstanceIdContext get(Long processInstanceId)
Returns new instance ofProcessInstanceIdContext
with id of already existing process instance- Parameters:
processInstanceId
- actual identifier of process instance- Returns:
-
-