Skip to content

XAware Community

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
XAware 5.6
Need Help
Webinars and Events
Advanced Tutorials
Webinars and Events

You are here: Home arrow Forums
XAware Community Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Error handling in BizComp (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Error handling in BizComp
#5952
prichards (Admin)
Admin
Posts: 319
User Offline Click here to see the profile of this user
Re:Error handling in BizComp 9 Years, 4 Months ago Karma: 18  
Currently, the Multiformat BizComponent assumes that the data is formatted correctly and attempts to process all of the records. You could apply a Functoid (to each field - or the latter fields where text may run out; the actual error message you are seeing means you have more data defined than is present in the current record, i.e. the text is shorter than the length you have defined) to check the value or check for the "ERROR" string and throw an exception - which would then trigger the XAware error handling. This could then be treated as a fatal error by default (and processing stopped), or it could be handled and processing could be continued (review the Help on error handling for further details).

Alternatively, you could code a functoid to return some other default value instead of the error message and possibly log the error in the functoid; or you could transform the result with another (XML Mapper) BizComp and log any error messages with a BizComp. You could also use an extension, or a functoid with the xa:optional instruction, to remove the error elements. There are many ways to approach this depending on your required output.


The File and Multiformat BizComponents both process a single record at a time, so as not to read the entire file at once. So currently, it does catch all of the errors at once, i.e. the final output will contain the error message in every record that is too short (it does not stop processing on the first of these type of errors), which you could then check in the BizDoc. You could pre-process the file to look for all the invalid record lengths before executing the BizComp, but that would require a custom functoid or another pass with Multiformat just to look at the field lengths.

You might also consider logging a Feature Request in our SourceForge Tracker if you have a specific idea on how this error should be trapped in the Multiformat BizComp. (It does seem a little different from the other components, in which an error typically does invoke the error handler.)
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    emo
Error handling in BizComp
ritwik1981 2010/04/15 12:17
    thread link
thread linkthread link Re:Error handling in BizComp
prichards 2010/04/23 19:05
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Community Login

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
Commercial
Free Training
QuickStart Packages
Image 4 Title
Image 5 Title

Visit XAware.com