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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-iic message

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


Subject: Concurrent thread use cases using <If><Then><Else> syntax


Title: call this Monday
Jacques and all,
 
   Here is a "follow on" set of use case instances, using <If iftype="and/or"><Then><ElseIF><Then><Else> syntax as opposed to
<Split splitType="and/or"> and <Join>.  While these use cases do not necessarily highlight the differences or advantages
of this syntax.. more complex use cases would do so, since I do not believe it is possible to construct that type
of an instance document using <Split> and <Join> operators.
   Also, the implicit "parallelism" of a <Split> may not always be desireable.. but due to the semantics of its definition..
this is unavoidable and somtimes unnecessary or unwanted.
   Because of the limitations and implied concurrency/parallelism of the <Split> operator, I suggest using the <If><Then><Else>
constructs.. that would allow more flexible branching.. plus would permit the use of a synchronous evalution of multiple <Thread>s
using the "and" operator.  I believe that forcing all <AndSplit>s to be run as cuncurrent sub-processes limits the flexibility of the
test framework... when some scenarios may require syncronous execution of sub-processes ( such as "send/receive" ).
 
Regards,
Mike
 
 
ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 1</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_1</b></i></td><td><i><b>POC of exception handling</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m1</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='and'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_02'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_02'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_03</td><td>Test that an Error message was NOT received, any time within 300 seconds after step_01</td><td> stepDuration='300' </td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Filter any ErrorList elements in the MessageStore</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore//Message//[eb:ErrorList]</td></tr><tr bgcolor="FFFFFF"><td>Assertion matchResult='fail' </td><td></td><td>Verify Error is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message[count()&gt;0]</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='exception'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='exception'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td><b><font color="FF0000">fail</font></b></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message M2</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//[eb:MessageHeader[eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId='m2']</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr></table>ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 2</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_2</b></i></td><td><i><b>Workflow If</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m1</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='If_example'</td><td>synchType='synchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='and'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2a</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2a"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr><td>TestStep</td><td>step_01_02</td><td>Verify Response Message m2b</td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2b"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_02'</td><td>synchType='asynchronous' </td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_02'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_02_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m3</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m3"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_03'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_03'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_02_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m4</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m4"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End Then</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>ÿþ<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><head xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"> <META http-equiv="Content-Type" content="text/html; charset=UTF-16"> <title>ebXML Test Suite Author: Michael Kass Organization: NIST Date: 05/15/2003 Version 1.0 </title><link rel="stylesheet" type="text/css" href="xmlverbatim.css"></head><center xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><h2>POC for BPSS testing: Case 3</h2></center><table border="2" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ebTest="http://www.oasis-open.org/tc/ebxml-iic/tests"><tr><td width="10%" align="center"><h4>Test Object</h4></td><td width="10%" align="center"><h4>ID</h4></td><td width="10%" align="center"><h4>Description</h4></td><td width="10%" align="center"><h4>Mode</h4></td><td width="10%" align="center"><h4>Operation</h4></td><td width="10%" align="center"><h4>Configuration</h4></td><td width="40%" align="center"><h4>Message Expression</h4></td></tr><tr><td width="10%" align="left">Test Suite</td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="center"></td><td width="10%" align="left"></td><td width="40%" align="center"></td></tr><tr><td><b> Test Case </b></td><td><i><b>testcase_3</b></i></td><td><i><b>Conditional Branching</b></i></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01</td><td>Send a message M1</td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr bgcolor="00FFFF"><td>If</td><td></td><td>ifType='or'</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2 and test if message is an 'Approval' </td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2"))</td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Get message payload</td><td></td><td>GetPayload Content-Id = 'cid:response'<br></td><td></td><td width="50%"></td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify that message is a 'approval'</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Approval</td></tr><tr><td>TestStep</td><td>step_01_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m4</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve message m5</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Rejection" and eb:MessageData/eb:MessageId="m5"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>ThreadRef</td><td>nameRef='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FF0000"><td>Thread</td><td>name='thread_01'</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>TestStep</td><td>step_01_01</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve Response message m2 and test if message is an 'Approval' </td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Mute" and eb:MessageData/eb:MessageId="m2"))</td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Get message payload</td><td></td><td>GetPayload Content-Id = 'cid:response'<br></td><td></td><td width="50%"></td></tr><tr bgcolor="FFFFFF"><td>Precondition </td><td></td><td>Verify that message is a 'approval'</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Approval</td></tr><tr><td>TestStep</td><td>step_01_02</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Send a message m4</td><td></td><td>PutMessage</td><td></td><td width="50%"></td></tr><tr><td>TestStep</td><td>step_01_03</td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFFFFF"><td></td><td></td><td>Retrieve message m5</td><td></td><td>GetMessage</td><td></td><td width="50%">/MessageStore/Message//(eb:MessageHeader(eb:ConversationId=$ConversationId and eb:Action="Rejection" and eb:MessageData/eb:MessageId="m5"))</td></tr><tr bgcolor="FFFFFF"><td>Assertion </td><td></td><td>Verify Response is present</td><td></td><td>VerifyContent</td><td></td><td width="50%">//Message(count()=1)&gt;</td></tr><tr bgcolor="FF0000"><td>End Thread</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="FFAA00"><td>End ThreadRef</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr bgcolor="00FFFF"><td>End If</td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>

scripting_schema.jpg

scripting_poc_02_02_04.zip



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