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: Best practice regarding create/set variables within tasks
Topic Summary:
Created On: 07/27/2018 01:49 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.
Answer This question was answered by MariusEriksen, on Monday, July 30, 2018 12:43 AM

Answer:
Thank you. Saves me some lines and makes the task more readable
 07/27/2018 01:49 AM
User is offline View Users Profile Print this message

Author Icon
MariusEriksen
n00b (>6 posts)

Posts: 4
Joined: 06/09/2016

Hi

Regarding the declaration of variables within each task I try to follow best practice. But there is one thing I haven't found in any documentation: Closing of variables.

Details:
Within each task I create all variables at the beginning
<AMVARIABLE NAME="VARsomething" />
During the task I populate the variables with whatever is needed and so on.
But what should I do before the task finishes/closes, if anything?

Should I end the task with nul-ing every variable?
<AMVARIABLE ACTIVITIY="set" VARIABLENAME="VARsomething" />

Or will every variable just disappear when the task closes and I shouldn't worry about it?

 Category Survey
 07/27/2018 06:41 AM
User is offline View Users Profile Print this message

Author Icon
Leonard Amabile
HelpSystems

Posts: 5454
Joined: 05/15/2007

Hi Marius,

That is a good question. No, there is no need to close a variable or NULL the value. Variables and their values are destroyed, for lack of a better word, when the task completes.

 Category Survey


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

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

Author Icon
MariusEriksen
n00b (>6 posts)

Posts: 4
Joined: 06/09/2016

Answer Answer
Thank you. Saves me some lines and makes the task more readable

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

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

Sitemap Network Automation Software Blog