From: <pka...@us...> - 2009-07-24 14:08:23
|
Revision: 370 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=370&view=rev Author: pkasprzak Date: 2009-07-24 14:08:07 +0000 (Fri, 24 Jul 2009) Log Message: ----------- * Use updateAttributes() 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-24 14:03:51 UTC (rev 369) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-24 14:08:07 UTC (rev 370) @@ -7,32 +7,34 @@ xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor" xmlns:sxat="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Attachment" xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" + xmlns:x="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:dt="http://cse.campussource.de/schema/DataTypes" xmlns:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/AddCourse"> - <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" location="AddCourse.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <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/ObjectProcessor/AddCourse" location="AddCourse.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <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/"/> + <partnerLinks> - <partnerLink name="EntityManager" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" partnerLinkType="tns:EntityManagerLinkType" partnerRole="EntityManagerRole"/> - <partnerLink name="RelationManager" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" partnerLinkType="tns:RelationManagerLinkType" partnerRole="RelationManagerRole"/> - <partnerLink name="IdentityManager" xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" partnerLinkType="tns:IdentityManagerLinkType" partnerRole="IdentityManagerRole"/> - <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" myRole="AddCoursePortTypeRole"/> + <partnerLink name="EntityManager" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" partnerLinkType="tns:EntityManagerLinkType" partnerRole="EntityManagerRole"/> + <partnerLink name="RelationManager" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" partnerLinkType="tns:RelationManagerLinkType" partnerRole="RelationManagerRole"/> + <partnerLink name="IdentityManager" xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" partnerLinkType="tns:IdentityManagerLinkType" partnerRole="IdentityManagerRole"/> + <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" myRole="AddCoursePortTypeRole"/> </partnerLinks> <variables> - <variable name="TestOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:testResponse"/> - <variable name="TestIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:test"/> - <variable name="CreateMappingIn" xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" messageType="tns:createMapping"/> - <variable name="PersistCourseOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCourseResponse"/> - <variable name="PersistCourseIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCourse"/> - <variable name="ExistsOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:existsResponse"/> - <variable name="ExistsIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:exists"/> - <variable name="ProcessCourseIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" messageType="tns:processCourseRequest"/> + <variable name="UpdateAttributesOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:updateAttributesResponse"/> + <variable name="UpdateAttributesIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:updateAttributes"/> + <variable name="CreateMappingIn" xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" messageType="tns:createMapping"/> + <variable name="PersistCourseOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCourseResponse"/> + <variable name="PersistCourseIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCourse"/> + <variable name="ExistsOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:existsResponse"/> + <variable name="ExistsIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:exists"/> + <variable name="ProcessCourseIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" messageType="tns:processCourseRequest"/> <!-- CSE-id of the course --> - <variable name="CseId" type="xsd:integer"/> + <variable name="CseId" type="xsd:integer"/> </variables> <sequence> @@ -120,6 +122,7 @@ <else> <sequence name="CourseAlreadyExists"> + <empty name="peristUpdatedAttributes"> <documentation>-> EntityManager: persist any attributes that have changed and report if attributes have changed @@ -129,6 +132,20 @@ if not changed => check if relations have changed (if they have => update; else process finished)</documentation> </empty> + + + <assign name="prepareUpdateAttributes"> + <copy> + <from>x:doXslTransform('urn:stylesheets:toEntity.xsl', $ProcessCourseIn.courseMessage/dt:course)</from> + <to>$UpdateAttributesIn.parameters/entity</to> + </copy> + </assign> + + <invoke name="updateAttributes" partnerLink="EntityManager" operation="updateAttributes" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="UpdateAttributesIn" + outputVariable="UpdateAttributesOut"/> </sequence> </else> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <pka...@us...> - 2009-07-30 18:10:19
|
Revision: 406 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=406&view=rev Author: pkasprzak Date: 2009-07-30 18:09:59 +0000 (Thu, 30 Jul 2009) Log Message: ----------- * Variable assignment fixes + non-working logging... 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-30 18:08:24 UTC (rev 405) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-30 18:09:59 UTC (rev 406) @@ -7,6 +7,7 @@ xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor" xmlns:sxat="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Attachment" xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" + xmlns:sxxf="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/XPathFunctions" xmlns:x="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:dt="http://cse.campussource.de/schema/DataTypes" xmlns:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/AddCourse" @@ -126,8 +127,8 @@ <assign name="prepareCreateMapping"> <!-- Set cse-id --> <copy> - <from>$CseId</from> - <to>$CreateMappingIn.parameters/cseId</to> + <from variable="CseId"/> + <to>$CreateMappingIn.parameters/cseId/text()</to> </copy> <!-- Set system --> <copy> @@ -182,7 +183,7 @@ <assign name="prepareProcessRelations"> <copy> - <from>$CseId</from> + <from variable="CseId"/> <to>$ProcessCourseRelationsIn.parameters/cseId</to> </copy> <copy> @@ -203,7 +204,7 @@ <assign name="prepareWaitForDependencies"> <copy> - <from>$CseId</from> + <from variable="CseId"/> <to>$WaitForDependenciesIn.parameters/entityId</to> </copy> </assign> @@ -216,20 +217,42 @@ <correlation set="DependencyManager" initiate="yes"/> </correlations> </invoke> + + <!-- Nothing to do! --> <assign name="prepareGetOutboundSystems"> - <!-- Nothing to do! --> <copy> - <from></from> + <from> + <literal> + <getOutboundSystems/> + </literal> + </from> <to>$GetOutboundSystemsIn.parameters</to> </copy> </assign> + <empty> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <ns0:from>'*** Before getOutboundSystems()'</ns0:from> + </sxt:log> + </sxt:trace> + </empty> + <invoke name="getOutboundSystems" partnerLink="SystemManager" operation="getOutboundSystems" xmlns:tns="http://cse.campussource.de/ejb/SystemManager" portType="tns:SystemManager" inputVariable="GetOutboundSystemsIn" outputVariable="GetOutboundSystemsOut"/> + <!-- test --> + <empty> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <ns0:from>concat('*** After getOutboundSystems():', sxxf:doMarshal($GetOutboundSystemsOut.parameters))</ns0:from> + </sxt:log> + </sxt:trace> + </empty> + <forEach name="Distribute" parallel="no" counterName="SystemCounter"> <startCounterValue>1</startCounterValue> @@ -239,7 +262,9 @@ <variables> <variable name="NotifyIn" messageType="ns0:notifyRequest"/> + <variable name="System" type="xsd:string"/> + <variable name="EntityId" type="xsd:int"/> </variables> <sequence name="Sequence2"> @@ -248,21 +273,31 @@ operation="notify" portType="ns0:DependencyManagerNotification" variable="NotifyIn"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <ns0:from>concat('*** Waiting for notification...', '')</ns0:from> + </sxt:log> + </sxt:trace> + <correlations> <correlation set="DependencyManager" initiate="no"/> </correlations> </receive> - <assign name="getSystem"> + <assign name="setSystem"> <sxt:trace> <sxt:log level="info" location="onComplete"> - <ns0:from>concat('*** Distributing message to system: ', $System)</ns0:from> + <ns0:from>concat('*** Received notification: (', $System, ',', $EntityId, ')')</ns0:from> </sxt:log> </sxt:trace> <copy> - <from>$GetOutboundSystemsOut.parameters/return[$SystemCounter]</from> + <from>$NotifyIn.system</from> <to>$System</to> </copy> + <copy> + <from>$NotifyIn.entityId</from> + <to>$EntityId</to> + </copy> </assign> <empty name="loadContext"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-07-31 21:50:18
|
Revision: 413 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=413&view=rev Author: pkasprzak Date: 2009-07-31 21:50:05 +0000 (Fri, 31 Jul 2009) Log Message: ----------- * Logging improvements * Differentiate update / nothing to do * Prepare course-object for distribution 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-31 21:40:29 UTC (rev 412) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-31 21:50:05 UTC (rev 413) @@ -11,20 +11,17 @@ xmlns:x="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:dt="http://cse.campussource.de/schema/DataTypes" xmlns:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/AddCourse" - xmlns:ns0="http://cse.campussource.de/ejb/DependencyManager"> + xmlns:ns0="http://cse.campussource.de/ejb/DependencyManager" + xmlns:sxed2="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor2"> - <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" location="AddCourse.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <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://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" location="AddCourse.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <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://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/LoggingManager" location="Common/LoggingManager.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/LoggingManager" location="Common/LoggingManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <partnerLinks> <partnerLink name="LoggingManager" xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" partnerLinkType="tns:LoggingManagerLinkType" partnerRole="LoggingManagerRole"/> @@ -68,7 +65,8 @@ <variable name="DebugIn" xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" messageType="tns:debug"/> <!-- CSE-id of the course --> - <variable name="CseId" type="xsd:integer"/> + <variable name="EntityId" type="xsd:integer"/> + <variable name="Event" type="xsd:string"/> </variables> @@ -108,18 +106,37 @@ inputVariable="ExistsIn" outputVariable="ExistsOut"/> - <assign name="saveExistingCseId"> + <assign name="saveExistingEntityId"> <copy> <from>$ExistsOut.parameters/return</from> - <to>$CseId</to> + <to>$EntityId</to> </copy> </assign> <if> - <condition>$CseId = 0</condition> + <condition>$EntityId = 0</condition> + <!-- Object new => persist it, etc. --> <sequence name="CourseIsNew"> + <assign name="initCourseNew"> + <copy> + <from>'CREATE'</from> + <to>$Event</to> + </copy> + </assign> + + <assign> + <copy> + <from>concat('Course [', $ProcessCourseIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt:value, '] is new => CREATE')</from> + <to>$DebugIn.parameters/message</to> + </copy> + </assign> + <invoke partnerLink="LoggingManager" operation="debug" + xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" + portType="tns:LoggingManager" + inputVariable="DebugIn"/> + <assign name="preparePersistCourse"> <copy> <from>$ProcessCourseIn.courseMessage/dt:course</from> @@ -133,17 +150,17 @@ inputVariable="PersistCourseIn" outputVariable="PersistCourseOut"/> - <assign name="saveCreatedCseId"> + <assign name="saveCreatedEntityId"> <copy> <from>$PersistCourseOut.parameters/return</from> - <to>$CseId</to> + <to>$EntityId</to> </copy> </assign> <assign name="prepareCreateMapping"> <!-- Set cse-id --> <copy> - <from variable="CseId"/> + <from variable="EntityId"/> <to>$CreateMappingIn.parameters/cseId/text()</to> </copy> <!-- Set system --> @@ -169,24 +186,34 @@ <else> <sequence name="CourseAlreadyExists"> - <assign name="setCseId"> + <assign name="initCourseExists"> <copy> - <from variable="CseId"/> - <to>$ProcessCourseIn.courseMessage/dt:course/dt:busId</to> + <from>'NONE'</from> + <to>$Event</to> </copy> </assign> - <empty name="peristUpdatedAttributes"> - <documentation>-> EntityManager: persist any attributes that have changed and report if attributes have changed + <assign> + <copy> + <from>concat('Course [', $ProcessCourseIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt:value, '] already exists => UPDATE')</from> + <to>$DebugIn.parameters/message</to> + </copy> + </assign> + <invoke partnerLink="LoggingManager" operation="debug" + xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" + portType="tns:LoggingManager" + inputVariable="DebugIn"/> --> also upgrade ENTITY-TYPE to ENTITY (from proxy) + <assign name="setEntityId"> + <copy> + <from variable="EntityId"/> + <to>$ProcessCourseIn.courseMessage/dt:course/dt:busId</to> + </copy> + </assign> -if changed: => UPDATE_EVENT (regardless of relations) + <empty name="peristUpdatedAttributes"></empty> -if not changed => check if relations have changed (if they have => update; else process finished)</documentation> - </empty> - <assign name="prepareUpdateAttributes"> <copy> <from>x:doXslTransform('urn:stylesheets:prepareUpdateAttributesCall.xsl', $ProcessCourseIn.courseMessage/dt:course)</from> @@ -199,6 +226,20 @@ portType="tns:EntityManager" inputVariable="UpdateAttributesIn" outputVariable="UpdateAttributesOut"/> + + <!-- Check, if attributes have changed --> + <if> + <condition>$UpdateAttributesOut.parameters/return</condition> + + <!-- Change in attributes => set event to UPDATE --> + <assign name="setEventToUpdate"> + <copy> + <from>'UPDATE'</from> + <to>$Event</to> + </copy> + </assign> + </if> + </sequence> </else> @@ -206,7 +247,7 @@ <assign name="prepareProcessRelations"> <copy> - <from variable="CseId"/> + <from variable="EntityId"/> <to>$ProcessCourseRelationsIn.parameters/cseId</to> </copy> <copy> @@ -225,9 +266,17 @@ inputVariable="ProcessCourseRelationsIn" outputVariable="ProcessCourseRelationsOut"/> + <!-- Check, if relations have changed --> + <if> + <condition>not($ProcessCourseRelationsOut.parameters/return) and $Event = 'NONE'</condition> + + <!-- Entity already exists, attributes have not changed, relations also have not changed => nothing to do, exit process --> + <exit name="exitProcess"/> + </if> + <assign name="prepareWaitForDependencies"> <copy> - <from variable="CseId"/> + <from variable="EntityId"/> <to>$WaitForDependenciesIn.parameters/entityId</to> </copy> </assign> @@ -279,11 +328,12 @@ <scope name="SystemScope"> <variables> + <variable name="GetCourseContextOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContextResponse"/> + <variable name="GetCourseContextIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContext"/> + <variable name="NotifyIn" messageType="ns0:notifyRequest"/> - <variable name="NotifyIn" messageType="ns0:notifyRequest"/> - - <variable name="System" type="xsd:string"/> - <variable name="EntityId" type="xsd:int"/> + <variable name="System" type="xsd:string"/> + <variable name="EntityId" type="xsd:int"/> </variables> <sequence> @@ -332,10 +382,22 @@ portType="tns:LoggingManager" inputVariable="DebugIn"/> + <assign name="prepareGetCourseContext"> + <copy> + <from variable="System"/> + <to>$GetCourseContextIn.parameters/system</to> + </copy> + <copy> + <from variable="EntityId"/> + <to>$GetCourseContextIn.parameters/entityId</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> + <invoke name="getCourseContext" partnerLink="EntityManager" operation="getCourseContext" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="GetCourseContextIn" + outputVariable="GetCourseContextOut"/> <empty name="distributeMessages"> <documentation>Send courseMessage + context to outboundadapter (synchronisouly)</documentation> @@ -347,7 +409,7 @@ <assign> <copy> - <from>concat('Process finished (', $CseId, ')')</from> + <from>concat('Process finished (', $EntityId, ')')</from> <to>$DebugIn.parameters/message</to> </copy> </assign> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-08-02 17:51:19
|
Revision: 420 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=420&view=rev Author: pkasprzak Date: 2009-08-02 17:51:03 +0000 (Sun, 02 Aug 2009) Log Message: ----------- * DependencyManager wsdl adaptations * Load context * Fixes in variable assignments 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-08-02 17:48:08 UTC (rev 419) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-08-02 17:51:03 UTC (rev 420) @@ -21,6 +21,7 @@ <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/LoggingManager" location="Common/LoggingManager.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <import namespace="http://cse.campussource.de/wsdl/Common/OutboundAdapter" location="Common/OutboundAdapter.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <partnerLinks> <partnerLink name="LoggingManager" xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" partnerLinkType="tns:LoggingManagerLinkType" @@ -35,14 +36,13 @@ <partnerLink name="IdentityManager" xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" partnerLinkType="tns:IdentityManagerLinkType" partnerRole="IdentityManagerRole"/> - <partnerLink name="DependencyManager" xmlns:tns="http://cse.campussource.de/ejb/DependencyManager" partnerLinkType="tns:DependencyManagerLinkType" - myRole="DependencyManager_Requestor" - partnerRole="DependencyManager_Provider"/> - <partnerLink name="SystemManager" xmlns:tns="http://cse.campussource.de/ejb/SystemManager" partnerLinkType="tns:SystemManagerLinkType" partnerRole="SystemManagerRole"/> + <partnerLink name="DependencyManager" partnerLinkType="ns0:DependencyManagerCourseLinkType" myRole="DependencyManager_Receiver" partnerRole="DependencyManager_Provider"/> + <partnerLink name="OutboundAdapter" xmlns:tns="http://cse.campussource.de/wsdl/Common/OutboundAdapter" partnerLinkType="tns:OutboundAdapter" + partnerRole="OutboundAdapterPortTypeRole"/> - <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" + <partnerLink name="InboundAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" myRole="AddCoursePortTypeRole"/> </partnerLinks> @@ -75,7 +75,7 @@ </correlationSets> <sequence> - <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processCourse" + <receive name="start" createInstance="yes" partnerLink="InboundAdapter" operation="processCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" portType="tns:AddCoursePortType" variable="ProcessCourseIn"/> @@ -328,12 +328,14 @@ <scope name="SystemScope"> <variables> - <variable name="GetCourseContextOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContextResponse"/> - <variable name="GetCourseContextIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContext"/> - <variable name="NotifyIn" messageType="ns0:notifyRequest"/> + <variable name="OutboundProcessCourseOut" xmlns:tns="http://cse.campussource.de/wsdl/Common/OutboundAdapter" messageType="tns:ProcessCourseOperationResponse"/> + <variable name="OutboundProcessCourseIn" xmlns:tns="http://cse.campussource.de/wsdl/Common/OutboundAdapter" messageType="tns:ProcessCourseOperationRequest"/> + <variable name="GetCourseContextOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContextResponse"/> + <variable name="GetCourseContextIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCourseContext"/> + <variable name="NotifyIn" messageType="ns0:notifyRequest"/> - <variable name="System" type="xsd:string"/> - <variable name="EntityId" type="xsd:int"/> + <variable name="System" type="xsd:string"/> + <variable name="EntityId" type="xsd:int"/> </variables> <sequence> @@ -352,7 +354,7 @@ <receive name="receiveNotification" createInstance="no" partnerLink="DependencyManager" operation="notify" - portType="ns0:DependencyManagerNotification" + portType="ns0:DependencyManagerCourseNotification" variable="NotifyIn"> <correlations> <correlation set="DependencyManager" initiate="no"/> @@ -399,10 +401,55 @@ inputVariable="GetCourseContextIn" outputVariable="GetCourseContextOut"/> - <empty name="distributeMessages"> - <documentation>Send courseMessage + context to outboundadapter (synchronisouly)</documentation> - </empty> + <assign name="prepareProcessCourse"> + <!-- Initialize xml skeleton --> + <copy> + <from> + <literal> + <courseMessage xmlns:dt="http://cse.campussource.de/schema/DataTypes"> + <dt:eventTime/> + <dt:event/> + <dt:source/> + <dt:target/> + <dt:course/> + </courseMessage> + </literal> + </from> + <to>$OutboundProcessCourseIn.courseMessage</to> + </copy> + + <!-- Set event --> + <copy> + <from variable="Event"/> + <to>$OutboundProcessCourseIn.courseMessage/dt:event</to> + </copy> + + <!-- Set source system --> + <copy> + <from>'Core'</from> + <to>$OutboundProcessCourseIn.courseMessage/dt:source</to> + </copy> + + <!-- Set target system --> + <copy> + <from variable="System"/> + <to>$OutboundProcessCourseIn.courseMessage/dt:target</to> + </copy> + + <!-- Set course data --> + <copy> + <from>$GetCourseContextOut.parameters/return</from> + <to>$OutboundProcessCourseIn.courseMessage/dt:course</to> + </copy> + </assign> + + <invoke name="processCourse" partnerLink="OutboundAdapter" + operation="processCourse" + xmlns:tns="http://cse.campussource.de/wsdl/Common/OutboundAdapter" + portType="tns:OutboundAdapterPortType" + inputVariable="OutboundProcessCourseIn" + outputVariable="OutboundProcessCourseOut"/> </sequence> </scope> </forEach> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-08-02 19:22:08
|
Revision: 429 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=429&view=rev Author: pkasprzak Date: 2009-08-02 19:21:59 +0000 (Sun, 02 Aug 2009) Log Message: ----------- * Save Ids 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-08-02 18:13:42 UTC (rev 428) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-08-02 19:21:59 UTC (rev 429) @@ -450,7 +450,31 @@ portType="tns:OutboundAdapterPortType" inputVariable="OutboundProcessCourseIn" outputVariable="OutboundProcessCourseOut"/> - </sequence> + + <assign name="prepareCreateMapping"> + <!-- Set cse-id --> + <copy> + <from variable="EntityId"/> + <to>$CreateMappingIn.parameters/cseId/text()</to> + </copy> + <!-- Set system --> + <copy> + <from variable="System"/> + <to>$CreateMappingIn.parameters/system</to> + </copy> + <!-- Set id of the object in the system --> + <copy> + <from>$OutboundProcessCourseOut.eventReply/dt:objectClientId</from> + <to>$CreateMappingIn.parameters/systemId</to> + </copy> + </assign> + + <invoke name="createMapping" partnerLink="IdentityManager" operation="createMapping" + xmlns:tns="http://cse.campussource.de/ejb/IdentityManager" + portType="tns:IdentityManager" + inputVariable="CreateMappingIn"/> + + </sequence> </scope> </forEach> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |