From: <ale...@us...> - 2009-06-18 10:51:25
|
Revision: 262 http://cse-ip.svn.sourceforge.net/cse-ip/?rev=262&view=rev Author: alexloewen Date: 2009-06-18 10:50:10 +0000 (Thu, 18 Jun 2009) Log Message: ----------- added some fault handling to deleteCategory Modified Paths: -------------- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.bpel trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.wsdl trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.bpel 2009-06-16 19:53:37 UTC (rev 261) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.bpel 2009-06-18 10:50:10 UTC (rev 262) @@ -8,7 +8,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:tns="http://enterprise.netbeans.org/bpel/ILIASClientAdapter/DeleteCategory"> + xmlns:tns="http://enterprise.netbeans.org/bpel/ILIASClientAdapter/DeleteCategory" xmlns:ns0="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ns1="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory"> <import namespace="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" location="DeleteCategory.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="http://enterprise.netbeans.org/bpel/ilias-3.10.5-Wrapper" location="ilias-3.10.5-Wrapper.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> <import namespace="urn:ilUserAdministration" location="ilias-3.10.5-fixed.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/> @@ -21,26 +21,98 @@ <variable name="DeleteObjectIn" xmlns:tns="urn:ilUserAdministration" messageType="tns:deleteObjectRequest"/> <variable name="DeleteCategoryOut" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" messageType="tns:deleteCategoryResponse"/> <variable name="DeleteCategoryIn" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" messageType="tns:deleteCategoryRequest"/> + <variable name="DeleteCategoryFault" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" messageType="tns:deleteCategoryRequest" /> </variables> <sequence> - <receive name="start" createInstance="yes" partnerLink="IliasAdapter" operation="deleteCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" portType="tns:DeleteCategoryPortType" variable="DeleteCategoryIn"/> - <assign name="prepareForDeleteCategory"> - <copy> - <from variable="DeleteCategoryIn" part="SID"/> - <to variable="DeleteObjectIn" part="sid"/> - </copy> - <copy> - <from>46</from> - <to variable="DeleteObjectIn" part="reference_id"/> - </copy> - </assign> - <invoke name="DeleteCategoryInvoke" partnerLink="ILIAS" operation="deleteObject" xmlns:tns="urn:ilUserAdministration" portType="tns:ILIASSoapWebservicePortType" inputVariable="DeleteObjectIn" outputVariable="DeleteObjectOut"/> - <assign name="PrepareReply"> - <copy> - <from variable="DeleteObjectOut" part="success"/> - <to variable="DeleteCategoryOut" part="success"/> - </copy> - </assign> - <reply name="return" partnerLink="IliasAdapter" operation="deleteCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" portType="tns:DeleteCategoryPortType" variable="DeleteCategoryOut"/> + <scope name="DeleteCategoryScope" xmlns:tns="urn:ilUserAdministration"> + <faultHandlers> + <catch faultName="sxeh:systemFault"> + <sequence > + <assign name="PrepareForUnsuccessfulReply"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** System Fault was handled: ', ' ')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>false()</from> + <to variable="DeleteCategoryOut" part="success"/> + </copy> + <copy> + <from variable="DeleteCategoryIn"/> + <to variable="DeleteCategoryFault"/> + </copy> + </assign> + <throw faultName="ns1:deleteCategoryFailedSystemFault"/> + </sequence> + </catch> + <catchAll> + <sequence> + <assign name="PrepareForUnsuccessfulReplyOtherFaults"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Some other Fault was handled by DeleteCategory.Bpel: ', ' ')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>false()</from> + <to variable="DeleteCategoryOut" part="success"/> + </copy> + <copy> + <from variable="DeleteCategoryIn"/> + <to variable="DeleteCategoryFault"/> + </copy> + </assign> + <throw faultName="ns1:deleteCategoryFailedUnknownFault" faultVariable="DeleteCategoryFault"/> + </sequence> + </catchAll> + </faultHandlers> + + <sequence> + + <receive name="start" createInstance="yes" partnerLink="IliasAdapter" operation="deleteCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" portType="tns:DeleteCategoryPortType" variable="DeleteCategoryIn"/> + <assign name="prepareForDeleteCategory"> + <copy> + <from variable="DeleteCategoryIn" part="SID"/> + <to variable="DeleteObjectIn" part="sid"/> + </copy> + <copy> + <from>207</from> + <to variable="DeleteObjectIn" part="reference_id"/> + </copy> + </assign> + + <invoke name="DeleteCategoryInvoke" partnerLink="ILIAS" operation="deleteObject" xmlns:tns="urn:ilUserAdministration" portType="tns:ILIASSoapWebservicePortType" inputVariable="DeleteObjectIn" outputVariable="DeleteObjectOut"> + </invoke> + <if name="IfDeleteObjectSucceed"> + <condition>$DeleteObjectOut.success</condition> + <sequence name="Sequence1"> + <assign name="PrepareReply"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** DeleteCategoryInvoke was succesfull ', '')</from> + </sxt:log> + </sxt:trace> + <copy> + <from variable="DeleteObjectOut" part="success"/> + <to variable="DeleteCategoryOut" part="success"/> + </copy> + </assign> + <reply name="return" partnerLink="IliasAdapter" operation="deleteCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" portType="tns:DeleteCategoryPortType" variable="DeleteCategoryOut"/> + </sequence> + <else> + <sequence name="Sequence2"> + <assign name="PrepareForFaultFaildeByIlias"> + <copy> + <from variable="DeleteCategoryIn"/> + <to variable="DeleteCategoryFault"/> + </copy> + </assign> + <throw faultName="ns1:deleteCategoryFailedByIlias" faultVariable="DeleteCategoryFault"/> + </sequence> + </else> + </if> + </sequence> + </scope> </sequence> </process> Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.wsdl =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.wsdl 2009-06-16 19:53:37 UTC (rev 261) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/DeleteCategory.wsdl 2009-06-18 10:50:10 UTC (rev 262) @@ -19,6 +19,9 @@ <operation name="deleteCategory"> <input name="input1" message="tns:deleteCategoryRequest"/> <output name="output1" message="tns:deleteCategoryResponse"/> + <fault name="deleteCategoryFailedByIlias" message="tns:deleteCategoryRequest"/> + <fault name="deleteCategoryFailedSystemFault" message="tns:deleteCategoryRequest"/> + <fault name="deleteCategoryFailedUnknownFault" message="tns:deleteCategoryRequest"/> </operation> </portType> <plnk:partnerLinkType name="DeleteCategory"> Modified: trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel =================================================================== --- trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-06-16 19:53:37 UTC (rev 261) +++ trunk/sandbox/lsf-adapter-demo/ILIASClientAdapter/src/OutboundClientAdapter.bpel 2009-06-18 10:50:10 UTC (rev 262) @@ -15,7 +15,7 @@ xmlns:il_crs="http://cse.campussource.de/schema/ilias/course" xmlns:il_objs="http://cse.campussource.de/schema/ilias/objects" xmlns:dt="http://cse.campussource.de/schema/DataTypes" - xmlns:tns="http://cse.campussource.de/bpel/ILIASClientAdapter/OutboundClientAdapter"> + xmlns:tns="http://cse.campussource.de/bpel/ILIASClientAdapter/OutboundClientAdapter" xmlns:ns1="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory"> <import namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing" location="Common/WS-Addressing.xsd" importType="http://www.w3.org/2001/XMLSchema"/> <import namespace="http://cse.campussource.de/schema/DataTypes" location="Common/CDDM.xsd" importType="http://www.w3.org/2001/XMLSchema"/> @@ -92,147 +92,97 @@ <!-- For testing --> <variable name="ReplyXML" type="xsd:string"/> - + <!-- For Fault Handling --> + <variable name="DeleteCategoryFault" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" messageType="tns:deleteCategoryRequest" /> </variables> <sequence> - <pick name="processObjects" createInstance="yes"> - <onMessage partnerLink="ILIASAdapter" operation="processCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" + <scope name="MainScope"> + <pick name="processObjects" createInstance="yes" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter"> + <onMessage partnerLink="ILIASAdapter" operation="processCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" portType="tns:ILIASClientAdapterPortType" variable="ProcessCourseOperationIn"> - <sequence> - - <assign name="prepareLoginForCourses"> - <copy> - <from>'dummy'</from> - <to>$LoginIn.dummy</to> - </copy> - </assign> - - <invoke name="loginForCourses" partnerLink="Login" operation="login" + <sequence> + <assign name="prepareLoginForCourses"> + <copy> + <from>'dummy'</from> + <to>$LoginIn.dummy</to> + </copy> + </assign> + <invoke name="loginForCourses" partnerLink="Login" operation="login" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/Login" portType="tns:LoginPortType" inputVariable="LoginIn" outputVariable="LoginOut"/> - <assign name="initCourseProcessing"> - <copy> - <from variable="LoginOut" part="SID"/> - <to variable="SID"/> - </copy> - <copy> - <from>$ProcessCourseOperationIn.courseMessage/dt:course/dt:busId</from> - <to>$ObjectBusId</to> - </copy> - <copy ignoreMissingFromData="yes"> - <from>$ProcessCourseOperationIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt: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 --> - <if> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** Branching on course-event: ', $ProcessCourseOperationIn.courseMessage/dt:event)</from> - </sxt:log> - </sxt:trace> - - <!-- Event == "CREATE" --> - <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'CREATE'</condition> - <sequence> - <assign name="prepareAddCourse"> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** addCourse()', '')</from> - </sxt:log> - </sxt:trace> - <copy> - <from>$ProcessCourseOperationIn.courseMessage/dt:course</from> - <to>$AddCourseIn.course</to> - </copy> - <copy> - <from>$SID</from> - <to>$AddCourseIn.SID</to> - </copy> - </assign> - - <invoke name="addCourse" partnerLink="AddCourse" operation="addCourse" - xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/AddCourse" - 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" --> - <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'UPDATE'</condition> + <assign name="initCourseProcessing"> + <copy> + <from variable="LoginOut" part="SID"/> + <to variable="SID"/> + </copy> + <copy> + <from>$ProcessCourseOperationIn.courseMessage/dt:course/dt:busId</from> + <to>$ObjectBusId</to> + </copy> + <copy ignoreMissingFromData="yes"> + <from>$ProcessCourseOperationIn.courseMessage/dt:course/dt:attribute[dt:name = 'clientId']/dt: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 --> + <if> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Branching on course-event: ', $ProcessCourseOperationIn.courseMessage/dt:event)</from> + </sxt:log> + </sxt:trace> + <!-- Event == "CREATE" --> + <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'CREATE'</condition> <sequence> - <assign name="prepareUpdateCourse"> + <assign name="prepareAddCourse"> <sxt:trace> <sxt:log level="info" location="onStart"> - <from>concat('*** updateCourse()', '')</from> + <from>concat('*** addCourse()', '')</from> </sxt:log> </sxt:trace> <copy> <from>$ProcessCourseOperationIn.courseMessage/dt:course</from> - <to>$UpdateCourseIn.course</to> + <to>$AddCourseIn.course</to> </copy> <copy> <from>$SID</from> - <to>$UpdateCourseIn.SID</to> + <to>$AddCourseIn.SID</to> </copy> </assign> - - <invoke name="updateCourse" partnerLink="UpdateCourse" operation="updateCourse" - xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/UpdateCourse" - portType="tns:UpdateCoursePortType" - inputVariable="UpdateCourseIn" - outputVariable="UpdateCourseOut"/> - + <invoke name="addCourse" partnerLink="AddCourse" operation="addCourse" + xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/AddCourse" + portType="tns:AddCoursePortType" + inputVariable="AddCourseIn" + outputVariable="AddCourseOut"/> + <assign name="saveCourseId"> + <copy> + <from>string($AddCourseOut.courseId)</from> + <to>$ObjectClientId</to> + </copy> + </assign> <if> - <condition>$UpdateCourseOut.success</condition> - <assign name="updateCourseSuccess"> + <condition>$AddCourseOut.courseId != 0</condition> + <assign name="addCourseSuccess"> <copy> <from>$STATUS_SUCCESS</from> <to>$ReplyStatus</to> </copy> </assign> <else> - <assign name="updateCourseFailure"> + <assign name="addCourseFailure"> <copy> <from>$STATUS_FAILURE</from> <to>$ReplyStatus</to> @@ -241,271 +191,353 @@ </else> </if> </sequence> - </elseif> - <elseif> - <!-- Event == "DELETE" --> - <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'DELETE'</condition> - <sequence> - <assign name="prepareDeleteCourse"> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** deleteCourse()', '')</from> - </sxt:log> - </sxt:trace> - <copy> - <from>$ProcessCourseOperationIn.courseMessage/dt:course</from> - <to>$DeleteCourseIn.course</to> - </copy> - <copy> - <from>$SID</from> - <to>$DeleteCourseIn.SID</to> - </copy> - </assign> - - <invoke name="deleteCourse" partnerLink="DeleteCourse" operation="deleteCourse" + <elseif> + <!-- Event == "UPDATE" --> + <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'UPDATE'</condition> + <sequence> + <assign name="prepareUpdateCourse"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** updateCourse()', '')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$ProcessCourseOperationIn.courseMessage/dt:course</from> + <to>$UpdateCourseIn.course</to> + </copy> + <copy> + <from>$SID</from> + <to>$UpdateCourseIn.SID</to> + </copy> + </assign> + <invoke name="updateCourse" partnerLink="UpdateCourse" operation="updateCourse" + xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/UpdateCourse" + 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> + <!-- Event == "DELETE" --> + <condition>$ProcessCourseOperationIn.courseMessage/dt:event = 'DELETE'</condition> + <sequence> + <assign name="prepareDeleteCourse"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** deleteCourse()', '')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$ProcessCourseOperationIn.courseMessage/dt:course</from> + <to>$DeleteCourseIn.course</to> + </copy> + <copy> + <from>$SID</from> + <to>$DeleteCourseIn.SID</to> + </copy> + </assign> + <invoke name="deleteCourse" partnerLink="DeleteCourse" operation="deleteCourse" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCourse" 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"> + <if> + <condition>$DeleteCourseOut.success</condition> + <assign name="deleteCourseSuccess"> <copy> - <from>$STATUS_FAILURE</from> + <from>$STATUS_SUCCESS</from> <to>$ReplyStatus</to> </copy> </assign> - </else> - </if> - </sequence> - </elseif> - <else> - <!-- Unrecognized Operation: throw fault? --> - <empty> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** Unknown event!', '')</from> - </sxt:log> - </sxt:trace> - </empty> - </else> - </if> - - </sequence> - </onMessage> - - <onMessage partnerLink="ILIASAdapter" operation="processCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" + <else> + <assign name="deleteCourseFailure"> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </else> + </if> + </sequence> + </elseif> + <else> + <!-- Unrecognized Operation: throw fault? --> + <empty> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Unknown event!', '')</from> + </sxt:log> + </sxt:trace> + </empty> + </else> + </if> + </sequence> + </onMessage> + <onMessage partnerLink="ILIASAdapter" operation="processCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/ILIASClientAdapter" portType="tns:ILIASClientAdapterPortType" variable="ProcessCategoryOperationIn"> - <sequence> - <assign name="prepareLoginForCategories"> - <copy> - <from>'dummy'</from> - <to>$LoginIn.dummy</to> - </copy> - </assign> - - <invoke name="loginForCategories" partnerLink="Login" operation="login" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/Login" + <scope name="CategoryScope"> + <faultHandlers> + <catch faultName="ns1:deleteCategoryFailedSystemFault"> + <sequence> + <assign > + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** SystemFault came from: ', 'deleteCategoryFailed')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </sequence> + </catch> + <catch faultName="ns1:deleteCategoryFailedByIlias" faultVariable="DeleteCategoryFault" faultMessageType="ns1:deleteCategoryRequest"> + <sequence> + <assign > + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** SystemFault Failed By Ilias came from: ', 'deleteCategoryFailed')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </sequence> + </catch> + <catch faultName="ns1:deleteCategoryFailedUnknownFault" faultVariable="DeleteCategoryFault" faultMessageType="ns1:deleteCategoryRequest"> + <sequence> + <assign > + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** SystemFault some other fault: ', 'deleteCategoryFailed')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </sequence> + </catch> + <!-- <catchAll> + <sequence> + <assign > + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Strange Fault came from: ', 'deleteCategory')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$STATUS_FAILURE</from> + <to>$ReplyStatus</to> + </copy> + </assign> + </sequence> + </catchAll> --> + </faultHandlers> + <sequence> + <assign name="prepareLoginForCategories"> + <copy> + <from>'dummy'</from> + <to>$LoginIn.dummy</to> + </copy> + </assign> + <invoke name="loginForCategories" partnerLink="Login" operation="login" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/Login" portType="tns:LoginPortType" inputVariable="LoginIn" outputVariable="LoginOut"/> - - <assign name="initCategoryProcessing"> - <copy> - <from variable="LoginOut" part="SID"/> - <to variable="SID"/> - </copy> - <copy> - <from>$ProcessCategoryOperationIn.categoryMessage/dt:category/dt:busId</from> - <to>$ObjectBusId</to> - </copy> - <copy ignoreMissingFromData="yes"> - <from>$ProcessCategoryOperationIn.categoryMessage/dt:category/dt:attribute[dt:name = 'clientId']/dt: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 --> - <if> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** Branching on category-event: ', $ProcessCategoryOperationIn.categoryMessage/dt:event)</from> - </sxt:log> - </sxt:trace> - - <!-- Event == "CREATE" --> - <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'CREATE'</condition> - <sequence> - <assign name="prepareAddCategory"> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** addCategory()', '')</from> - </sxt:log> - </sxt:trace> + <assign name="initCategoryProcessing"> <copy> - <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> - <to>$AddCategoryIn.category</to> + <from variable="LoginOut" part="SID"/> + <to variable="SID"/> </copy> <copy> - <from>$SID</from> - <to>$AddCategoryIn.SID</to> + <from>$ProcessCategoryOperationIn.categoryMessage/dt:category/dt:busId</from> + <to>$ObjectBusId</to> </copy> + <copy ignoreMissingFromData="yes"> + <from>$ProcessCategoryOperationIn.categoryMessage/dt:category/dt:attribute[dt:name = 'clientId']/dt: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> - <invoke name="addCategory" partnerLink="AddCategory" operation="addCategory" + <!-- Branch on different events --> + <if> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Branching on category-event: ', $ProcessCategoryOperationIn.categoryMessage/dt:event)</from> + </sxt:log> + </sxt:trace> + <!-- Event == "CREATE" --> + <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'CREATE'</condition> + <sequence> + <assign name="prepareAddCategory"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** addCategory()', '')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> + <to>$AddCategoryIn.category</to> + </copy> + <copy> + <from>$SID</from> + <to>$AddCategoryIn.SID</to> + </copy> + </assign> + <invoke name="addCategory" partnerLink="AddCategory" operation="addCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/AddCategory" 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"> + <assign name="saveCategoryId"> <copy> - <from>$STATUS_FAILURE</from> - <to>$ReplyStatus</to> + <from>string($AddCategoryOut.categoryId)</from> + <to>$ObjectClientId</to> </copy> </assign> - </else> - </if> - </sequence> - <elseif> - <!-- Event == "UPDATE" --> - <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'UPDATE'</condition> - <sequence> - <assign name="prepareUpdateCategory"> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** updateCategory()', '')</from> - </sxt:log> - </sxt:trace> - <copy> - <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> - <to>$UpdateCategoryIn.category</to> - </copy> - <copy> - <from>$SID</from> - <to>$UpdateCategoryIn.SID</to> - </copy> - </assign> - - <invoke name="updateCategory" partnerLink="UpdateCategory" operation="updateCategory" + <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" --> + <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'UPDATE'</condition> + <sequence> + <assign name="prepareUpdateCategory"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** updateCategory()', '')</from> + </sxt:log> + </sxt:trace> + <copy> + <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> + <to>$UpdateCategoryIn.category</to> + </copy> + <copy> + <from>$SID</from> + <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"> + <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> + <!-- Event == "DELETE" --> + <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'DELETE'</condition> + <sequence> + <assign name="prepareDeleteCategory"> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** deleteCategory()', '')</from> + </sxt:log> + </sxt:trace> <copy> - <from>$STATUS_FAILURE</from> - <to>$ReplyStatus</to> + <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> + <to>$DeleteCategoryIn.category</to> </copy> + <copy> + <from>$SID</from> + <to>$DeleteCategoryIn.SID</to> + </copy> </assign> - </else> - </if> - - </sequence> - </elseif> - <elseif> - <!-- Event == "DELETE" --> - <condition>$ProcessCategoryOperationIn.categoryMessage/dt:event = 'DELETE'</condition> - <sequence> - <assign name="prepareDeleteCategory"> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** deleteCategory()', '')</from> - </sxt:log> - </sxt:trace> - <copy> - <from>$ProcessCategoryOperationIn.categoryMessage/dt:category</from> - <to>$DeleteCategoryIn.category</to> - </copy> - <copy> - <from>$SID</from> - <to>$DeleteCategoryIn.SID</to> - </copy> - </assign> - <invoke name="deleteCategory" partnerLink="DeleteCategory" operation="deleteCategory" + <invoke name="deleteCategory" partnerLink="DeleteCategory" operation="deleteCategory" xmlns:tns="http://j2ee.netbeans.org/wsdl/ILIASClientAdapter/DeleteCategory" 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"> + + <assign name="deleteCategorySuccess"> <copy> - <from>$STATUS_FAILURE</from> + <from>$STATUS_SUCCESS</from> <to>$ReplyStatus</to> </copy> </assign> - </else> - </if> + + </sequence> + </elseif> + <else> + <!-- Unrecognized Operation: throw fault? --> + <empty> + <sxt:trace> + <sxt:log level="info" location="onStart"> + <from>concat('*** Unknown event!', '')</from> + </sxt:log> + </sxt:trace> + </empty> + </else> + </if> + </sequence> + </scope> + </onMessage> + </pick> + </scope> - </sequence> - </elseif> - <else> - <!-- Unrecognized Operation: throw fault? --> - <empty> - <sxt:trace> - <sxt:log level="info" location="onStart"> - <from>concat('*** Unknown event!', '')</from> - </sxt:log> - </sxt:trace> - </empty> - </else> - </if> - - </sequence> - </onMessage> - </pick> - <assign name="prepareLogout"> <copy> <from variable="SID"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |