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: Task Priority doesn't work
Topic Summary:
Created On: 02/20/2015 04:58 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.
 02/20/2015 04:58 AM
User is offline View Users Profile Print this message

Author Icon
BenjaminKorper
Artisan (200-499)

Posts: 231
Joined: 06/18/2009

Hi,

I've built a workflow that works based on a file trigger. However, the workflow can only have one instance running at any given time. Because there will be times where i get two files at the same time i've set the priorities to "Run task if the number of running instances of this task is below the treshold - 1 - Hold task until condition is met". This didn't work.
I've also tried setting this at the task level and i've tried the other 2 options on the priority screen (Run task if the number of running tasks is below the treshold and Run task if no other tasks are running on the agent).
Everything gets ignored.
The file trigger is only set to trigger on files added (not to modified).
What am i doing wrong?

Regards,

Benjamin

 Category Survey


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

 02/20/2015 09:20 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Benjamin,

You are referencing workflow and task priorities which are separate entities and have different functionality. Which priority is having the issue? A workflow priority is at the server level whereas a task priority is at the agent level.




 Category Survey
AutoMate BPA Server 9 version:
Windows version:


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

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
 02/27/2015 12:59 AM
User is offline View Users Profile Print this message

Author Icon
BenjaminKorper
Artisan (200-499)

Posts: 231
Joined: 06/18/2009

Hi Leonard,

Sorry for the slow reply. I referenced them both because i tried both (properties of the worklow under "workflows" and properties of the task under "repository"). Either would solve my problem (it's basically a single task workflow), but neither had the desired effect.
Also i noticed the labeling is probably wrong at the workflow level. The priorities icon at the workflow level is listed under the group "Default Task Properties". Also when you go into the Priority screen from the worflow property level the text says "Specifies whether the task must run exclusively of other tasks....". Shouldn't this say workflow or am i looking at the wrong option under properties. I don't see any other priority button.

Regards,

Benjamin

 Category Survey


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

 03/02/2015 04:55 PM
User is offline View Users Profile Print this message

Author Icon
Valentineo McGowan
HelpSystems

Posts: 766
Joined: 09/03/2013

Hello Benjamin,

Attached is a screenshot of the Workflow Priorities on my sample workflow I created.
This was tested in BPA Server v9.0.5.4.
When the file trigger condition was met, my workflow executed one time 'only', using the parameters selected on the attached screenshot.
Let me know if you have further questions.


 Category Survey


Click for full image
Click for larger image



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

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

Author Icon
BenjaminKorper
Artisan (200-499)

Posts: 231
Joined: 06/18/2009

Hi Valentineo,

I have this set and it doesn't work.
The "do not run" option is not an option for us.

Regards,

Benjamin

 Category Survey


Click for full image
Click for larger image



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

 03/09/2015 10:56 AM
User is offline View Users Profile Print this message

Author Icon
Valentineo McGowan
HelpSystems

Posts: 766
Joined: 09/03/2013

Hello Benjamin,

When you wrote 'The "do not run" option is not an option for us.' did you mean as you were unable to select that option
OR
Your organization cannot use that option because of the methodology of your workflow/task execution?

The 'Do not run task' is available and it has two sub options: 'Success' and 'Failure'

If you use the settings I described previously and test this task within the workflow you will see it will only fire once while it is in process, if attempted to be run again, the 2nd instance will not execute.

 Category Survey


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

Valentineo McGowan | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1 213.738.6966 | F: +1.213.738.7665
 03/09/2015 10:57 AM
User is offline View Users Profile Print this message

Author Icon
BenjaminKorper
Artisan (200-499)

Posts: 231
Joined: 06/18/2009

We cannot use that option because of the methodology

 Category Survey


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

 03/11/2015 09:19 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Benjamin,

Please be more specific about what does and does not work in your scenario. What version of BPA9 are you running? The task priorities apply only at the task level on the agent. For example, let's say you have a workflow with one file trigger and one task, that has priorities configured to only run one instance. If you drop 3 files into the folder that is being monitored, 3 workflows will execute. However, only one task will execute and the other 2 will remain queued until the first task completes. If your goal to prevent the additional workflows from executing?



 Category Survey
AutoMate BPA Server 9 version:
Windows version:


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

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

Author Icon
KumarParameswaran
Expert (100-199)

Posts: 127
Joined: 10/10/2012

I am having the same issue as Benjamin.

Please let me know what level of Priorities needs to be set for the WorkFlow level and Task.

Thanks

 

 

 



 Category Survey
AutoMate BPA Server 9 version: 9.0.3
Windows version: Windows Server 2008 R2
 03/24/2015 03:54 PM
User is offline View Users Profile Print this message

Author Icon
Valentineo McGowan
HelpSystems

Posts: 766
Joined: 09/03/2013

Hello Kumar,

As Leonard stated on March 11th:

"The task priorities apply only at the task level on the agent. For example, let's say you have a workflow with one file trigger and one task, that has priorities configured to only run one instance. If you drop 3 files into the folder that is being monitored, 3 workflows will execute. However, only one task will execute and the other 2 will remain queued until the first task completes. Is your goal to prevent the additional workflows from executing?"

Presently BPA Server 9 does not support 'Workflow Priorities'. This is something we may be considering in an upcoming v10 or v11 release.

 Category Survey


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

Valentineo McGowan | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1 213.738.6966 | F: +1.213.738.7665
 03/25/2015 08:45 AM
User is offline View Users Profile Print this message

Author Icon
KumarParameswaran
Expert (100-199)

Posts: 127
Joined: 10/10/2012

Hi Valentineo,

 

Yes my goal is to prevent the additional workflows from executing when more than one file is being monitored in a folder. I have copied here the sample task that monitors 2 files and the task priorities set up.

 

Please let me know what I am missing.

 

Thanks



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



Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)


