Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Conditionally returning from an external task
System
I want to execute a validation process in an external task and according to the result; I want to return to one task or another in the workflow. How can I do this?
Thanx.
Find more posts tagged with
Comments
Jeremy
In your external task you have something called a "callback".
Using this you can specify which successor to return to.
"0" is the default and returns to the first task, but you can return a "1" to go to the second task listed.
Migrateduser
Convention is generally that callback 0 indicates success, callback 1 indicates error, any other callbacks represent logical branching.
Adam Stoller
I'm not sure that such a convention is "real" - my current customer is actually doing the exact oposite which makes a lot of sense for their workflows - callback 0 is [almost] *always* the error handler (a very nice feature) and other callback values indicate different branches to take based on the results of the external or cgi tasks.
Either approach is probably fine - consistency is the key.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Yeah it makes sense to me that zero is error and all others mean success, but I think I remember externaltask and CGI processes provided with teamsite and by iwpso setting convention the other way (I think they mostly callback zero and don't handle error), which is what I would recommend following for consistency.
But this brings up the issue of error control. I have generally implemented one error control task for each externaltask but this is bad for performance. Alternatively there can be one error control task, but in this case how does the error control task transition back to the appropriate externaltask when the error is resolved?
Adam Stoller
In the workflow I'm referring to - we provide the "administrator" transition menus to all the tasks which could have triggered it - and its up to them to choose the appropriate transition.
There's definitely room for improvement there to provide a more automated way of transitioning back to where things failed - but we haven't had time to work on that (site going live Monday ...)
--fish
(Interwoven Senior Technical Consultant)
Error while creating Enterprise repostry.docx