From: <pka...@us...> - 2009-07-28 22:11:08
|
Revision: 390 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=390&view=rev Author: pkasprzak Date: 2009-07-28 22:10:56 +0000 (Tue, 28 Jul 2009) Log Message: ----------- * Correlation Stuff :) Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-28 14:38:25 UTC (rev 389) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-28 22:10:56 UTC (rev 390) @@ -16,9 +16,12 @@ <import namespace="http://cse.campussource.de/ejb/EntityManager" location="Common/EntityManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://cse.campussource.de/ejb/RelationManager" location="Common/RelationManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://cse.campussource.de/ejb/IdentityManager" location="Common/IdentityManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> +<!-- <import namespace="http://j2ee.netbeans.org/wsdl/Common/DependencyManagerNotification" location="Common/DependencyManagerNotification.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <import namespace="http://cse.campussource.de/ejb/DependencyManager" location="Common/DependencyManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <import namespace="http://cse.campussource.de/ejb/SystemManager" location="Common/SystemManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> +--> + + <import namespace="http://cse.campussource.de/ejb/DependencyManager" location="Common/DependencyManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/><import namespace="http://cse.campussource.de/ejb/SystemManager" location="Common/SystemManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <partnerLinks> <partnerLink name="EntityManager" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" partnerLinkType="tns:EntityManagerLinkType" partnerRole="EntityManagerRole"/> @@ -30,23 +33,20 @@ partnerRole="IdentityManagerRole"/> <partnerLink name="DependencyManager" xmlns:tns="http://cse.campussource.de/ejb/DependencyManager" partnerLinkType="tns:DependencyManagerLinkType" - partnerRole="DependencyManagerRole"/> + myRole="DependencyManager_Requestor" + partnerRole="DependencyManager_Provider"/> <partnerLink name="SystemManager" xmlns:tns="http://cse.campussource.de/ejb/SystemManager" partnerLinkType="tns:SystemManagerLinkType" partnerRole="SystemManagerRole"/> <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" myRole="AddCoursePortTypeRole"/> - - <partnerLink name="DependencyManagerNotification" xmlns:tns="http://j2ee.netbeans.org/wsdl/Common/DependencyManagerNotification" partnerLinkType="tns:DependencyManagerNotification" - myRole="DependencyManagerNotificationPortTypeRole"/> </partnerLinks> <variables> <variable name="GetOutboundSystemsOut" xmlns:tns="http://cse.campussource.de/ejb/SystemManager" messageType="tns:getOutboundSystemsResponse"/> <variable name="GetOutboundSystemsIn" xmlns:tns="http://cse.campussource.de/ejb/SystemManager" messageType="tns:getOutboundSystems"/> <variable name="WaitForDependenciesIn" xmlns:tns="http://cse.campussource.de/ejb/DependencyManager" messageType="tns:waitForDependencies"/> - <variable name="NotifyIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/Common/DependencyManagerNotification" messageType="tns:notifyRequest"/> <variable name="ProcessCourseRelationsOut" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" messageType="tns:processCourseRelationsResponse"/> <variable name="ProcessCourseRelationsIn" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" messageType="tns:processCourseRelations"/> <variable name="UpdateAttributesOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:updateAttributesResponse"/> @@ -63,7 +63,7 @@ </variables> <correlationSets> - <correlationSet name="DependencyManager" properties="ns0:EntityId"/> + <correlationSet name="DependencyManager" properties="ns0:EntityId"/> </correlationSets> <sequence> @@ -211,7 +211,11 @@ <invoke name="waitForDependencies" partnerLink="DependencyManager" operation="waitForDependencies" xmlns:tns="http://cse.campussource.de/ejb/DependencyManager" portType="tns:DependencyManager" - inputVariable="WaitForDependenciesIn"/> + inputVariable="WaitForDependenciesIn"> + <correlations> + <correlation set="DependencyManager" initiate="yes"/> + </correlations> + </invoke> <assign name="prepareGetOutboundSystems"> <!-- Nothing to do! --> <copy> @@ -225,16 +229,50 @@ portType="tns:SystemManager" inputVariable="GetOutboundSystemsIn" outputVariable="GetOutboundSystemsOut"/> - <forEach name="ForEach1" parallel="no" counterName="ForEach1Counter"> - <scope name="Scope1"> + + <forEach name="Distribute" parallel="no" counterName="SystemCounter"> + + <startCounterValue>1</startCounterValue> + <finalCounterValue>count($GetOutboundSystemsOut.parameters/*)</finalCounterValue> + + <scope name="SystemScope"> + + <variables> + <variable name="NotifyIn" messageType="ns0:notifyRequest"/> + <variable name="System" type="xsd:string"/> + </variables> + <sequence name="Sequence2"> - <receive name="Receive1" createInstance="no" partnerLink="DependencyManagerNotification" operation="notify" xmlns:tns="http://j2ee.netbeans.org/wsdl/Common/DependencyManagerNotification" portType="tns:DependencyManagerNotificationPortType" variable="NotifyIn"/> + + <receive name="receiveNotification" createInstance="no" partnerLink="DependencyManager" + operation="notify" + portType="ns0:DependencyManagerNotification" + variable="NotifyIn"> + <correlations> + <correlation set="DependencyManager" initiate="no"/> + </correlations> + </receive> + + <assign name="getSystem"> + <sxt:trace> + <sxt:log level="info" location="onComplete"> + <ns0:from>concat('*** Distributing message to system: ', $System)</ns0:from> + </sxt:log> + </sxt:trace> + <copy> + <from>$GetOutboundSystemsOut.parameters/return[$SystemCounter]</from> + <to>$System</to> + </copy> + </assign> + <empty name="loadContext"> <documentation>Load context for this entity for distribution (e.g. relations / parent objects / paths) and return it as xml (e.g. messages-object)</documentation> </empty> + <empty name="distributeMessages"> <documentation>Send courseMessage + context to outboundadapter (synchronisouly)</documentation> </empty> + </sequence> </scope> </forEach> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |