Is there a way to set error handling to the “Skip message” option on a channel, even if there is no filter?
Currently the only way to apply this setting in the channel configuration seems to be when “Use filter” is checked.
It could help answer your question if you would specify which type of component you wish to set to “Skip message”, or better describe all of this channel components.
This is for a “LLP To Translator” channel that will consume an HL7 ADT feed. I do not need to use a filter. The translator script saves data to a database via custom SQL.
In the case of a database error, I need to rollback the transaction and raise an error using the Lua error() call. I do not want this raised error to stop the channel, however.
Alternatively, I could check “Use filter” just so that I can set the “Skip message” option.
Try to add in routine raising this error, just before you raise it, to call iguana.stopOnError(stop) http://wiki.interfaceware.com/48.html#stopOnError
Don’t set it false upfront, sort of ‘just in case’, but set it false only if you see that next raised error is going to stop your channel.
I didn’t try before to reset it back to true after channel is past critical computing statement (never needed so) but if it possible it could be not bad idea to reset it back to true (depending of’course on existence and length of rest of your code which you may possibly wish to execute after raising that error). If you don’t have much code to execute after raising the error then there is no need to reset, it will reset itself for next message.
You must be logged in to reply to this topic.
Please don't hesitate to take anonymous feedback survey or leave us a comment.