update - 添加 activity 的 completeWithCondition 事件.
This commit is contained in:
parent
ccea7bbc08
commit
b5d3f63d9b
@ -8,6 +8,7 @@ import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
|
|||||||
import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener;
|
import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener;
|
||||||
import org.flowable.engine.delegate.event.FlowableActivityCancelledEvent;
|
import org.flowable.engine.delegate.event.FlowableActivityCancelledEvent;
|
||||||
import org.flowable.engine.delegate.event.FlowableActivityEvent;
|
import org.flowable.engine.delegate.event.FlowableActivityEvent;
|
||||||
|
import org.flowable.engine.delegate.event.FlowableMultiInstanceActivityCompletedEvent;
|
||||||
import org.springframework.beans.factory.ObjectProvider;
|
import org.springframework.beans.factory.ObjectProvider;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ import java.util.Set;
|
|||||||
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_CANCELLED;
|
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_CANCELLED;
|
||||||
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_COMPLETED;
|
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_COMPLETED;
|
||||||
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_STARTED;
|
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.ACTIVITY_STARTED;
|
||||||
|
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.MULTI_INSTANCE_ACTIVITY_COMPLETED_WITH_CONDITION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动节点完成事件
|
* 活动节点完成事件
|
||||||
@ -37,6 +39,7 @@ public class EngineActivityEventListener extends AbstractFlowableEngineEventList
|
|||||||
ImmutableSet.<FlowableEngineEventType>builder()
|
ImmutableSet.<FlowableEngineEventType>builder()
|
||||||
.add(ACTIVITY_STARTED)
|
.add(ACTIVITY_STARTED)
|
||||||
.add(ACTIVITY_COMPLETED)
|
.add(ACTIVITY_COMPLETED)
|
||||||
|
.add(MULTI_INSTANCE_ACTIVITY_COMPLETED_WITH_CONDITION)
|
||||||
.add(ACTIVITY_CANCELLED)
|
.add(ACTIVITY_CANCELLED)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -61,6 +64,12 @@ public class EngineActivityEventListener extends AbstractFlowableEngineEventList
|
|||||||
getOrderedListeners().forEach(i -> i.onCompleted(event));
|
getOrderedListeners().forEach(i -> i.onCompleted(event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void multiInstanceActivityCompletedWithCondition(FlowableMultiInstanceActivityCompletedEvent event) {
|
||||||
|
log.info("activityCompleted: activityId: {} activityName: {}", event.getActivityId(), event.getActivityName());
|
||||||
|
getOrderedListeners().forEach(i -> i.onCompleted(event));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void activityCancelled(FlowableActivityCancelledEvent event) {
|
protected void activityCancelled(FlowableActivityCancelledEvent event) {
|
||||||
log.info("activityCancelled: activityId: {} activityName: {}", event.getActivityId(), event.getActivityName());
|
log.info("activityCancelled: activityId: {} activityName: {}", event.getActivityId(), event.getActivityName());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user