public class CmmnClassDelegate extends Object implements CmmnTriggerableActivityBehavior, TaskListener, PlanItemInstanceLifecycleListener, CaseInstanceLifecycleListener, PlanItemVariableAggregator
| Modifier and Type | Field and Description |
|---|---|
protected CmmnActivityBehavior |
activityBehaviorInstance |
protected String |
className |
protected List<FieldExtension> |
fieldExtensions |
protected String |
sourceState |
protected String |
targetState |
EVENTNAME_ALL_EVENTS, EVENTNAME_ASSIGNMENT, EVENTNAME_COMPLETE, EVENTNAME_CREATE, EVENTNAME_DELETE| Constructor and Description |
|---|
CmmnClassDelegate(String className,
List<FieldExtension> fieldExtensions) |
protected String sourceState
protected String targetState
protected String className
protected List<FieldExtension> fieldExtensions
protected CmmnActivityBehavior activityBehaviorInstance
public CmmnClassDelegate(String className, List<FieldExtension> fieldExtensions)
public void execute(DelegatePlanItemInstance planItemInstance)
execute in interface CmmnActivityBehaviorpublic void trigger(DelegatePlanItemInstance planItemInstance)
trigger in interface CmmnTriggerableActivityBehaviorprotected CmmnActivityBehavior getCmmnActivityBehavior(String className)
public void notify(DelegateTask delegateTask)
notify in interface TaskListenerprotected TaskListener getTaskListenerInstance(DelegateTask delegateTask)
public void stateChanged(DelegatePlanItemInstance planItemInstance, String oldState, String newState)
PlanItemInstanceLifecycleListenerDelegatePlanItemInstance changes and the
PlanItemInstanceLifecycleListener.getSourceState() and PlanItemInstanceLifecycleListener.getTargetState() match.stateChanged in interface PlanItemInstanceLifecycleListenerpublic void stateChanged(CaseInstance caseInstance, String oldState, String newState)
CaseInstanceLifecycleListenerCaseInstance changes and the
CaseInstanceLifecycleListener.getSourceState() and CaseInstanceLifecycleListener.getTargetState() match.stateChanged in interface CaseInstanceLifecycleListenerprotected PlanItemInstanceLifecycleListener getPlanItemLifeCycleListenerInstance()
protected CaseInstanceLifecycleListener getCaseLifeCycleListenerInstance()
public Object aggregateSingleVariable(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext context)
PlanItemVariableAggregatoraggregateSingleVariable in interface PlanItemVariableAggregatorplanItemInstance - the delegate planItemInstance from where we need to get data fromcontext - the aggregation contextpublic Object aggregateMultiVariables(DelegatePlanItemInstance planItemInstance, List<? extends VariableInstance> instances, PlanItemVariableAggregatorContext context)
PlanItemVariableAggregatoraggregateMultiVariables in interface PlanItemVariableAggregatorplanItemInstance - the delegated planItemInstance for which we need to do the aggregationinstances - the variable values that should be aggregated (these variables are created based on the value from PlanItemVariableAggregator.aggregateSingleVariable(DelegatePlanItemInstance, PlanItemVariableAggregatorContext))context - the aggregation contextprotected PlanItemVariableAggregator getPlanItemVariableAggregator()
public static void applyFieldExtensions(List<FieldExtension> fieldExtensions, Object target, boolean throwExceptionOnMissingField)
protected static void applyFieldExtension(FieldExtension fieldExtension, Object target, boolean throwExceptionOnMissingField)
public String getSourceState()
getSourceState in interface CaseInstanceLifecycleListenergetSourceState in interface PlanItemInstanceLifecycleListenerPlanItemInstanceState.
This listener will only receive elements where the state changing from this value to another one.
Return null or the empty String to listen to any state.public void setSourceState(String sourceState)
public String getTargetState()
getTargetState in interface CaseInstanceLifecycleListenergetTargetState in interface PlanItemInstanceLifecycleListenerPlanItemInstanceState.
This listener will only receive elements where the state changing from this value to another one.
Return null or the empty String to listen to any state.public void setTargetState(String targetState)
public String getClassName()
public void setClassName(String className)
public List<FieldExtension> getFieldExtensions()
public void setFieldExtensions(List<FieldExtension> fieldExtensions)
public CmmnActivityBehavior getActivityBehaviorInstance()
public void setActivityBehaviorInstance(CmmnActivityBehavior activityBehaviorInstance)
Copyright © 2023 Flowable. All rights reserved.