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)
retry option
Enthu
Hi all,
Is there any way to set the option for threshold limit for retry option for external task.
In my workflow I need to allow user to set the maximum limit for retry option for external task and wait time to retry deployment if servers failed. This task will be used to deploy the files to production server. My environment is TS 6.0.1, O.D. - 5.6 and win2k3.
Find more posts tagged with
Comments
Adam Stoller
There are two different options here:
In iw.cfg you can have the following entry:
[workflow]
external_task_retry_wait=1m
Where the description for that setting is:
Set external_task_retry_wait to the number of minutes you want the workflow engine to wait before it re-attempts to run an external task after failing. Defaults to 1 minute if not specified.
In your wft - you can specify a timeout transition specification like:
<timeout v="+000100">
<succ v="
next-task-name
"/>
</timeout>
The first entry indicates how many times to retry launching the externaltask script (e.g. if too many processes are running when it first tries), the second entry indicates how long to leave the task active before automatically transitioning to some other task (which could transition right back to the same task)
The other option is to build some sort of wait-time into the externaltask script itself - however in this case, where you don't really have forking of processes (on Windows - unless that changed in 2k3?) you'll probably find it best to use the task's timeout element instead.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Enthu
Hi Adam,
Thanks for your reply but I am unable to see first entry.................... In your post you said "The first entry indicates how many times to retry launching the externaltask script "
jbonifaci
He was referring to this:
In iw.cfg you can have the following entry:
[workflow]
external_task_retry_wait=1m
kshitiz
Hi Enthu,
According to me you should proceed as follows:
If your task fails to deploy the file, you make a transition to another external task to check the number of retries. The number of retries can be stored and retrieved in a job variable. So in this external task you check for number of retries with the maximum allowed. If the number is less than the max allowed, you again make a transition to external task to deploy the file. If the number has exceeded the number of retries, you make transition to the next task.
Also, you can put some waiting time in the new external task.
I hope this helps.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Enthu
Kshitij, Thanks for your suggestion. But my question is "How to control max number of retry?". As per the requirement client needs a dropdown in the workflow from where max number of retry can be choosen. But I dont know if it is possible or not and if it is then how can it be achieved ......
kshitiz
Of couse, that can be handled as well. If the maximum number of retries is entered by user, you can provide a drop-down at the workflow initiation form.
and you can pass it on to your external task through task variable. That won't be any problem i guess.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
Enthu
But after getting that value how will i control the max number of retry in my external task? Do you have some sample code to implement this ?
Dx_Drill_Down_Report.rptdesign
kshitiz
I'm attaching sample codes for the external task and the workflow(.wft).
I hope it helps. You can modify the code according to your needs. But from my understanding this should solve your purpose.
Kshitiz Sharma
BT Wholesale | CMS
Mahindra British Telecom
jbonifaci
Enthu,
All you need to do is have task variables with the max number of tries and the current number of tries. When the task times out, it times out to an external task that increments the current number of tries and if the current number is less than max, transition back to the task you are retrying. If it is greater than, transition to the next task in the workflow.
Enthu
Thanks Kshitij and jeff for providing me the solutions.
image.JPG