VMware Cloud Community
Halukkocaman
Enthusiast
Enthusiast
Jump to solution

Auto create scheduled Workflow

Hi All,

I followed the block post below to create a scheduled workflow end of my other workflow. Workflow schedules fine but the inputs doesn't seem to pass to scheduled workflow. Please check to see what is wrong.

Create vCO/vRO scheduled workflow automatically | Chris Berry Blog

This is the script end of my workflow to schedule the workflow 2

pastedImage_1.png

This is from workflow 2 after it runs from schedule

This is the input section,

pastedImage_4.png

This is the variables tab after run and failed.

pastedImage_2.png

As you can see the inputs are not passed from workflow 1 to 2.

Thank you,

Haluk

0 Kudos
1 Solution

Accepted Solutions
filosmith
Enthusiast
Enthusiast
Jump to solution

I wasn't aware you could add multiple properties with a single put. Does it work if you add them individually?

workflowParameters.put("vmss", vmss);

workflowParameters.put("ips", ips);

workflowParameters.put("toAddress", toAddress);

View solution in original post

5 Replies
filosmith
Enthusiast
Enthusiast
Jump to solution

I wasn't aware you could add multiple properties with a single put. Does it work if you add them individually?

workflowParameters.put("vmss", vmss);

workflowParameters.put("ips", ips);

workflowParameters.put("toAddress", toAddress);

Halukkocaman
Enthusiast
Enthusiast
Jump to solution

Looks like you are correct one put cannot carry more than one input. Now the question is how to pass an array? looks like a single item passes fine but arrays did not.

0 Kudos
filosmith
Enthusiast
Enthusiast
Jump to solution

Hmm, it seems to work as expected here. vmss and ips are populated at the end of your workflow 1, and "Not Set" at the beginning of workflow 2?

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

The arrays are passed the same way - using put(key, value).

Which vRO version is this? I tried something similar in my environment, using workflows with inputs of type string and Array/string, and everything worked just fine.

Also, could you check if there are some errors/warnings in your vRO log files around the time the scheduled workflow is launched?

0 Kudos
Halukkocaman
Enthusiast
Enthusiast
Jump to solution

I think I had a bad script on my workflow. Unfortunately I changed my workflow completely before I found the bad code Smiley Happy So now I have a new workflow that only passes string and I used a foreach function to make it multiple input. Thank you for all your help.

0 Kudos