Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » CDATA in Sequence Flow Condition
CDATA in Sequence Flow Condition [message #1757975] Wed, 22 March 2017 13:13 Go to next message
Imanuel R is currently offline Imanuel RFriend
Messages: 4
Registered: March 2017
Junior Member
Hello,

i want to add a conditional expression to a sequence flow. This condition consists of an CDATA element. Unfortunatly the plugin replaces the special chars while generating the source:

<![CDATA[${returnsBooleanValueExpression}]]>


<bpmn2:sequenceFlow id="SequenceFlow_9" name="JA" sourceRef="ExclusiveGateway_2" targetRef="UserTask_3">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2" evaluatesToTypeRef="ItemDefinition_1842">&lt;![CDATA[${returnsBooleanValueExpression}]]&gt;</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>


Is there any way to avoid that?

Im using
- Eclipse Neon.2
- BPMN2 Modeler: Diagram Editor 1.3.1.Final-v20161006-1425-B58

Kind regards,
Imanuel
Re: CDATA in Sequence Flow Condition [message #1757978 is a reply to message #1757975] Wed, 22 March 2017 13:56 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

The reason for this is because XML does not allow the special characters '<' and '>' to appear in the text - these are reserved for start & end tags. When the XML is loaded back into the editor, the &lt; and &gt; entities are converted back to < and >.
This should not be a problem unless you are parsing the XML using some text processor instead of loading it with an XML parser.
Re: CDATA in Sequence Flow Condition [message #1757995 is a reply to message #1757975] Wed, 22 March 2017 15:44 Go to previous messageGo to next message
Imanuel R is currently offline Imanuel RFriend
Messages: 4
Registered: March 2017
Junior Member
Yes. You are right! I thought i had to encapsulate the expression manually within the CDATA block. However that didnt work. The Framework didnt accept it. I think it was the broken CDATA-Tag. So i removed it completely.

Assuming following expression:
${costs > 100 && costs < 200}


In the Source it looks like
${costs > 100 &amp;&amp; costs &lt; 200}


Thats weird. The "<"-tag is tanslated but not the ">"-tag...
But after loading the bpmn process everything seems to be ok. So i am fine with that.

Thank yo for the hint.
Re: CDATA in Sequence Flow Condition [message #1758092 is a reply to message #1757995] Thu, 23 March 2017 12:55 Go to previous message
Ralph Soika is currently offline Ralph SoikaFriend
Messages: 192
Registered: July 2009
Senior Member
Yes I also think it's not necessary to embed your expression with a CDATA.
We have done this in our own extension project by defining this behavior directly in the EMF model.
You can take a look into the solution in this tutorial:
https://wiki.eclipse.org/BPMN2-Modeler/DeveloperTutorials/AddingCDATA

But as discussed here, I don't think this is necessary.

===
Ralph
Previous Topic:BPMN Element Labels
Next Topic:Example Models
Goto Forum:
  


Current Time: Thu Apr 25 12:27:26 GMT 2024

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

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

Back to the top