Focal Point
Trapping Process Flow Errors

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/9151010613

January 30, 2009, 10:16 AM
<pharris>
Trapping Process Flow Errors
The process flow I am currently working on executes an oracle sql statement, generates 3 seperate files from it then returns to the calling process. It will be published as a web service so it will have both a beginning and ending schema. The issue at hand is I need to trap and act on any errors generated in the pflow since the calling process needs to have a go-nogo status. Any ideas on the best way to do this?
February 02, 2009, 08:18 AM
<pharris>
So I figured out that the relationship can be changed to on error or on failure (basic stuff I know), but I am at a quandry on who to update the schema of the end object with an updated status and error message
February 03, 2009, 04:33 AM
AdeH
Hi,
Is it the act of creating an error document for output that you're stumped on?
If so, try using a constant agent:
Drag a service object down, choose the "Class Name" of "XDConstantAgent". In the "Constant Output For Emit" you can put what you like, hard coded XML, an SREG value, whatever. This value will be passed on as the output document to the next object, which may be your "End" object.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
February 03, 2009, 12:00 PM
<pharris>
Ok, but I'm not clear on how to get that value into the schema of the end object
February 10, 2009, 11:41 AM
AdeH
I haven't tried it, so can only assume - but isn't that document (the one that's sent to the end object) the one that is sent as a reply to the calling process?
I'd be interested to know if it's not...


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
March 19, 2009, 06:19 PM
Clinton Side-Kick
Any success yet?
AdeH had a good point.
We use the exact method to code the output schema XML using the _CONCAT function to piece everything together and then get the value in by referencing the SREG that contains the value (previously set after retrieval from the Adapter).
You could use a Decision Test to determine what value you set your SREG to.

Sample code:
_CONCAT('<?xml version="1.0" encoding="UTF-8" ?><ROOT_NODE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PARENT_ATTRIB>',SREG(newValue, default_value),'</PARENT_ATTRIB></ROOT_NODE>','')  


Where the output schema is represented inside the _CONCAT function. Note that SREG(newValue, default_value) retrieves the value of the Special Register named newValue. This SREG would previously been set based on the outcome from a Decision Test etc.

This message has been edited. Last edited by: Clinton Side-Kick,


--------------------------------------------------------------------------------
prod: WF/AS 8.2.05; OmniGen;
In FOCUS since 1991