Object type null check

We are doing a queryXMLNode and grabbing a node from the input xml into the *Object data type. We want to call a service if this node exists. Hence we are doing a conditional call using a Branch(evaluate labels true) and a sequence with the label (%/rfgContract%!=null). The rfgContract is the variable name for the *Object type.

This approach is giving us internal error when the node existed in the input xml with IS 7.1. The weird part is that the same flow works on 6.5.

Can someone let me know what’s the fix for this problem?

  • Jayadev.

Are you sure it’s the absence of the object that is causing the error? I have an almost exact scenario running without a problem (IS 7.1.1). I know my reply isn’t of any help - but I thought a reassurance that your approach is right might prompt you to look else where for the cause of the error.


Thank you for the reply.

We just rephrased our condition from %/rfgContract%!=null to %/rfgContract% and its working. Looks like the not null check is implicit. If you are familiar with C programming, we do if(ptr). I guess this is similar to that.

  • Jayadev.

i think null should be checked with $null.
i guess if you wud rephrase like this it wud work in 7.1.1. i know its late but hope this helps.


Why don’t you put the variable name in the label after setting the Branch to True without the “%” sign. It will check both if the variable “exist” and not “null”. this → "% " is just an extra thing. Refer to developer’s guide under “Conditional Expressions” look for “Checking for Variable Existence”.