VMware Cloud Community
gbuser
Contributor
Contributor
Jump to solution

Using Action result as input for another Action - not possible?

Hi,

I have an action that I call from presentation. Depending on our deployment stages it will return the domains that are possible to select.

Domain ->  GetAction("com.companyxyz.presentation","getDomainsForDeploymentStage").call(#deploymentStage)

Afterwards I want to pick a backup vlan depending on the domain

vlan -> GetAction("com.companyxyz.presentation","getBackupVlan").call(#deploymentStage, #Domain)

However the value "#Domain" is always null in the action script.

If I use GetAction("com.companyxyz.presentation","getBackupVlan").call(#deploymentStage, "domain.local")  it returns the expected value.

Is there a limitation that I can't use an action result as input for another action?


I am using vRO 7.0

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

It's certainly doable.

I assume deploymentStage, Domain and vlan are input parameter for the workflow, right? There are couple of things to check carefully:

  • First, make sure the scripting code of your actions getDomainsForDeploymentStage and getBackupVlan handle null input values gracefully.
  • Then, it depends on which presentation property you've bound the invocations of these actions. Is it Default value? If yes, please change it to Data binding, as default values are computed only once, at early stages of presentation execution, and it is possible that at this moment the value of deploymentStage is still null. On the other hand, data bindings are computed on every change of the field(s) they depend on, so your actions may be invoked first with null deploymentStage but then, when deploymentStage gets its actual value, the data bindings will be re-computed with the non-null deploymentStage.

View solution in original post

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

Hi,

It's certainly doable.

I assume deploymentStage, Domain and vlan are input parameter for the workflow, right? There are couple of things to check carefully:

  • First, make sure the scripting code of your actions getDomainsForDeploymentStage and getBackupVlan handle null input values gracefully.
  • Then, it depends on which presentation property you've bound the invocations of these actions. Is it Default value? If yes, please change it to Data binding, as default values are computed only once, at early stages of presentation execution, and it is possible that at this moment the value of deploymentStage is still null. On the other hand, data bindings are computed on every change of the field(s) they depend on, so your actions may be invoked first with null deploymentStage but then, when deploymentStage gets its actual value, the data bindings will be re-computed with the non-null deploymentStage.
0 Kudos
gbuser
Contributor
Contributor
Jump to solution

Thank you. Actually turned out I made a mistake and configured the domain input value twice.

0 Kudos