From: <pka...@us...> - 2009-06-09 07:58:52
|
Revision: 244 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=244&view=rev Author: pkasprzak Date: 2009-06-09 07:58:50 +0000 (Tue, 09 Jun 2009) Log Message: ----------- * Prettying / better debugging Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.bpel trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.wsdl Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel 2009-06-09 07:57:58 UTC (rev 243) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel 2009-06-09 07:58:50 UTC (rev 244) @@ -8,14 +8,17 @@ 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:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/newProcess"> - <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" location="InboundObjectProcessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> - <import namespace="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" location="IdentityMapper/wsdl/IdentityMapperWS/IdentityMapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" location="InboundObjectProcessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <import namespace="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" location="IdentityMapper/wsdl/IdentityMapperWS/IdentityMapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <partnerLinks> - <partnerLink name="IdentityMapper" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" partnerLinkType="tns:IdentityMapper" partnerRole="IdentityMapperPortTypeRole"/> - <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" partnerLinkType="tns:ObjectProcessor" myRole="ObjectProcessorPortTypeRole"/> + <partnerLink name="IdentityMapper" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" partnerLinkType="tns:IdentityMapper" + partnerRole="IdentityMapperPortTypeRole"/> + <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" partnerLinkType="tns:ObjectProcessor" + myRole="ObjectProcessorPortTypeRole"/> </partnerLinks> <variables> <variable name="ProcessCategoryOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" messageType="tns:ProcessCategoryOperationRequest"/> @@ -35,7 +38,7 @@ <assign name="prepareResolveBusIdForCourse"> <sxt:trace> <sxt:log level="info" location="onStart"> - <ns0:from>concat('*** Course: ', $ProcessCourseOperationIn.courseMessage)</ns0:from> + <ns0:from>concat('*** Course: ', sxxf:doMarshal($ProcessCourseOperationIn.courseMessage))</ns0:from> </sxt:log> </sxt:trace> <copy> @@ -59,7 +62,7 @@ <assign name="prepareResolveBusIdForCategory"> <sxt:trace> <sxt:log level="info" location="onStart"> - <ns0:from>concat('*** Category: ', $ProcessCategoryOperationIn.categoryMessage)</ns0:from> + <ns0:from>concat('*** Category: ', sxxf:doMarshal($ProcessCategoryOperationIn.categoryMessage))</ns0:from> </sxt:log> </sxt:trace> <copy> @@ -75,7 +78,11 @@ </onMessage> </pick> - <invoke name="resolveBusId" partnerLink="IdentityMapper" operation="ToBusIdOperation" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" portType="tns:IdentityMapperPortType" inputVariable="ToBusIdOperationIn" outputVariable="ToBusIdOperationOut"> + <invoke name="resolveBusId" partnerLink="IdentityMapper" operation="ToBusIdOperation" + xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" + portType="tns:IdentityMapperPortType" + inputVariable="ToBusIdOperationIn" + outputVariable="ToBusIdOperationOut"> <sxt:trace> <sxt:log level="fine" location="onComplete"> <from>concat('Resolved busId: ', $ToBusIdOperationOut.busId)</from> Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.bpel 2009-06-09 07:57:58 UTC (rev 243) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.bpel 2009-06-09 07:58:50 UTC (rev 244) @@ -8,13 +8,18 @@ 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:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/ReplyProcessor"> + <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" location="ReplyProcessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <partnerLinks> - <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" partnerLinkType="tns:ReplyProcessor" myRole="ReplyProcessorPortTypeRole"/> + <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" partnerLinkType="tns:ReplyProcessor" + myRole="ReplyProcessorPortTypeRole"/> </partnerLinks> <variables> - <variable name="ProcessReplyIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" messageType="tns:processReplyRequest"/> + <variable name="ProcessReplyIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" messageType="tns:processReplyRequest"/> + </variables> <sequence> <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processReply" @@ -22,12 +27,13 @@ portType="tns:ReplyProcessorPortType" variable="ProcessReplyIn"/> - <empty> + <empty name="debugReply"> <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** Recieved reply: ', '$ProcessReplyIn.reply')</from> + <sxt:log level="info" location="onComplete"> + <from>concat('*** Recieved reply: ', sxxf:doMarshal($ProcessReplyIn.eventReply))</from> </sxt:log> </sxt:trace> </empty> + </sequence> </process> Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.wsdl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.wsdl 2009-06-09 07:57:58 UTC (rev 243) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/ReplyProcessor.wsdl 2009-06-09 07:58:50 UTC (rev 244) @@ -9,7 +9,7 @@ </xsd:schema> </types> <message name="processReplyRequest"> - <part name="reply" type="ns:eventReplyMessageType"/> + <part name="eventReply" element="ns:eventReplyMessage"/> </message> <portType name="ReplyProcessorPortType"> <operation name="processReply"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-07-03 13:08:22
|
Revision: 308 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=308&view=rev Author: pkasprzak Date: 2009-07-03 12:46:21 +0000 (Fri, 03 Jul 2009) Log Message: ----------- * ClientIds / ClientInstanceIds are now part of messages * Renameing / restructuring / cleanups Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.wsdl Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel 2009-07-03 12:43:09 UTC (rev 307) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.bpel 2009-07-03 12:46:21 UTC (rev 308) @@ -1,78 +1,92 @@ <?xml version="1.0" encoding="UTF-8"?> -<process - name="InboundObjectProcessor" - targetNamespace="http://enterprise.netbeans.org/bpel/ObjectProcessor/newProcess" - xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" - 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:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable" - xmlns:tns="http://enterprise.netbeans.org/bpel/ObjectProcessor/newProcess"> +<process name="InboundObjectProcessor" + targetNamespace="http://enterprise.netbeans.org/bpel/ObjectProcessor/newProcess" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" + 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:ns0="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/newProcess"> <import namespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" location="InboundObjectProcessor.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" location="IdentityMapper/wsdl/IdentityMapperWS/IdentityMapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> + <import namespace="http://cse.campussource.de/schema/DataTypes" location="Common/CDDM.xsd" importType="http://www.w3.org/2001/XMLSchema"/> + <partnerLinks> <partnerLink name="IdentityMapper" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" partnerLinkType="tns:IdentityMapper" partnerRole="IdentityMapperPortTypeRole"/> + <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" partnerLinkType="tns:ObjectProcessor" myRole="ObjectProcessorPortTypeRole"/> </partnerLinks> + <variables> - <variable name="ProcessCategoryOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" messageType="tns:ProcessCategoryOperationRequest"/> - <variable name="ProcessCourseOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" messageType="tns:ProcessCourseOperationRequest"/> - <variable name="ToBusIdOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" messageType="tns:ToBusIdOperationResponse"/> - <variable name="ToBusIdOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" messageType="tns:ToBusIdOperationRequest"/> + <variable name="ProcessCategoryEventIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" messageType="tns:ProcessCategoryEventRequest"/> + <variable name="ProcessCourseEventIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" messageType="tns:ProcessCourseEventRequest"/> + + <variable name="ToBusIdOperationOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" messageType="tns:ToBusIdOperationResponse"/> + <variable name="ToBusIdOperationIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/IdentityMapper/IdentityMapper" messageType="tns:ToBusIdOperationRequest"/> </variables> + <sequence> <pick name="receiveObject" createInstance="yes"> - <onMessage partnerLink="ClientAdapter" - operation="ProcessCourseOperation" - xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" - portType="tns:ObjectProcessorPortType" - variable="ProcessCourseOperationIn"> + <onMessage partnerLink="ClientAdapter" operation="processCourseEvent" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" + portType="tns:ObjectProcessorPortType" + variable="ProcessCourseEventIn"> <sequence> <assign name="prepareResolveBusIdForCourse"> <sxt:trace> <sxt:log level="info" location="onStart"> - <ns0:from>concat('*** Course: ', sxxf:doMarshal($ProcessCourseOperationIn.courseMessage))</ns0:from> + <ns0:from>concat('*** Course: ', sxxf:doMarshal($ProcessCourseEventIn.courseMessage))</ns0:from> </sxt:log> </sxt:trace> +<!-- <copy> - <from variable="ProcessCourseOperationIn" part="clientInstanceId"/> - <to variable="ToBusIdOperationIn" part="clientInstanceId"/> + <from>$ProcessCourseEventIn.courseMessage/dt:source</from> + <to>$ToBusIdOperationIn.clientInstanceId</to> </copy> +--> <copy> - <from variable="ProcessCourseOperationIn" part="clientObjectId"/> - <to variable="ToBusIdOperationIn" part="clientObjectId"/> + <from>1</from> + <to>$ToBusIdOperationIn.clientInstanceId</to> </copy> + <copy> + <from>$ProcessCourseEventIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt:value</from> + <to>$ToBusIdOperationIn.clientObjectId</to> + </copy> </assign> </sequence> </onMessage> - <onMessage partnerLink="ClientAdapter" - operation="ProcessCategoryOperation" - xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" - portType="tns:ObjectProcessorPortType" - variable="ProcessCategoryOperationIn"> + <onMessage partnerLink="ClientAdapter" operation="processCategoryEvent" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ObjectProcessor" + portType="tns:ObjectProcessorPortType" + variable="ProcessCategoryEventIn"> <sequence> <assign name="prepareResolveBusIdForCategory"> <sxt:trace> <sxt:log level="info" location="onStart"> - <ns0:from>concat('*** Category: ', sxxf:doMarshal($ProcessCategoryOperationIn.categoryMessage))</ns0:from> + <ns0:from>concat('*** Category: ', sxxf:doMarshal($ProcessCategoryEventIn.categoryMessage))</ns0:from> </sxt:log> </sxt:trace> +<!-- <copy> - <from variable="ProcessCategoryOperationIn" part="clientInstanceId"/> - <to variable="ToBusIdOperationIn" part="clientInstanceId"/> + <from>$ProcessCategoryEventIn.categoryMessage/dt:source</from> + <to>$ToBusIdOperationIn.clientInstanceId</to> </copy> +--> <copy> - <from variable="ProcessCategoryOperationIn" part="clientObjectId"/> - <to variable="ToBusIdOperationIn" part="clientObjectId"/> + <from>1</from> + <to>$ToBusIdOperationIn.clientInstanceId</to> </copy> + <copy> + <from>$ProcessCategoryEventIn.categoryMessage/dt:category/dt:attribute[dt:name = 'clientId']/dt:value</from> + <to>$ToBusIdOperationIn.clientObjectId</to> + </copy> </assign> </sequence> </onMessage> Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.wsdl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.wsdl 2009-07-03 12:43:09 UTC (rev 307) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/InboundObjectProcessor.wsdl 2009-07-03 12:46:21 UTC (rev 308) @@ -11,38 +11,46 @@ <xsd:import namespace="http://cse.campussource.de/schema/DataTypes" schemaLocation="Common/CDDM.xsd"/> </xsd:schema> </types> - <message name="ProcessCourseOperationRequest"> - <part name="clientInstanceId" type="xsd:long"/> - <part name="clientObjectId" type="xsd:string"/> + <message name="ProcessCourseEventRequest"> <part name="courseMessage" type="dt:courseMessageType"/> </message> - <message name="ProcessCategoryOperationRequest"> - <part name="clientInstanceId" type="xsd:long"/> - <part name="clientObjectId" type="xsd:string"/> + <message name="ProcessCategoryEventRequest"> <part name="categoryMessage" type="dt:categoryMessageType"/> </message> + <message name="ProcessAccountEventRequest"> + <part name="accountMessage" type="dt:accountMessageType"/> + </message> <portType name="ObjectProcessorPortType"> - <operation name="ProcessCourseOperation"> - <input name="input1" message="tns:ProcessCourseOperationRequest"/> + <operation name="processCourseEvent"> + <input name="input1" message="tns:ProcessCourseEventRequest"/> </operation> - <operation name="ProcessCategoryOperation"> - <input name="input2" message="tns:ProcessCategoryOperationRequest"/> + <operation name="processCategoryEvent"> + <input name="input2" message="tns:ProcessCategoryEventRequest"/> </operation> + <operation name="processAccountEvent"> + <input name="input3" message="tns:ProcessAccountEventRequest"/> + </operation> </portType> <binding name="ObjectProcessorPortTypeBinding" type="tns:ObjectProcessorPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> - <operation name="ProcessCourseOperation"> + <operation name="processCourseEvent"> <soap:operation/> <input name="input1"> <soap:body use="literal"/> </input> </operation> - <operation name="ProcessCategoryOperation"> + <operation name="processCategoryEvent"> <soap:operation/> <input name="input2"> <soap:body use="literal"/> </input> </operation> + <operation name="processAccountEvent"> + <soap:operation/> + <input name="input3"> + <soap:body use="literal"/> + </input> + </operation> </binding> <service name="ObjectProcessorService"> <port name="ObjectProcessorPortTypeBindingPort" binding="tns:ObjectProcessorPortTypeBinding"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-07-22 14:53:36
|
Revision: 352 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=352&view=rev Author: pkasprzak Date: 2009-07-22 14:53:29 +0000 (Wed, 22 Jul 2009) Log Message: ----------- * New style example process Added Paths: ----------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.wsdl Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-22 14:53:29 UTC (rev 352) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process + name="AddCourse" + targetNamespace="http://enterprise.netbeans.org/bpel/ObjectProcessor/AddCourse" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" + 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: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/"/> + <partnerLinks> + <partnerLink name="ClientAdapter" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" partnerLinkType="tns:AddCourse" myRole="AddCoursePortTypeRole"/> + </partnerLinks> + <variables> + <variable name="ProcessCourseIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" messageType="tns:processCourseRequest"/> + </variables> + <sequence> + <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" portType="tns:AddCoursePortType" variable="ProcessCourseIn"/> + <empty name="saveOrUpdateEntityData"> + <documentation>Check entity vs persistence (save / or update [attribute changes?])</documentation> + </empty> + <empty name="handleIds"> + <documentation>Save clientId / generate busId</documentation> + </empty> + <empty name="checkDeps"> + <documentation>Check deps asynchronisly (i.e.) wait for callback, when deps are satisfied +IN: OBJ_ID [course], OBJ_TYPE [type] +OUT: -> callback</documentation> + </empty> + <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> + <empty name="finish"/> + </sequence> +</process> Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.wsdl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.wsdl (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.wsdl 2009-07-22 14:53:29 UTC (rev 352) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="AddCourse" + targetNamespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" + xmlns:ns="http://cse.campussource.de/schema/DataTypes" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + <types> + <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse"> + <xsd:import namespace="http://cse.campussource.de/schema/DataTypes" schemaLocation="Common/CDDM.xsd"/> + </xsd:schema> + </types> + <message name="processCourseRequest"> + <part name="courseMessage" element="ns:courseMessage"/> + </message> + <portType name="AddCoursePortType"> + <operation name="processCourse"> + <input name="input1" message="tns:processCourseRequest"/> + </operation> + </portType> + <binding name="AddCourseBinding" type="tns:AddCoursePortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="processCourse"> + <soap:operation/> + <input name="input1"> + <soap:body use="literal"/> + </input> + </operation> + </binding> + <service name="AddCourseService"> + <port name="AddCoursePort" binding="tns:AddCourseBinding"> + <soap:address location="http://localhost:${HttpDefaultPort}/AddCourseService/AddCoursePort"/> + </port> + </service> + <plnk:partnerLinkType name="AddCourse"> + <plnk:role name="AddCoursePortTypeRole" portType="tns:AddCoursePortType"/> + </plnk:partnerLinkType> +</definitions> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pka...@us...> - 2009-07-24 11:58:51
|
Revision: 366 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=366&view=rev Author: pkasprzak Date: 2009-07-24 11:58:32 +0000 (Fri, 24 Jul 2009) Log Message: ----------- * Further work on AddCourse.bpel (still unfinished) * Added XSLT: Category / Course / Account -> Entity (for generic attribute updates) Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel Added Paths: ----------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/course-example.xml trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/toEntity.xsl Modified: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-24 11:55:46 UTC (rev 365) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCourse.bpel 2009-07-24 11:58:32 UTC (rev 366) @@ -7,65 +7,157 @@ 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: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://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"/> + </partnerLinks> - <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="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"/> - <variables> - <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"/> - </variables> + <!-- CSE-id of the course --> + <variable name="CseId" type="xsd:integer"/> + </variables> - <sequence> - <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processCourse" + <sequence> + <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/AddCourse" portType="tns:AddCoursePortType" variable="ProcessCourseIn"/> -<!-- - <assign name="Assign1"> - <copy> - </assign> ---> - <invoke name="checkIfAlreadyExists" partnerLink="EntityManager" operation="exists" + <assign name="prepareCheckIfAlreadyExists"> + <!-- Set system --> + <copy> + <from>$ProcessCourseIn.courseMessage/dt:source</from> + <to>$ExistsIn.parameters/system</to> + </copy> + <!-- Set systemId --> + <copy> + <from>$ProcessCourseIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt:value</from> + <to>$ExistsIn.parameters/systemId</to> + </copy> + </assign> + + <invoke name="checkIfCourseExists" partnerLink="EntityManager" operation="exists" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" portType="tns:EntityManager" inputVariable="ExistsIn" outputVariable="ExistsOut"/> - <if name="If1"> - <condition>1</condition> - <empty name="Empty1"/> - <else> - <empty name="Empty2"/> - </else> - </if> - <empty name="saveOrUpdateEntityData"> - <documentation>Check entity vs persistence (save / or update [attribute changes?])</documentation> - </empty> - <empty name="handleIds"> - <documentation>Save clientId / generate busId</documentation> - </empty> - <empty name="checkDeps"> - <documentation>Check deps asynchronisly (i.e.) wait for callback, when deps are satisfied + <assign name="saveExistingCseId"> + <copy> + <from>$ExistsOut.parameters/return</from> + <to>$CseId</to> + </copy> + </assign> + + <if> + <condition>$CseId = 0</condition> + <!-- Object new => persist it, etc. --> + <sequence name="CourseIsNew"> + + <assign name="preparePersistCourse"> + <copy> + <from>$ProcessCourseIn.courseMessage/dt:course</from> + <to>$PersistCourseIn.parameters/course</to> + </copy> + </assign> + + <invoke name="persistCourse" partnerLink="EntityManager" operation="persistCourse" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="PersistCourseIn" + outputVariable="PersistCourseOut"/> + + <assign name="saveCreatedCseId"> + <copy> + <from>$PersistCourseOut.parameters/return</from> + <to>$CseId</to> + </copy> + </assign> + + <assign name="prepareCreateMapping"> + <!-- Set cse-id --> + <copy> + <from>$CseId</from> + <to>$CreateMappingIn.parameters/cseId</to> + </copy> + <!-- Set system --> + <copy> + <from>$ProcessCourseIn.courseMessage/dt:source</from> + <to>$CreateMappingIn.parameters/system</to> + </copy> + <!-- Set id of the object in the system --> + <copy> + <from>$ProcessCourseIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt:value</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> + + <else> + <sequence name="CourseAlreadyExists"> + <empty name="peristUpdatedAttributes"> + <documentation>-> EntityManager: persist any attributes that have changed and report if attributes have changed + +-> also upgrade ENTITY-TYPE to ENTITY (from proxy) + +if changed: => UPDATE_EVENT (regardless of relations) + +if not changed => check if relations have changed (if they have => update; else process finished)</documentation> + </empty> + </sequence> + </else> + + </if> + + <empty name="checkRelations"> + <documentation>check if relations have changed (and persist changes); + +if they have => UPDATE event +else: => keep current event</documentation> + </empty> + <empty name="saveOrUpdateEntityData"> + <documentation>Check entity vs persistence (save / or update [attribute changes?])</documentation> + </empty> + <empty name="handleIds"> + <documentation>Save clientId / generate busId</documentation> + </empty> + <empty name="checkDeps"> + <documentation>Check deps asynchronisly (i.e.) wait for callback, when deps are satisfied IN: OBJ_ID [course], OBJ_TYPE [type] -OUT: -> callback</documentation> - </empty> - <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> - <empty name="finish"/> - </sequence> +OUT: -> callback + </documentation> + </empty> + <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> + <empty name="finish"/> + </sequence> </process> Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/course-example.xml =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/course-example.xml (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/course-example.xml 2009-07-24 11:58:32 UTC (rev 366) @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="windows-1252"?> + +<!-- + Document : CDDM.xml + Created on : 24. Juli 2009, 11:33 + Author : pete + Description: + Purpose of the document follows. +--> + +<ns0:course xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' + xmlns:ns0='http://cse.campussource.de/schema/DataTypes' + xsi:schemaLocation='http://cse.campussource.de/schema/DataTypes CDDM.xsd'> + <ns0:busId>5</ns0:busId> + <ns0:eventTime>2000-01-20T12:00:00</ns0:eventTime> + <ns0:attribute> + <ns0:name>attribute1</ns0:name> + <ns0:value>value1</ns0:value> + <ns0:transient>false</ns0:transient> + </ns0:attribute> + <ns0:attribute> + <ns0:name>attribute2</ns0:name> + <ns0:value>value2</ns0:value> + <ns0:transient>false</ns0:transient> + </ns0:attribute> + <ns0:attribute> + <ns0:name>attribute3</ns0:name> + <ns0:value>value3</ns0:value> + <ns0:transient>false</ns0:transient> + </ns0:attribute> + <ns0:categories> + <ns0:category>1</ns0:category> + <ns0:category>2</ns0:category> + <ns0:category>3</ns0:category> + </ns0:categories> + <ns0:parent>5</ns0:parent> + <ns0:workgroups> + <ns0:workgroup>1</ns0:workgroup> + <ns0:workgroup>2</ns0:workgroup> + <ns0:workgroup>3</ns0:workgroup> + </ns0:workgroups> +</ns0:course> Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/toEntity.xsl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/toEntity.xsl (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/toEntity.xsl 2009-07-24 11:58:32 UTC (rev 366) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : toEntity.xsl.xsl + Created on : 24. Juli 2009, 11:24 + Author : pete + Description: + Purpose of transformation follows. +--> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:dt="http://cse.campussource.de/schema/DataTypes" + xmlns="http://cse.campussource.de/schema/DataTypes" + version="1.0"> + + <xsl:output method="xml" + media-type="text/xml" + indent="yes" + encoding="UTF-8" + omit-xml-declaration="no"/> + + <xsl:template match="/"> + <xsl:element name="entity"> + <xsl:copy-of select="//dt:busId"/> + <xsl:copy-of select="//dt:eventTime"/> + <xsl:copy-of select="//dt:attribute"/> + </xsl:element> + </xsl:template> + +</xsl:stylesheet> 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:53:40
|
Revision: 414 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=414&view=rev Author: pkasprzak Date: 2009-07-31 21:53:30 +0000 (Fri, 31 Jul 2009) Log Message: ----------- *AddCategory Added Paths: ----------- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.bpel trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.wsdl Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.bpel (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.bpel 2009-07-31 21:53:30 UTC (rev 414) @@ -0,0 +1,424 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process name="AddCategory" + targetNamespace="http://cse.campussource.de/bpel/ObjectProcessor/AddCategory" + xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" + 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://cse.campussource.de/bpel/ObjectProcessor/AddCategory" + xmlns:ns0="http://cse.campussource.de/ejb/DependencyManager" + xmlns:sxed2="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor2"> + + <import namespace="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" location="AddCategory.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/"/> + + <partnerLinks> + <partnerLink name="LoggingManager" xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" partnerLinkType="tns:LoggingManagerLinkType" + partnerRole="LoggingManagerRole"/> + + <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="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="ClientAdapter" xmlns:tns="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" partnerLinkType="tns:AddCategory" + myRole="AddCategoryPortTypeRole"/> + </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="ProcessCategoryRelationsOut" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" messageType="tns:processCategoryRelationsResponse"/> + <variable name="ProcessCategoryRelationsIn" xmlns:tns="http://cse.campussource.de/ejb/RelationManager" messageType="tns:processCategoryRelations"/> + <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="PersistCategoryOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCategoryResponse"/> + <variable name="PersistCategoryIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:persistCategory"/> + <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="ProcessCategoryIn" xmlns:tns="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" messageType="tns:processCategoryRequest"/> + + <!-- Logging --> + <variable name="DebugIn" xmlns:tns="http://cse.campussource.de/ejb/LoggingManager" messageType="tns:debug"/> + + <!-- CSE-id of the category --> + <variable name="EntityId" type="xsd:integer"/> + <variable name="Event" type="xsd:string"/> + + </variables> + + <correlationSets> + <correlationSet name="DependencyManager" properties="ns0:EntityId"/> + </correlationSets> + + <sequence> + <receive name="start" createInstance="yes" partnerLink="ClientAdapter" operation="processCategory" + xmlns:tns="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" + portType="tns:AddCategoryPortType" + variable="ProcessCategoryIn"/> + <assign name="init"> + <!-- Init logging --> + <copy> + <from>'ObjectProcessor:AddCategory'</from> + <to>$DebugIn.parameters/process</to> + </copy> + </assign> + + <assign name="prepareCheckIfAlreadyExists"> + <!-- Set system --> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:source</from> + <to>$ExistsIn.parameters/system</to> + </copy> + <!-- Set systemId --> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:category/dt:attribute[dt:name = 'clientId']/dt:value</from> + <to>$ExistsIn.parameters/systemId</to> + </copy> + </assign> + + <invoke name="checkIfCategoryExists" partnerLink="EntityManager" operation="exists" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="ExistsIn" + outputVariable="ExistsOut"/> + + <assign name="saveExistingEntityId"> + <copy> + <from>$ExistsOut.parameters/return</from> + <to>$EntityId</to> + </copy> + </assign> + + <if> + <condition>$EntityId = 0</condition> + + <!-- Object new => persist it, etc. --> + <sequence name="CategoryIsNew"> + + <assign name="initCategoryNew"> + <copy> + <from>'CREATE'</from> + <to>$Event</to> + </copy> + </assign> + + <assign> + <copy> + <from>concat('Category [', $ProcessCategoryIn.categoryMessage/dt:category/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="preparePersistCategory"> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:category</from> + <to>$PersistCategoryIn.parameters/category</to> + </copy> + </assign> + + <invoke name="persistCategory" partnerLink="EntityManager" operation="persistCategory" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="PersistCategoryIn" + outputVariable="PersistCategoryOut"/> + + <assign name="saveCreatedEntityId"> + <copy> + <from>$PersistCategoryOut.parameters/return</from> + <to>$EntityId</to> + </copy> + </assign> + + <assign name="prepareCreateMapping"> + <!-- Set cse-id --> + <copy> + <from variable="EntityId"/> + <to>$CreateMappingIn.parameters/cseId/text()</to> + </copy> + <!-- Set system --> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:source</from> + <to>$CreateMappingIn.parameters/system</to> + </copy> + <!-- Set id of the object in the system --> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:category/dt:attribute[dt:name = 'clientId']/dt:value</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> + + <else> + <sequence name="CategoryAlreadyExists"> + + <assign name="initCategoryExists"> + <copy> + <from>'NONE'</from> + <to>$Event</to> + </copy> + </assign> + + <assign> + <copy> + <from>concat('Category [', $ProcessCategoryIn.categoryMessage/dt:category/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"/> + + <assign name="setEntityId"> + <copy> + <from variable="EntityId"/> + <to>$ProcessCategoryIn.categoryMessage/dt:category/dt:busId</to> + </copy> + </assign> + + <empty name="peristUpdatedAttributes"></empty> + + + <assign name="prepareUpdateAttributes"> + <copy> + <from>x:doXslTransform('urn:stylesheets:prepareUpdateAttributesCall.xsl', $ProcessCategoryIn.categoryMessage/dt:category)</from> + <to>$UpdateAttributesIn.parameters</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"/> + + <!-- 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> + + </if> + + <assign name="prepareProcessRelations"> + <copy> + <from variable="EntityId"/> + <to>$ProcessCategoryRelationsIn.parameters/cseId</to> + </copy> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:category</from> + <to>$ProcessCategoryRelationsIn.parameters/category</to> + </copy> + <copy> + <from>$ProcessCategoryIn.categoryMessage/dt:source</from> + <to>$ProcessCategoryRelationsIn.parameters/system</to> + </copy> + </assign> + + <invoke name="processRelations" partnerLink="RelationManager" operation="processCategoryRelations" + xmlns:tns="http://cse.campussource.de/ejb/RelationManager" + portType="tns:RelationManager" + inputVariable="ProcessCategoryRelationsIn" + outputVariable="ProcessCategoryRelationsOut"/> + + <!-- Check, if relations have changed --> + <if> + <condition>not($ProcessCategoryRelationsOut.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="EntityId"/> + <to>$WaitForDependenciesIn.parameters/entityId</to> + </copy> + </assign> + + <invoke name="waitForDependencies" partnerLink="DependencyManager" operation="waitForDependencies" + xmlns:tns="http://cse.campussource.de/ejb/DependencyManager" + portType="tns:DependencyManager" + inputVariable="WaitForDependenciesIn"> + <correlations> + <correlation set="DependencyManager" initiate="yes"/> + </correlations> + </invoke> + + <!-- Nothing to do! --> + <assign name="prepareGetOutboundSystems"> + <copy> + <from> + <literal> + <getOutboundSystems/> + </literal> + </from> + <to>$GetOutboundSystemsIn.parameters</to> + </copy> + </assign> + + <invoke name="getOutboundSystems" partnerLink="SystemManager" operation="getOutboundSystems" + xmlns:tns="http://cse.campussource.de/ejb/SystemManager" + portType="tns:SystemManager" + inputVariable="GetOutboundSystemsIn" + outputVariable="GetOutboundSystemsOut"/> + + <assign> + <copy> + <from>concat('Outbound-systems: ', sxxf:doMarshal($GetOutboundSystemsOut.parameters))</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"/> + + <forEach name="Distribute" parallel="no" counterName="SystemCounter"> + + <startCounterValue>1</startCounterValue> + <finalCounterValue>count($GetOutboundSystemsOut.parameters/*)</finalCounterValue> + + <scope name="SystemScope"> + + <variables> + <variable name="GetCategoryContextOut" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCategoryContextResponse"/> + <variable name="GetCategoryContextIn" xmlns:tns="http://cse.campussource.de/ejb/EntityManager" messageType="tns:getCategoryContext"/> + <variable name="NotifyIn" messageType="ns0:notifyRequest"/> + + <variable name="System" type="xsd:string"/> + <variable name="EntityId" type="xsd:int"/> + </variables> + + <sequence> + + <assign> + <copy> + <from>'Waiting for notification...'</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"/> + + <receive name="receiveNotification" createInstance="no" partnerLink="DependencyManager" + operation="notify" + portType="ns0:DependencyManagerNotification" + variable="NotifyIn"> + <correlations> + <correlation set="DependencyManager" initiate="no"/> + </correlations> + </receive> + + <assign name="setSystem"> + <copy> + <from>$NotifyIn.system</from> + <to>$System</to> + </copy> + <copy> + <from>$NotifyIn.entityId</from> + <to>$EntityId</to> + </copy> + </assign> + + <assign> + <copy> + <from>concat('Received notification: (', $System, ',', $EntityId, ')')</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="prepareGetCategoryContext"> + <copy> + <from variable="System"/> + <to>$GetCategoryContextIn.parameters/system</to> + </copy> + <copy> + <from variable="EntityId"/> + <to>$GetCategoryContextIn.parameters/entityId</to> + </copy> + </assign> + + <invoke name="getCategoryContext" partnerLink="EntityManager" + operation="getCategoryContext" + xmlns:tns="http://cse.campussource.de/ejb/EntityManager" + portType="tns:EntityManager" + inputVariable="GetCategoryContextIn" + outputVariable="GetCategoryContextOut"/> + + <empty name="distributeMessages"> + <documentation>Send categoryMessage + context to outboundadapter (synchronisouly)</documentation> + </empty> + + </sequence> + </scope> + </forEach> + + <assign> + <copy> + <from>concat('Process finished (', $EntityId, ')')</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"/> + + </sequence> +</process> Added: trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.wsdl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.wsdl (rev 0) +++ trunk/sandbox/lsf-adapter-demo/ObjectProcessor/src/AddCategory.wsdl 2009-07-31 21:53:30 UTC (rev 414) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<definitions name="AddCategory" + targetNamespace="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" + xmlns="http://schemas.xmlsoap.org/wsdl/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory" + xmlns:ns="http://cse.campussource.de/schema/DataTypes" + xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> + <types> + <xsd:schema targetNamespace="http://cse.campussource.de/wsdl/ObjectProcessor/AddCategory"> + <xsd:import namespace="http://cse.campussource.de/schema/DataTypes" schemaLocation="Common/CDDM.xsd"/> + </xsd:schema> + </types> + <message name="processCategoryRequest"> + <part name="categoryMessage" element="ns:categoryMessage"/> + </message> + <portType name="AddCategoryPortType"> + <operation name="processCategory"> + <input name="input1" message="tns:processCategoryRequest"/> + </operation> + </portType> + <binding name="AddCategoryBinding" type="tns:AddCategoryPortType"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <operation name="processCategory"> + <soap:operation/> + <input name="input1"> + <soap:body use="literal"/> + </input> + </operation> + </binding> + <service name="AddCategoryService"> + <port name="AddCategoryPort" binding="tns:AddCategoryBinding"> + <soap:address location="http://localhost:${HttpDefaultPort}/AddCategoryService/AddCategoryPort"/> + </port> + </service> + <plnk:partnerLinkType name="AddCategory"> + <plnk:role name="AddCategoryPortTypeRole" portType="tns:AddCategoryPortType"/> + </plnk:partnerLinkType> +</definitions> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |