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: Expecting a constant, var name or function name
Topic Summary:
Created On: 03/14/2018 11:51 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.
 03/14/2018 11:51 AM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

I created a workflow with an Evaluation object.
I choose a Simple Evaluation, it says:

7 is less than 8

When the workflow comes to this evaluation object I get the message "Expecting a constant, var name or function name".
Any idea why?

Edward
 03/14/2018 12:01 PM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

I tried this example

http://www.networkautomation.c...ile=workflow_loop.zip

it gives the same error
 03/14/2018 12:38 PM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

...

Edited: 03/20/2018 at 08:57 AM by Edward Hulleman
 03/14/2018 02:06 PM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

...

Edited: 03/20/2018 at 08:57 AM by Edward Hulleman
 03/20/2018 09:02 AM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

So I have a very simple workflow, a task updates a worflow variable and depending on that variable a second task is executed.
Why does this give a "Expecting a constant, var name or function name" ?

Click for full image
Click for larger image

 03/20/2018 09:25 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Edward,
From what I see you are comparing to Y and the engine thinks that it is a variable. Please use 'Y' and see what happens. If you were comparing to a number, you could just enter the number, but the engine tries to look up Y and fails. If Y is a variable, then use %Y%.

-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 03/20/2018 10:59 AM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

Hello Hamid,

When I change it to 'Y' I get the same error.

This is what I do:
1. Create a wf variabel vSendMail
2. in the first task the only two actions are a) create a variabel vSendMail treat as parameter and b) set the Variabel to Y
3. In the workflow at the Variables tab I see the vSendMail change from Initial: N to Current: Y
4. Then the evaluation which gives the error. I tried everything: vSendMail is Y, vSendmail is 'Y', vSendmail = "Y", %vSendmail% is Y, %vSendmail% = 'Y', %vSendMail% = "Y", they all give the same error.
 03/20/2018 11:15 AM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

Got it working ONCE by changing the evaluation from Simple to Complex and write %vSendMail% = 'Y'.

Second time it gave the same error again.
I double clicked on the Evaluation object and the old 'simple' code is back.
Tried to change it back to 'Complex' but all the time it changes back to the simple version.

Deleted the Evaluation and created a new one with Complex, save it, run wf, same error, the Evaluation is set back to simple again.

So I had felt lucky for a few seconds
 03/21/2018 08:52 AM
User is offline View Users Profile Print this message

Author Icon
Hamid Noorbakhsh
HelpSystems

Posts: 454
Joined: 07/29/2008

Edward,
This might be an issue as I get same thing. If you get it to work, do not re-edit the evaluation object. The editor tries to best fit the expression, so it might change it on re-edit, so if the 'Complex' works, just save it and use it.

I am further investing this.

-------------------------
Thank you for choosing AutoMate

Hamid Noorbakhsh | Senior Software Engineer
AutoMate | A Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
 03/21/2018 10:31 AM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

It automatically changes from complex to simple.
However I changes the complex one to " %vSendMail% = 'Y' and 1=1 " to enforce it to stay on Complex.
But it didn't help, it still gives the same error.

Does this mean no one uses the evaluation object? How come this was not discovered sooner?
 03/21/2018 02:25 PM
User is offline View Users Profile Print this message

Author Icon
Edward Hulleman
Artisan (200-499)

Posts: 232
Joined: 11/07/2006

Aha, default a green Success lines comes out of the object, but I need to use the blue Result line.

Now it works...
thanks!
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 441 guests browsing this forum, which makes a total of 441 users using this forum.

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

Sitemap Network Automation Software Blog