VMware Cloud Community
orian
Hot Shot
Hot Shot
Jump to solution

return type of action

Hi,

Is it possible to configure a return type of an action to be: Sting (not array\String), and then use this action in a presentation of a workflow?

Only if I configured it to be array\String it show me info when I run the workflow...

0 Kudos
1 Solution

Accepted Solutions
orian
Hot Shot
Hot Shot
Jump to solution

I use Data binding, and now it works.

Thanks!

View solution in original post

0 Kudos
7 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

Yes, it is certainly possible the return type of an action to be string.

How exactly are you using it in the presentation?

0 Kudos
orian
Hot Shot
Hot Shot
Jump to solution

I create an input with type String

In the presentation I define a Predefined List of elements GetAction("actionpath","actionName").call(#parameters)

The action can returns one string...

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Predefined list of elements presentation property implies that the user will get a list with several elements to choose from. Hence the action bound to this property should return an array (in your case, Array/string), not a single element.

0 Kudos
orian
Hot Shot
Hot Shot
Jump to solution

What should I choose instead for the list in the presentation?

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Not sure what you mean, but the general rule is - for input parameter of type X, you can add Predefined list of elements property and bind it to an action that has return type Array/X.

0 Kudos
orian
Hot Shot
Hot Shot
Jump to solution

My action returns a single string.

return type is: String

0 Kudos
orian
Hot Shot
Hot Shot
Jump to solution

I use Data binding, and now it works.

Thanks!

0 Kudos