Skip to content

Commit

Permalink
Adds WCP12 partial support test based on while and async invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
simonharrer committed May 28, 2013
1 parent 2c452e3 commit ad06153
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/tests/configuration/processes/PatternProcesses.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,16 @@ class PatternProcesses {
]
)

public final Process MULTIPLE_INSTANCES_WITHOUT_SYNCHRONIZATION_PATTERN_WHILE_PARTIAL = buildPatternProcessWithPartner(
"WCP12-MultipleInstancesWithoutSynchronizationPattern-While-Partial",
[
new TestCase(testSteps: [
new TestStep(input: "1", output: "1", operation: WsdlOperation.SYNC)]),
new TestCase(testSteps: [
new TestStep(input: "2", output: "2", operation: WsdlOperation.SYNC)])
]
)

public final Process MULTIPLE_INSTANCES_WITH_A_PRIORI_DESGIN_TIME_KNOWLEDGE_PATTERN_PARTIAL = buildPatternProcessWithPartner(
"WCP13-MultipleInstancesWithAPrioriDesignTimeKnowledgePattern-Partial",
[
Expand Down Expand Up @@ -250,6 +260,7 @@ class PatternProcesses {
DEFERRED_CHOICE_PATTERN,
MULTIPLE_INSTANCES_WITHOUT_SYNCHRONIZATION_PATTERN,
MULTIPLE_INSTANCES_WITHOUT_SYNCHRONIZATION_PATTERN_PARTIAL,
MULTIPLE_INSTANCES_WITHOUT_SYNCHRONIZATION_PATTERN_WHILE_PARTIAL,
MULTIPLE_INSTANCES_WITH_A_PRIORI_DESGIN_TIME_KNOWLEDGE_PATTERN,
MULTIPLE_INSTANCES_WITH_A_PRIORI_DESGIN_TIME_KNOWLEDGE_PATTERN_PARTIAL,
MULTIPLE_INSTANCES_WITH_A_PRIORI_RUNTIME_KNOWLEDGE_PATTERN,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<process
name="WCP12-MultipleInstancesWithoutSynchronizationPattern-While-Partial"
targetNamespace="http://dsg.wiai.uniba.de/betsy/patterns/bpel/control-flow/wcp12/multipleInstancesWithoutSynchronization/while/partial"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ti="http://dsg.wiai.uniba.de/betsy/activities/wsdl/testinterface"
xmlns:tp="http://dsg.wiai.uniba.de/betsy/activities/wsdl/testpartner"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<import namespace="http://dsg.wiai.uniba.de/betsy/activities/wsdl/testinterface" location="../TestInterface.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="http://dsg.wiai.uniba.de/betsy/activities/wsdl/testpartner" location="../TestPartner.wsdl"
importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="MyRoleLink" partnerLinkType="ti:TestInterfacePartnerLinkType" myRole="testInterfaceRole"/>
<partnerLink name="TestPartnerLink" partnerLinkType="tp:TestPartnerLinkType" partnerRole="testPartnerRole"/>
</partnerLinks>
<variables>
<variable name="ReplyData" messageType="ti:executeProcessSyncResponse"/>
<variable name="InitData" messageType="ti:executeProcessSyncRequest"/>
<variable name="PartnerInitData" messageType="tp:executeProcessAsyncRequest"/>
<variable name="counter" type="xs:int"/>
</variables>
<sequence>

<receive name="InitialReceive" createInstance="yes" partnerLink="MyRoleLink" operation="startProcessSync"
portType="ti:TestInterfacePortType" variable="InitData"/>
<assign name="AssignInitData">
<copy>
<from><literal>100</literal></from>
<to variable="PartnerInitData" part="inputPart"/>
</copy>
<copy>
<from>0</from>
<to variable="ReplyData" part="outputPart"/>
</copy>
<copy>
<from>$InitData.inputPart</from>
<to variable="counter"/>
</copy>
</assign>
<while>
<condition>$counter > 0</condition>
<sequence>
<invoke name="InvokePartner" partnerLink="TestPartnerLink" operation="startProcessAsync"
portType="tp:TestPartnerPortType" inputVariable="PartnerInitData" />
<assign name="decrement">
<copy>
<from>$counter - 1</from>
<to variable="counter"/>
</copy>
</assign>
</sequence>
</while>

<assign name="AddReplyData">
<copy>
<from>$InitData.inputPart</from>
<to variable="ReplyData" part="outputPart"/>
</copy>
</assign>
<reply name="ReplyToInitialReceive" partnerLink="MyRoleLink" operation="startProcessSync"
portType="ti:TestInterfacePortType" variable="ReplyData"/>
</sequence>
</process>

0 comments on commit ad06153

Please sign in to comment.