Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Wait Object Still Waiting (#3640)
Topic Summary: Need Workflow to Stop Running
Created On: 03/08/2012 10:30 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 03/08/2012 10:30 AM
User is offline View Users Profile Print this message

Author Icon
DeborahWells
Journeyman (50-99)

Posts: 63
Joined: 07/19/2011

I am working with a complicated workflow (200 Tasks), where different concurrent processing threads converge at a wait object before proceeding.  If a task fails, however, I need to process an Error Task and then the Workflow needs to stop with an error. However, when a task fails above the wait object, the workflow continues to run, as the Wait Object is still 'waiting'.  How do I stop the workflow?  This is critical for what I am doing.  If any piece fails, things can proceed to a wait point, but then it needs to stop/fail.
I have attached a jpeg illustrating an a small example of what is occurring - the error task, and the wait object still 'green' as it's waiting....
Thanks so much in advance for your help!
Deborah.
 

 Category Survey


Edited: 03/08/2012 at 02:21 PM by AutoMate Discussion Moderator
 03/08/2012 11:28 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

Deborah,
this is a very important question, and I was myself recently wondering what is the answer.
It is of the utmost importance that workflows don't stay pending forever.
I'm anxiously waiting for N/A's reply.

I would appreciate the Wait to have a timeout property, so that it can also "fail" and allow proceeding to the exit with a "failure" arrow when after that "timeout period" if all entries did not materialize.

BTW, it would also be interesting to have the Wait condition being able to pause for a certain time (another parameter) before continuing, even if all the inputs are OK. This could enable placing a delay in the workflow without the need of creating a simple delay task.

 Category Survey


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 03/08/2012 12:23 PM
User is offline View Users Profile Print this message

Author Icon
DeborahWells
Journeyman (50-99)

Posts: 63
Joined: 07/19/2011

What I did find interesting was that if the task that errors is directly connected to the Wait Object (ie: the task's success arrow leads to the Wait Object), the workflow does stop, and the following is logged:

'The Wait object has finished, but failed: not all incoming paths followed.'

It is when the task that errors is one or more levels removed from the Wait object (as in my previous example) that the Wait Object keeps waiting. 

All of your suggestions are excellent and I can definitely think of times they are needed. 

I hope that you/we get an answer soon.. this functionality is critical to my workflows (and my project timeline!).  I don't want to start approaching it programmatically until I know what my options are.... 200 tasks is a lot of code change 



 Category Survey
 03/08/2012 02:31 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Deborah,

I have tested this in BPA7, BPA8, and BPA9 with the same results as you are experiencing. I have added this to our tracking database for the developer to answer but, if it is a bug, it won't be fixed in BPA7. Unfortunately, I can only recommend that you upgrade to BPA9 where you can take advantage of workflow time out settings.





 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 03/08/2012 02:47 PM
User is offline View Users Profile Print this message

Author Icon
DeborahWells
Journeyman (50-99)

Posts: 63
Joined: 07/19/2011

I will be moving to v9 in the next couple of weeks; however, a workflow timeout does not help me.  We don't like to throw timeout errors (I have a number of duration monitors that alert when something has been running too long), as processing time fluctuates depending on the month/quarter/year end, etc.  If we did try that , we would have to set the timeout to the extreme threshold (ie: 20 hours), but if my workflow encountered an error 30 minutes in, I don't want my workflow pending for 19 hours and 30 minutes more.  This is a monthly production process that needs to take place in a tight window.

Several follow up questions:

1) If it is working 'as designed', what is the suggestion on how to accomplish what I need to do?  How can I programmatically stop a workflow and/or a wait object neatly?  These are actually taking place in a sub-workflow, so the workflow needs to error, as it triggers a different processing path in the parent workflow due to the error as well.  But yet the threads in the sub workflow without errors need to continue to process until the wait object.  We are automating a very complex and sensitive ETL process.

2) if it is deemed a bug, what is the ETA on a fix for v9?

Thanks so much.



 Category Survey
 03/08/2012 10:32 PM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

There is an additional feature needed in BPA9: have an "Automate" action to stop the current workflow, with (success?)/failure/abort option.
This way after a failing task, another one could abort the workflow, or the failing task itself could do it.
Currently the Automate action group has only start task and stop task. Besides other suggestions I made elsewhere, stop workflow would be a useful feature.
It is to be determined if that action should leave the running tasks of this workflow run to their normal end or also fiercely abort them. Another option ?

 Category Survey


-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 03/09/2012 06:39 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Deborah,

Perhaps adding a Wait object between SendEmail and SendWaitEmail actions would alleviate the problem we well. Is there any difference in the 3 different SendEmail or SendWaitEmail actions? Perhaps we can streamline this even further by incorporating the tasks in one? I know this is just an example that you have provided but I think we can find other avenues to work around the Wait issue.





 Category Survey


-------------------------

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 03/09/2012 08:53 AM
User is offline View Users Profile Print this message

Author Icon
DeborahWells
Journeyman (50-99)

Posts: 63
Joined: 07/19/2011

Leonard,

Thank you for your sugggestion, but you are correct. The illustration I provided was just a simple test case for me to determine how the Wait Object was working. My actual workflow is significantly more complicated, as it contains 200 tasks and 27 wait objects where different processing streams have to converge. Hence my interest in this!

I am currently working through a solution, but I am thinking along these lines:

Upon error, set a shared variable indicating there was an error via an Error Task.
Have the error task process flow pointing to the related wait object further down in the processing stream of the task in error (so the Wait Object can successfully finish).
Immediately after all wait objects, have the first task be a check for the Error Flag shared variable.
If there is an error, stop the task, which would eventually stop all the processing threads with and without errors.

I need to thoroughly test this, but I am thinking that this would stop all the processing streams neatly and at a definable point (important for restarting the process), which would in turn stop the workflow (with an error since they all errored). Any thoughts are greatly appreciated!

Lastly, I whole-heartedly agree with Jean. The ability to issue a Stop Workflow is absolutely needed. Consider the case of sub/child workflows. These workflows simply become an 'object' in their parent, just like a task, and need to be fully controllable.

Thanks so much all!

 Category Survey
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1692 guests browsing this forum, which makes a total of 1692 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog