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)
workflow
laj1
I've got a workflow, which consists of two external tasks and an end task. Well actually I have two of them.
When i run the first one, external task 1 (a perl wrapper around iwodstart) runs to completion, calls back into the workflow, and then spawns external task 2, a perl script which sleeps 30 seconds (so I can read the result message from external task 1's callback() )
When I run workflow 2, the perl wrapper does it's call back, and exits as a result of data sanity checking, and never starts the deployment.
The problem is that WF2 is not transitioning in to EX2.
I'm a bit stumped.
Can anybody suggest a place to look for error messages, or should I expect the workflow not to transition when the EX1 calls back with a non-zero retrun code?
Thanks
Len Jaffe
My Heart Is A Flower
Find more posts tagged with
Comments
akshathp
Couple of points:
1. What do you see in your To-Do list? Is the working sitting there on halt? If so, then what task is it pointing at?
2. I am sure you must have confirmed if the IPL files that you are calling with your external tasks are error free. If not, then could you please run them on shell and see if they are good for syntax. Also, if you just execute it with perl, and the code is correct then it should just return message on shell saying task not found.
3. Have you tried running a wft in a debug mode? That way it will create a log file for you with the workflow activity. Please refer to any OOTB worklfow. They have this debug code commented and if you use that code uncommented it will create logs.
4. Also, you can attach you code to this post for people to see what is calling what.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
Migrateduser
Akshat wrote:
Have you tried running a wft in a debug mode? That way it will create a log file for you with the workflow activity. Please refer to any OOTB worklfow. They have this debug code commented and if you use that code uncommented it will create logs.
Just so that no one becomes confused:
The debugging flag that you can use in a wft file (iw_debug_mode) helps you debug the wft at job creation time. It does not effect logging when an external task is executed. However, it can help you determine if the external task (including the command) is being defined the way you expect.
There are debugging flags in wft_opendeploy.ipl (in 5.5.2) that are useful for debugging the execution of a deployment from an external task.
When investigating an errant external task, it is often helpful to inspect the logs iwtrace.log, iwjoberrors.log and iwevents.log.
Brinko Kobrin
Interwoven Staff Engineer
p.s. Until recently, the iwjoberrors.log has not been terribly useful on Windows due to a recently-fixed bug.
Edited by brinko on 11/26/02 03:58 PM (server time).
laj1
>Couple of points:
>1. What do you see in your To-Do list? Is the working sitting >there on halt? If so, then what task is it pointing at?
Not sure how to tell if it is "sitting on halt".
I'm attaching the todo list, and the jobdetails from the job.
>2. I am sure you must have confirmed if the IPL files that you >are calling with your external tasks are error free. If not, >then could you please run them on shell and see if they are >good for syntax. Also, if you just execute it with perl, and >the code is correct then it should just return message on >shell saying task not found.
The perl scripts are indeed correct, and they run to completion.
The second script (Linger.pl) is just a sleep 30, so I can see the results of the call back (even on success - where otherwise all the todo list info would clear from the list), and it runs fine as part of another workflow.
The first script (deployQA2PROD) runs, realizes that the file I'm feeding to OD should not be part of the deployment in question, does a callback (you can see the callback message in the job details) and does and exit(1).
At that point, I expected it to transition to the Linger, but it deos not. So I'm wondering if it has something to do with the exit value...
>3. Have you tried running a wft in a debug mode? That way >it will create a log file for you with the workflow activity. >Please refer to any OOTB worklfow. They have this debug >code commented and if you use that code uncommented it >will create logs.
Not done that yet. Though I did use the debug mode that displays the finished WF XML but does not run the workflow.
Len.
Len Jaffe
My Heart Is A Flower
laj1
So, it turns out that when I changed the callback to return 0 instead of 1, the WF transitioned from the Deploy task to the Linger task as desired.
So now the question is why does the workflow abort when the first external task calls back with a failure status?
Is there some semi-secret syntax to transition on task failure as well as success?
I couldn't find anything clear on the subject in the manual (paper nor PDF), but if it's there, I'd love a pointer to it.
Thanks.
Len.
Len Jaffe
My Heart Is A Flower
akshathp
The task transition on callback happens based on the value you return with your callback.
1. Can you specify or rather attach the script so that we could see how you are using the callback?
2. Is it CallBack() that you are using or iwcallback() or iwcallback CLT?
3. I am sure you know 0 and 1 in this case are not the exit values but the item value for your successorset. So "0" would be the first successor in your successorset and "1" will be second and so on and so forth. Hence you need to check in your workflow, which task is being called at what point in your successortset.
This is all given in the workflow developers guide too.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
articles.zip
Adam Stoller
The callback value is not a return status, but an index into the list of successorsets for the externaltask being executed.
This list of successorsets starts with an index of zero (0) - so if you only have one successorset defined for your externaltask then you can only use a callback index value of 0.
If you have two successorsets, you can do a callback of 0 or 1, etc.
If you only have one successorset and try to use a callback of 1 - the workflow engine will generally complain and not perform the callback (the complaint should show up in either the iwjoberrors.log of iwtrace.log)
Based on what you've indicated - I'm guessing that you were providing a callback value beyond the number of successorset indexes defined for your externaltask.
--fish
(Interwoven Senior Technical Consultant)
laj1
Correct. I was passing a 1 to a single successorset WF.
So why are the callback semantics so poorly documented?
Len.
Len Jaffe
My Heart Is A Flower
Migrateduser
The callback syntax is documented really well in Adam Stoller's Workflow Supplemental Tutorial (can be found and downloaded by searching the Tech Notes with keyword "workflow") and in the Advanced Workflow Developer's course guide. Unfortunately, this key documentation has never made it into the Workflow Developer's Guide. What a surprise.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com