The first of your fetch examples was correct. This is actually a problem with the XML Fetch step.
<br>
<br>This issue (Failure due to empty attributes field) will be fixed in an upcoming release of TeleFlow.
<br>
<br>In the meantime, you have two possible workarounds:
<br>
<br>1) You can create some false attributes in the node you are fetching, and retrieve them.
<br>Sample XML for this:
<br><?xml version="1.0" encoding="utf-8" ?>
<br><RESPONSE>
<br><NAME UNUSED="UNUSED">Card Balance</NAME>
<br></RESPONSE>
<br>
<br>Attributes field: UNUSED
<br>
<br>This will create a variable called @UNUSED, but will work.
<br>
<br>2) Put "UNUSED" in the attributes field. This will cause the step to go down the FAIL path when it tries to retrieve the attribute that isn't in the XML document. You can route the FAIL (bomb) path of the XML fetch to a Compare step. Use that compare to see if the node was empty. If it is empty, assume the fetch failed for some reason other than the attribute problem, or that the node was indeed empty. If it is populated with data, this simply means the step failed because of the missing attribute. You should create the empty local or global variable to receive the node data prior to the XML Fetch.
|