Fix DataCompletenessTask BoundaryEvent in Flowable

This commit is contained in:
Ram Narayan Balaji 2025-08-23 18:36:19 +05:30
parent 875964f24b
commit 6bb87f72ca

View File

@ -50,8 +50,13 @@ public class DataCompletenessTask implements NodeInterface {
subProcess.addFlowElement(new SequenceFlow(startEvent.getId(), dataCompletenessTask.getId()));
subProcess.addFlowElement(new SequenceFlow(dataCompletenessTask.getId(), endEvent.getId()));
if (workflowConfig.getStoreStageStatus()) {
attachWorkflowInstanceStageListeners(subProcess);
}
this.subProcess = subProcess;
this.runtimeExceptionBoundaryEvent = getRuntimeExceptionBoundaryEvent(dataCompletenessTask);
this.runtimeExceptionBoundaryEvent =
getRuntimeExceptionBoundaryEvent(subProcess, workflowConfig.getStoreStageStatus());
}
private ServiceTask getDataCompletenessServiceTask(
@ -113,17 +118,4 @@ public class DataCompletenessTask implements NodeInterface {
public BoundaryEvent getRuntimeExceptionBoundaryEvent() {
return runtimeExceptionBoundaryEvent;
}
private BoundaryEvent getRuntimeExceptionBoundaryEvent(ServiceTask serviceTask) {
BoundaryEvent boundaryEvent = new BoundaryEvent();
boundaryEvent.setId(getFlowableElementId(serviceTask.getId(), "runtimeExceptionBoundaryEvent"));
boundaryEvent.setAttachedToRefId(serviceTask.getId());
org.flowable.bpmn.model.ErrorEventDefinition errorEventDef =
new org.flowable.bpmn.model.ErrorEventDefinition();
errorEventDef.setErrorCode("workflowRuntimeException");
boundaryEvent.addEventDefinition(errorEventDef);
return boundaryEvent;
}
}