Forum Stats

  • 3,758,238 Users
  • 2,251,358 Discussions
  • 7,870,124 Comments

Discussions

SelectionFault Catch not working

Piero Mestici
Piero Mestici Member Posts: 76 Blue Ribbon

Hi All,

I have an assign activity with the following copy

  <copy>

      <from>$OutputVar.parameters/return/code</from>

      <to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">$savefileVar/ns5:code</to>

</copy>

It is working fine if $OutputVar.parameters/return/code is not null, while i am getting an error when it is null.

In the Audit trail i get the following indication:

<fault>

<bpelFault>

         <faultType>0</faultType>

         <selectionFailure xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"/>

      </bpelFault>

   </fault>

I put a catch for  bpel:selectionFailure, see code below, to handle it.

<catch faultName="bpel:selectionFailure" faultVariable="selectionFailureVar"

             faultMessageType="bpelx:RuntimeFaultMessage">

         <sequence name="Sequence14">

            <assign name="Assign2">

               <copy>

                  <from>$selectionFailureVar.summary</from>

                  <to expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0">$outputVariable.payload/client:result/ns6:State</to>

               </copy>

            </assign>

         </sequence>

      </catch>

the problem is that the catch is not working, the path is not activated.

I had also a catchAll and when i have the error bpel:selectionFailure the catchAll path is activated.

Can sameone suggest me how to catch the error if the variable is null?

Regards

vladodiasPiero Mestici

Best Answer

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,776 Bronze Crown
    edited Sep 23, 2018 10:37AM Accepted Answer

    Hi User,

    Indeed, as far as I know the selectionFault is not propagated to the BPEL engine. The process just fails. To solve this, you need to set the insertMissingToData or ignoreMissingFromData attributes on the copy rules (right click on it and select the appropriate field).

    If you want to raise a business fault based on the existence of the node, you should add an if statement.

    Regards,

    Martien

    Ps. I encounter lots of people that do not edit their profile, updating their user name and do not end their question with a salute with their name. It talks more comfortable when I can address you by name.

    vladodiasPiero Mestici

Answers

  • Martien van den Akker
    Martien van den Akker Member Posts: 2,776 Bronze Crown
    edited Sep 23, 2018 10:37AM Accepted Answer

    Hi User,

    Indeed, as far as I know the selectionFault is not propagated to the BPEL engine. The process just fails. To solve this, you need to set the insertMissingToData or ignoreMissingFromData attributes on the copy rules (right click on it and select the appropriate field).

    If you want to raise a business fault based on the existence of the node, you should add an if statement.

    Regards,

    Martien

    Ps. I encounter lots of people that do not edit their profile, updating their user name and do not end their question with a salute with their name. It talks more comfortable when I can address you by name.

    vladodiasPiero Mestici
This discussion has been closed.