OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tamie message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [tamie] conditional in BPEL


Hi Jaques,
 
So, just to be clear, the markup you are proposing would be:
 
<if condition="bool_expr1">
   activity
   
<elseif condition="bool_expr2">*
      activity
   </elseif>
   <else>?
      activity
   </else>
</if>
 
Right?
 
The problem I see with this approach is that it puts the conditions at different levels in the structure, which would make it easy to miss the elseif and else tags inside.  This is especially true in a XML environment where many viewer and editors let you expand or contract tags to hide their content.  For example, in Internet Explorer you may see only
+ <if condition="bool_expr1">, and you would not expect the tag to do any activity when bool_expr is false.
 
How about this syntax:
 
<decide>
   <if condition="bool_expr1">
      activity
   </if>
   <elseif condition="bool_expr2">*
      activity
   </elseif>
   <else>?
      activity
   </else>
</decide>
 
If you don't have an elseif or else tag, the decide wrapper would be optional:
 
<if condition="bool_expr1">
   activity
</if>
 
- Chuck


From: Durand, Jacques R. [mailto:JDurand@us.fujitsu.com]
Sent: Wednesday, September 24, 2008 7:26 PM
To: Morris, Charles, E.
Cc: tamie@lists.oasis-open.org
Subject: [tamie] conditional in BPEL

Chuck:
 
How about a modified version of the conditional statement markup in BPEL:
 
<if standard-attributes>
standard-elements
<condition expressionLanguage="anyURI"?>bool-expr</condition>
activity
<elseif>*
<condition expressionLanguage="anyURI"?>bool-expr</condition>
activity
</elseif>
<else>?
activity
</else>
</if>
 
The advantage I see is that it does not introduce a separate switch statement. It reuses the conventional if / elseif / else found in several programming lges and algorithmics.
And the entire statement is within a single xml element....
Any conditional statement, simple or switch-like, starts with <if>.
 
Now, I don't think we need a separate <condition> element.
We could have:
<if condition="...">
<elseif condition="...">
If necessary we could have an optional @exprlang in case the condition is not XPath.
 
opinion?
 
Jacques
 
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]