Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » [bpmn2] Convert Expression to FormalExpression
[bpmn2] Convert Expression to FormalExpression [message #667591] Fri, 29 April 2011 18:40 Go to next message
tsurdilo  is currently offline tsurdilo Friend
Messages: 41
Registered: February 2011
Sorry if this is simple question..I would like to know how to either:

a) get the value of an Expression, for example if i have:


timeCycle is going to be of type org.eclipse.bpmn2.impl.ExpressionImpl and not a FormalExpression..and I am not sure how to get the value "5s" out of it?

If instead I have <timeCycle xsi:type="tFormalExpression">5s</timeCycle> then its not an issue because this will be a FormalExpression with a getBody() method that lets me get to the body value.

b) Possible be able to convert Expression (cast or something) to FormalExpression this possible?

Any inputs are much welcome..
Re: [bpmn2] Convert Expression to FormalExpression [message #668154 is a reply to message #667591] Wed, 04 May 2011 07:43 Go to previous message
Henning Heitkoetter is currently offline Henning HeitkoetterFriend
Messages: 21
Registered: April 2010
Junior Member

an Expression (in contrast to a FormalExpression) does not map text in its body to an attribute in the metamodel. Instead, the natural-language text specifying the expression should be stored in the documentation attribute:
The Expression class is used to specify an Expression using natural-language text. These Expressions are not executable. The natural language text is captured using the documentation attribute, inherited from BaseElement.

Thus, the XML for your scenario should look somewhat like this:

I am aware that the BPMN 2 XML Schema defines Expression as an XML element with mixed content (so your XML is valid), but the metamodel does not define an attribute or reference to which this content could be mapped.

Best regards,
Previous Topic:[BPMN2] extract information by procedure
Next Topic:customization
Goto Forum:

Current Time: Fri Jul 19 22:36:32 GMT 2024

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

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

Back to the top