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: Difference in variable initialization between task and wkflw shared vars
Topic Summary: Unmatched percent signs make problems in wkflw shared vars
Created On: 11/03/2017 11:04 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.
 11/03/2017 11:04 AM
User is offline View Users Profile Print this message

Author Icon
Artisan (200-499)

Posts: 231
Joined: 10/27/2010

We have a workflow where we store the password for a web site in a workflow shared variable. Historically, that site has not allowed percent signs in its passwords, but that policy changed recently and we just switched to our first password that included a percent sign. We were surprised to find that doing so broke the process.

When I tested it out, I found that single, unmatched percent signs are processed differently in shared variable initialization than they are in task variable initialization. When it is run as part of a task, a step like this:

[AMVARIABLE NAME="sMyVarWithPct" VALUE="Ab%defghijkL" /]

runs without error, yielding exactly what you'd expect. But if you copy that out to the shared variables, you get different results.

In BPA, the value of the variable gets truncated to just the first characters before the unmatched percent sign. In, an unmatched percent sign in a shared var initial value halts the entire workflow with an error "Problem initializing the variable engine."

Doubling the percent sign to escape its special use is required for shared variables, but not for task variables. See the attached workflow for an example.

Edited: 11/08/2017 at 02:58 PM by JohnScott
 11/07/2017 01:27 PM
User is offline View Users Profile Print this message

Author Icon
Mary Manzano

Posts: 280
Joined: 03/10/2014

Hi Scott,


The reason you are getting the error "Problem initializing the variable engine." is because you have a shared variable that contains Ab%defghijkL. A variable cannot contain a single % because it will be looking for the second %, thinking this must be a variable. Please double the percent to get the correct output. You must double the percent sign in your password to get the correct outcome.  

Mary Manzano | Technical Consultant
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 6686 on 11/01/2020 at 01:24 AM.
There are currently 2708 guests browsing this forum, which makes a total of 2708 users using this forum.

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

Sitemap Network Automation Software Blog