cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
216
Views
0
Helpful
4
Replies
Highlighted
Beginner

output from task1 not readable in task2

Hello community,

I have a simple problem, but I tried many spellings of the variable name following the guide https://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/ucs-director/orchestration-guide/6-5/cisco-ucs-director-orch… page 9.

I have a simple test-workflow (WLTask) with two custom tasks:

task1:

var String = "Harald";

output.strOut = String;

task2:

var StringHere = ${task1.strOut};

Whatever I do with the variuable the problem is always the syntax of the variable  "${task1.strOut}"

I tired "${custom_task1.strOut}" as well because the log shows the following messages:

---------------------------------------------------------- Log start -------------------------------------------------------------------------------

Oct 02, 2017 15:54:36 UTC Request submitted

Oct 02, 2017 15:54:40 UTC Executing workflow item number 1

Oct 02, 2017 15:54:40 UTC Completed workflow item number 1, with status Completed

Oct 02, 2017 15:54:46 UTC Executing workflow item number 2

Oct 02, 2017 15:54:46 UTC Trigger context executeWorkFlowStep called

Oct 02, 2017 15:54:46 UTC Executing custom action WLTask (custom_task1)

Oct 02, 2017 15:54:46 UTC Executing custom action WLTask (custom_task1)

Oct 02, 2017 15:54:46 UTC Executing custom script for task1

Oct 02, 2017 15:54:46 UTC Processing output: strOut

Oct 02, 2017 15:54:46 UTC Task #2 (WLTask (custom_task1)) completed successfully in 0 seconds

Oct 02, 2017 15:54:46 UTC Input/Output values for Task #2 (WLTask (custom_task1)):

Oct 02, 2017 15:54:46 UTC [Output: strOut = DasWort]

Oct 02, 2017 15:54:46 UTC Completed workflow item number 2, with status Completed

Oct 02, 2017 15:54:49 UTC Executing workflow item number 3

Oct 02, 2017 15:54:49 UTC Trigger context executeWorkFlowStep called

Oct 02, 2017 15:54:49 UTC Executing custom action WLTask (custom_task2)

Oct 02, 2017 15:54:49 UTC Executing custom action WLTask (custom_task2)

Oct 02, 2017 15:54:49 UTC Executing custom script for task2

Oct 02, 2017 15:54:49 UTC Error occured at line # 10

Oct 02, 2017 15:54:49 UTC [Line#10] var StringHere = ${custom_task1.strOut};

Oct 02, 2017 15:54:49 UTC Task: WLTask (custom_task2) failed with error - <eval>:10:18 Expected ; but found { var StringHere = ${custom_task1.strOut}; ^ in <eval> at line number 10 at column number 18, selectedContext=<None>

Oct 02, 2017 15:54:49 UTC Task #3 (WLTask (custom_task2)) failed after 0 seconds

Oct 02, 2017 15:54:49 UTC Input/Output values for Task #3 (WLTask (custom_task2)):

Oct 02, 2017 15:54:49 UTC Completed workflow item number 3, with status Failed

----------------------------------------------------------- Log end -----------------------------------------------------------------------------------------

The error is the same all the time. It doesn't accept the spelling.  I use UCS Director 6.0.1.1. This is a test for more complex workflows, but I need to pass variables from one task to the next.

Everyone's tags (4)
4 REPLIES 4
Cisco Employee

Re: output from task1 not readable in task2

Did you map the output of task one to the input of task two?

FYI they only map if the variable type matches up. Not sure what var type you assigned your custom task var’s?

Beginner

Re: output from task1 not readable in task2

Dear Orf,

yes, that's what I try to do.

Cisco Employee

Re: output from task1 not readable in task2

In the task you should just have

var a=input.A;

output.C=a;

And task 2

var b=input.B;

when you use the tasks in the workflow editor you have to map the output of task 1 to the input to task2.

https://communities.cisco.com/docs/DOC-75812

Enthusiast

Re: output from task1 not readable in task2

The output of previous task can be mapped to next task only within a Workflow only through Workflow Designer. The output of a workflow task cannot be used as a $ variable within another Custom task.

Because of this reason you are getting a Java scripting syntax error.

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.