cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
724
Views
5
Helpful
3
Replies
Highlighted
Beginner

How to cast types between UCSD tasks?

Hi,

I'm struggling on what I assumed would be an easy workflow and was hoping someone could give some direction?

 

I'm trying to make a workflow to create a Vmware VM DRS Group and then create a DRS rule for that new VM Group.

I'm trying to use the existing Vmware Host tasks to achieve this. The Create DRS Group works fine, taking in the VM Group as one of the inputs as a gen_text_input type. 

I'm then trying to add a Create DRS Rule task to the workflow, expecting to use the same input or an output value from the previous task for the VM Group. However, the GUI won't allow me to do this as the VM Group within the Create DRS Rule is of a vmwareDRSVMgroupselector type rather than gen_text_input. I can't find a way though the options to cast between these types to pass the input through.

How would this usually be achieved within UCSD? (If possible?). Would it require a custom task to cast the input type and output it in the new type?

Are there any examples available for This?

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

It's definitely a little frustrating that there's no built in way to do this, but you can accomplish it by creating a very simple Custom Workflow Task.

 

Go to Orchestration > Custom Workflow Tasks, and create a new custom task (including name, label and category). On the Inputs, create an input named "a" of whatever type you're getting as an output from the prior task (sounds like gen_text_input). Then on the Outputs, create an output named "b" of whatever input type your next task needs (vmwareDRSVMgroupselector). Skip past the controller page, then get to the script page. In the script box, enter "input.a = output.b", then save the task, and call it in your workflow, in between the two tasks.

View solution in original post

3 REPLIES 3
Highlighted
Beginner

It's definitely a little frustrating that there's no built in way to do this, but you can accomplish it by creating a very simple Custom Workflow Task.

 

Go to Orchestration > Custom Workflow Tasks, and create a new custom task (including name, label and category). On the Inputs, create an input named "a" of whatever type you're getting as an output from the prior task (sounds like gen_text_input). Then on the Outputs, create an output named "b" of whatever input type your next task needs (vmwareDRSVMgroupselector). Skip past the controller page, then get to the script page. In the script box, enter "input.a = output.b", then save the task, and call it in your workflow, in between the two tasks.

View solution in original post

Highlighted

Thank you for this response. It's very helpful and much appreciated.

It certainly looks to be the cleanest option if you can't directly map between types.

Highlighted

Glad it helped! 

 

There's a been a bug report out there for a while (https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvb75348) so hopefully we eventually get an "official" way to do this in the future.

Content for Community-Ad
This widget could not be displayed.