Click for full image
Click for larger image

 03/25/2015 03:55 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Kumar,

There are no workflow priorities configurable in BPA Server. Concurrent workflows will always occur. The priorities that you have configured will prevent the subsequent task in the workflow from running concurrently. If you drop 2 files into the monitored folder, 2 workflows will execute but only 1 task. The other task will run as successful but not do anything, as you have specified in your priority settings.

The real issue here is best practices when it comes to building tasks/workflows and their corresponding triggers. Priorities are not intended to correct a process flaw in the task or workflow. Are you looping through the monitored folder when it's triggered and processing all files in the folder? And the reason for the priority setting is to prevent an overlap of processing the same file multiple times? If so, then it's the task/workflow that is not written properly. If you want to keep the looping portion of the task, then you need to replace the file triggers with a schedule trigger. This will remove the necessity of the priority settings. If you want to keep the file triggers, then the task needs to be updated so that it only processes the triggering file.

 Category Survey
AutoMate BPA Server 9 version:
Windows version:


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

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

Author Icon
KumarParameswaran
Expert (100-199)

Posts: 127
Joined: 10/10/2012

Leonard,

 

Thanks for your reply.

 

To answer your questions, yes I am looping through the monitored folder and doing the processing based on the files in that folder. I may not know when the file will be dropped into the folder to run the task, so I keep the task to run based on the file trigger.

 

Could you please suggest how the process flaw can be rectified by rewriting the task.

 

Thank you



 Category Survey
AutoMate BPA Server 9 version: 9.0.3
Windows version: Windows Server 2008 R2
 03/25/2015 04:35 PM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Kumar,

The file trigger populates the following the variables upon triggering:

%AMTrigger.Action% - returns the action that caused the triggering (file added, file deleted, file modified, too many files, one file too big)
%AMTrigger.Filename% - returns the path and filename of the file that was added, modified or deleted
%AMTrigger.NbFiles% - returns the total number of files in the monitored folder
%AMTrigger.Size% - returns the file size in kb of the file or folder being monitored

By adjusting the task to reference %AMTrigger.Filename%, the task will only process the file that caused the triggering. If you drop 3 files into the monitored folder, 3 workflows/tasks would execute but each would be specific to the one file that it triggered against. This would remove the need to loop through the folder since each task will know exactly what file it is working on immediately.

The schedule trigger would still be an option if updating the task may take too long. You would simply increase the frequency of the interval so that there is not too much of a delay between triggering. For example, if a maximum delay of 15 minutes is acceptable, then add a schedule trigger that would fire every 15 minutes. The task would then loop against all files that are in the folder at the time of triggering.



 Category Survey
AutoMate BPA Server 9 version:
Windows version:


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

Leonard Amabile | Director, Cross Platform Support
AutoMate | InterMapper | Skybot | Divisions of HelpSystems
T: +1.213.738.1700 | F: +1.213.738.7665
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 1836 guests browsing this forum, which makes a total of 1836 users using this forum.

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

Sitemap Network Automation Software Blog