cancel
Showing results for 
Search instead for 
Did you mean: 

Prblem with Switch step in BPM

Former Member
0 Kudos

Hi all,

I have a problem with a switch step in my BPM. The condition on my BPM is that I have an xpath and that should have a particular constant value. If true, then proceed or else passs through the otherwise branch. The success branch has a transformation and a send step. The otherwise has a control step with an Alert category defined.

So the BPM is like

Receive message --> Switch (XPath condition a particular node must have a value not equal to zero.) --> if tru then transformation and send step otherwise control step.

This all works fine as expected when I pass in the correct message format. The problem is, if I send in a message of a completely different structure, it is still going through the otherwise step of the switch case and not erroring out. The BPM is not erroring out no matter what message I pass in.

Ideally I am expecting it to error out and send an alert message according to the category.

could somebody please help me on this?

Thanks

Karthik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Karthik,

Check this thread..

cheers,

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Thanks for your reply. I already did go through that thread. The switch case works fine for correct conditions and wrong conditions. The problem is, there is no error being generated when the input message is not in a recognizable structure. Switch goes on to otherwise path is I just pass in some random file.

My question is, why dint the BPM error out when the XPath itself failed..meaning the structure itself is wrong?

Please reply.

Thanks

Karthik

moorthy
Active Contributor
0 Kudos

Is this error structure contains Namespace ? if your condition is not having namespace in the xpath/message structure, your SWITCH condition will not work.

Regards,

moorthy

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I resolved it, but it might sound like a workaround. The switch condition works fine. I added another transformation on the otherwise branch of the switch condition and captured the exception there. So when I get some random file, if though it proceeds onto the otherwise branch, it will error out on the mapping and throw an alert.

Thanks for your help.

Karthik

Former Member
0 Kudos

Hi Karthik,

Just check this..

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

cheers,

Prashanth