Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » In memory 2 sequence flow created while loading the resource file.(Reloading the bpmn file with custom task is showing duplicate sequence flow.)
In memory 2 sequence flow created while loading the resource file. [message #1747234] Fri, 11 November 2016 05:31
Rakesh Kumar Shah is currently offline Rakesh Kumar ShahFriend
Messages: 9
Registered: April 2016
Junior Member
I am facing a strange problem and debugging to figure out the root cause.
Following is a problem.
1. I created completely custom model for our need and created custom task for respective Business Object.
2. Everything is going fine as per the sample and document.

Following are the steps of the issue production.

1.Create a brand new bpmn file and add few activities to the file.
2. Save the file and close the bpmn file editor.
3. Now double click and reopen the same file, RuntimeExtension will get a call back on notify() reference implementation snippet is following.
4. Now in the file modify any change and save the file.
5. Reopen the file, will get Orphan SequenceFlow error consistently.

Following is a bpmn file content for reference created first time and saved.

<?xml version="1.0" encoding="UTF-8"?>
<!-- origin at X=0.0 Y=0.0 -->
<bpmn2:definitions xmlns:xsi="" xmlns:bpmn2="" xmlns:bpmndi="" xmlns:dc="" xmlns:di="" xmlns:ot="" xmlns:tl="" id="Definitions_1" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.1.6" targetNamespace="">
<bpmn2:process id="process_1" name="Default Process" isExecutable="false">
<bpmn2:startEvent id="StartEvent_1" name="UntitledWorkflow">
<bpmn2:userTask id="UserTask_1" ot:wemType="ManualActivity" name="ManualActivity_1">
<ot:wemManualActivity xsi:type="ot:ManualActivity">
<ot:outputData xsi:type="ot:OutputData" name="vgnTaskAssignee" dataType="USER" description="The user who accepts this task"/>
<bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="UserTask_1">
<condition xsi:type="ot:Condition"/>

Now reopening the same file, I will be notified with the following event.
public void notify(LifecycleEvent event) {
if(LifecycleEvent.EventType.EDITOR_INITIALIZED.compareTo(event.eventType) == 0){
System.out.println("Editor is initialized.. "+event);
DesignEditor editor = (DesignEditor);
Bpmn2ResourceImpl resource = editor.getModelHandler().getResource();
TreeIterator<EObject> contents = resource.getAllContents();
EObject object =;
if(object instanceof StartEvent){
StartEvent startEvent = (StartEvent) object;
int size = startEvent.getOutgoing().size();
System.out.println(startEvent.getOutgoing().size()); // Here it print value 2 instead of 1 on console
if(size > 1){

}else if(object instanceof UserTask){
UserTask userTask = (UserTask) object;
All information in both the SequenceFlow object is same, like sourceRef and targetRef, id but the only difference is extensionAttributeValue is available in the second object and first object is missing this information.

Let me know if anybody has pointer on this. I am struggling with this. We are approaching the deadline of release.

Thanks in advance.
Previous Topic:Several identical elements in <extensionElements> tag
Next Topic:Multiple Instances Embedded SubProcess Input Instance Parameter Problem
Goto Forum:

Current Time: Mon Sep 25 00:49:34 GMT 2023

Powered by FUDForum. Page generated in 0.02205 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top