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: Call a public function
Topic Summary:
Created On: 12/12/2017 12:20 PM
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.
 12/12/2017 12:20 PM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

Hello,

I am checking out the functionality of functions.
What I am interested in, can I create a series of functions in one task and call these from other tasks?

I would expect that setting a function to public would make the function appear in other tasks but that is not the case (or I am doing it wrong).

Hope anyone can help!

Regards,

Edward
 12/13/2017 12:25 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hello,

Would it be possible to post your sample task for review? I want to make sure we aren't missing something.

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

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

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

I am not asking for help on a specific task, it is more about the principle: can I create a taks with a number of functions, and call these functions from another task?
So this 'Functions task' for example has a function to write text to a log file. I call this function from another task with 2 parameters: the name of the text file and the text to write.

In this same Functions Task there can be a function that writes to a certain database table. From another task I call this function with a parameter that holds the text.
Or a function that sends a mail.

Do you understand what I mean?


 12/18/2017 10:41 AM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi Edward,

For the most part, no, this isn't possible; however, if you start a subtask in a task, the subtask can call functions of it's parent task.  The parent task cannot call functions of the child task.

I attached an example workflow.






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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
 12/18/2017 11:49 PM
User is offline View Users Profile Print this message

Author Icon
MatsBorg
Apprentice (20-49)

Posts: 31
Joined: 05/29/2012

Hi Devin. If that is the case I really think you should change the documentation. Both me and a collegue thought that it would be possible to access global functions from other tasks but never got it to work. The documentation from BPA 10 needs to be much clearer in this regard. This is what it currently says:

 

You are here:  Home  >  Task Builder  >  Constructing Task Steps  >  Task functions

However, their accessibility, which defines whether or not the function is accessible and visible to an external task, can be defined in the following manners:

Public - Visible and accessible to external tasks.

Private - Not visible or accessible to external tasks. Access is limited to the containing type.

 12/19/2017 03:45 PM
User is offline View Users Profile Print this message

Author Icon
Devin Cannon
HelpSystems

Posts: 398
Joined: 03/17/2016

Hi Mats,

I submitted a request to have this fixed/clarified in the documentation.



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

Devin Cannon | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | 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 1488 guests browsing this forum, which makes a total of 1488 users using this forum.

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

Sitemap Network Automation Software Blog