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
Topic Summary: On success only?
Created On: 04/23/2015 09:40 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.
 04/23/2015 09:40 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Hello,

I read the help file on this topic but it doesn't seem to answer what I'm looking for. I have 2 tasks in a workflow that will link to a Wait object, which links to a 3rd task which I want to run only after the prior 2 have finished.

If either of the 2 prior tasks fail, will it keep the 3rd from running? I only want the 3rd task to wait until the prior 2 have completed (success or fail); as long as only 1 of them are successful then I want the 3rd task to run. If neither are successful, then don't run the 3rd task.

Can I accomplish this with the Wait object?

Thanks!

James



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 04/24/2015 02:10 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante
HelpSystems

Posts: 871
Joined: 02/26/2014

Hello James,

We recommend using something like the evaluation action and arrow to evaluate the success of the previous tasks. You can use a shared variable to determine whether a task is successful, then use the evaluation action to evaluate the result.

In other words, if the previous task is successful, change the variable to 1. If it fails, set to 0. Then evaluate: if the variable = 1, then continue to next task.

 Category Survey


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

Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 04/29/2015 06:48 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

That's true, but the evaluation object doesn't wait when it's encountered. In this case I have two tasks running in parallel and they link to a Wait object, so that the task doesn't continue until both have finished.

However, I'm not really concerned if they are successful or not, just that they have completed, or, no longer running. In other words, if both tasks fail, then there isn't a need to run the 3rd one (after the Wait object), but if one of them is successful, then run the 3rd but ONLY after both tasks 1 and 2 are no longer running.

Make sense?



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 05/01/2015 01:56 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi James,

Would it be possible to post your workflow or a sample that reproduces this issue?

 Category Survey


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

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 05/01/2015 02:05 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Well, there's not really an "issue" per se, I'm just trying to figure out how I would accomplish it. According the Help file, a Wait object must be linked to by a Success flow control. That's fine, but that means if one of my tasks that is linked to the Wait object fails, the Wait condition object will fail even though the other task linking to the Wait object "Succeeds". In my case, I'm not so much concerned with whether or not they succeed, I just want it to Wait until both are completed, regardless of Success or Fail.

Make sense?



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 05/05/2015 06:20 AM
User is offline View Users Profile Print this message

Author Icon
JimBerg
Journeyman (50-99)

Posts: 64
Joined: 03/02/2015

sounds like you need to return success from both of the first two tasks to the wait object.  

If you need to determine if they both failed to run to completion,  I would pass a parameter from each task to the wait object.

 The wait object can pass the parameters to an evaluation object which will stop if both of the tasks return a failure value for their respective parameter. If one of the parameters indicates that the task compleeted, then the evaluation object can pass success to the third task.

Is that clear enough?



 Category Survey
AutoMate BPA Server 9 version: 9.0.4
Windows version: Windows Server 2012
 05/07/2015 01:09 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

In theory, yes. But it doesn't seem to work that way. From my XP and the documentation, you have to link to a Wait object with a Success workflow arrow. So if that prior task fails, then the Wait condition will fail too.



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 05/11/2015 01:59 PM
User is offline View Users Profile Print this message

Author Icon
Valentineo McGowan
HelpSystems

Posts: 766
Joined: 09/03/2013

Hello James,

I will test two scenarios and attempt to provide you an example workflow.

Scenario 1
Three tasks.
One fails the other succeeds.
As long as one succeeds, third task executes.

Scenario 2
Three tasks.
Both tasks are successful at different times.
Third task 'only' executes after both are complete.

 Category Survey


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

Valentineo McGowan | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1 213.738.6966 | F: +1.213.738.7665


Edited: 05/11/2015 at 02:07 PM by Valentineo McGowan
 05/11/2015 02:33 PM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Thank you Valentineo.



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
 05/12/2015 03:56 PM
User is offline View Users Profile Print this message

Author Icon
Valentineo McGowan
HelpSystems

Posts: 766
Joined: 09/03/2013

Hello James,

Attached is the workflow in question.

Scenario 1
Three tasks.
1st two tasks starts simultaneously yet one fails while the other succeeds.
As long as one succeeds, third task executes.

Scenario 2
Three tasks.
1st two tasks starts simultaneously both succeed yet have different durations to completion.
Third task 'only' executes after both are complete.

Let me know if you have questions.

 Category Survey





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

Valentineo McGowan | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1 213.738.6966 | F: +1.213.738.7665
 05/13/2015 07:49 AM
User is offline View Users Profile Print this message

Author Icon
JamesLankford
Artisan (200-499)

Posts: 369
Joined: 11/26/2012

Thank you Valentineo!



 Category Survey
AutoMate BPA Server 9 version: 9.0.5
Windows version: Windows Server 2008 R2


-------------------------
<html />
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 1509 guests browsing this forum, which makes a total of 1509 users using this forum.

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

Sitemap Network Automation Software Blog