From: <pka...@us...> - 2009-06-03 14:54:47
|
Revision: 235 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=235&view=rev Author: pkasprzak Date: 2009-06-03 14:54:45 +0000 (Wed, 03 Jun 2009) Log Message: ----------- * Generate replies (does not work for now...) Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-06-03 14:54:38 UTC (rev 234) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-06-03 14:54:45 UTC (rev 235) @@ -80,6 +80,9 @@ <variable name="SID" type="xsd:string"/> <!-- Reply vars --> + <variable name="STATUS_SUCCESS" type="xsd:string"/> + <variable name="STATUS_FAILURE" type="xsd:string"/> + <variable name="ObjectBusId" type="xsd:int"/> <variable name="ObjectClientId" type="xsd:string"/> <variable name="ReplyStatus" type="dt:statusType"/> @@ -110,16 +113,23 @@ <from variable="LoginOut" part="SID"/> <to variable="SID"/> </copy> -<!-- <copy> <from>$ProcessCourseOperationIn.courseMessage/course/busId</from> <to>$ObjectBusId</to> </copy> ---> <copy ignoreMissingFromData="yes"> <from>$ProcessCourseOperationIn.courseMessage/course/attribute[name = 'clientId']/value</from> <to>$ObjectClientId</to> </copy> + <!-- Init constants (better alternatives?) --> + <copy> + <from>'SUCCESS'</from> + <to>$STATUS_SUCCESS</to> + </copy> + <copy> + <from>'FAILURE'</from> + <to>$STATUS_FAILURE</to> + </copy> </assign> <!-- Branch on different events --> @@ -154,6 +164,32 @@ portType="tns:AddCoursePortType" inputVariable="AddCourseIn" outputVariable="AddCourseOut"/> + + <assign name="saveCourseId"> + <copy> + <from>string($AddCourseOut.courseId)</from> + <to>$ObjectClientId</to> + </copy> + </assign> + + <if> + <condition>$AddCourseOut.courseId != 0</condition> + <assign name="addCourseSuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="addCourseFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> + </sequence> <elseif> <!-- Event == "UPDATE" --> @@ -180,6 +216,24 @@ portType="tns:UpdateCoursePortType" inputVariable="UpdateCourseIn" outputVariable="UpdateCourseOut"/> + + <if> + <condition>$UpdateCourseOut.success</condition> + <assign name="updateCourseSuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="updateCourseFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> </sequence> </elseif> <elseif> @@ -207,6 +261,24 @@ portType="tns:DeleteCoursePortType" inputVariable="DeleteCourseIn" outputVariable="DeleteCourseOut"/> + + <if> + <condition>$DeleteCourseOut.success</condition> + <assign name="deleteCourseSuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="deleteCourseFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> </sequence> </elseif> <else> @@ -239,11 +311,29 @@ portType="tns:LoginPortType" inputVariable="LoginIn" outputVariable="LoginOut"/> - <assign name="saveSIDForCategories"> + + <assign name="initCategoryProcessing"> <copy> <from variable="LoginOut" part="SID"/> <to variable="SID"/> </copy> + <copy> + <from>$ProcessCategoryOperationIn.categoryMessage/category/busId</from> + <to>$ObjectBusId</to> + </copy> + <copy ignoreMissingFromData="yes"> + <from>$ProcessCategoryOperationIn.categoryMessage/category/attribute[name = 'clientId']/value</from> + <to>$ObjectClientId</to> + </copy> + <!-- Init constants (better alternatives?) --> + <copy> + <from>'SUCCESS'</from> + <to>$STATUS_SUCCESS</to> + </copy> + <copy> + <from>'FAILURE'</from> + <to>$STATUS_FAILURE</to> + </copy> </assign> <!-- Branch on different events --> @@ -277,6 +367,31 @@ portType="tns:AddCategoryPortType" inputVariable="AddCategoryIn" outputVariable="AddCategoryOut"/> + + <assign name="saveCategoryId"> + <copy> + <from>string($AddCategoryOut.categoryId)</from> + <to>$ObjectClientId</to> + </copy> + </assign> + + <if> + <condition>$AddCategoryOut.categoryId != 0</condition> + <assign name="addCategorySuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="addCategoryFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> </sequence> <elseif> <!-- Event == "UPDATE" --> @@ -297,11 +412,31 @@ <to>$UpdateCategoryIn.SID</to> </copy> </assign> + <invoke name="updateCategory" partnerLink="UpdateCategory" operation="updateCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/UpdateCategory" portType="tns:UpdateCategoryPortType" inputVariable="UpdateCategoryIn" outputVariable="UpdateCategoryOut"/> + + <if> + <condition>$UpdateCategoryOut.success</condition> + <assign name="updateCategorySuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="updateCategoryFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> + </sequence> </elseif> <elseif> @@ -328,6 +463,25 @@ portType="tns:DeleteCategoryPortType" inputVariable="DeleteCategoryIn" outputVariable="DeleteCategoryOut"/> + + <if> + <condition>$DeleteCategoryOut.success</condition> + <assign name="deleteCategorySuccess"> + <copy> + <from>$STATUS_SUCCESS</from> + <to>$ReplyStatus</to> + </copy> + </assign> + <else> + <assign name="deleteCategoryFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> + </sequence> </elseif> <else> @@ -366,6 +520,11 @@ <!-- Generate reply(s) --> <assign name="prepareReply"> + <sxt:trace> + <sxt:log level="info" location="onComplete"> + <from>concat('*** Reply: ', $ProcessReplyIn.reply, 'END')</from> + </sxt:log> + </sxt:trace> <copy> <from> <literal> @@ -382,9 +541,32 @@ </copy> </assign> +<!-- + <assign> + <copy> + <from>$ObjectBusId</from> + <to>$ProcessReplyIn.reply/objectBusId</to> + </copy> + + <copy> + <from>$ObjectClientId</from> + <to>$ProcessReplyIn.reply/objectClientId</to> + </copy> + <copy> + <from>$ReplyStatus</from> + <to>$ProcessReplyIn.reply/replyStatus</to> + </copy> + <copy> + <from>sxxf:current-time()</from> + <to>$ProcessReplyIn.reply/replyTime</to> + </copy> + + </assign> + <invoke name="returnReply" partnerLink="ReplyProcessor" operation="processReply" xmlns:tns="http://j2ee.netbeans.org/wsdl/ObjectProcessor/ReplyProcessor" portType="tns:ReplyProcessorPortType" inputVariable="ProcessReplyIn"/> +--> </sequence> </process> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |