vMarkusK1985
Expert
Expert

vRA Resource Actions and External source

Jump to solution

Hi,

I am currently working on a vRA resource action with an input in the form as an external source (vRO action). In the vRO itself this works great with the value list from the vRO action, the Action returns a property array. But if I do the whole thing in the vRA, the result of the vRO Action is displayed in the form, but when I execute it, the value is not passed to the actual workflow. "RestorePointToRecover" is the input.

vRO:

vMarkusK1985_0-1649407610696.png

vMarkusK1985_1-1649407670298.png

vRA:

vMarkusK1985_2-1649407705273.png

 

vMarkusK1985_3-1649407742878.png

Property Array Build Snippet:

 

var RestorePoints = new Array();
RestorePoints.push(new Properties({value: jsonObject.Entities.VmRestorePoints.VmRestorePoints[i].UID, label:  jsonObject.Entities.VmRestorePoints.VmRestorePoints[i].CreationTimeUTC}));

 

 

I have read here https://kuklis.github.io/cma/post/vra8-external-inputs-and-input-property-groups/#vro-actions-in-an-... about problems with the property arrays, but the solution is not applicable for the resource action as far as I can see.

What am I doing wrong, or is the property array simply a problem here?

 

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
Labels (3)
0 Kudos
1 Solution

Accepted Solutions
xian_
Expert
Expert

That is odd, just tested with the following action and worked fine:

var RestorePoints = new Array();
for (i = 1; i < 5; i++) {
    RestorePoints.push(new Properties({value: String(i), label: new Date(i, i, i)}));
}
return RestorePoints;

xian__0-1649414689560.png

xian__1-1649414740600.png

 

xian__2-1649414758136.png

 

Here is the Resource Action form:

xian__3-1649414858794.png

 

 

View solution in original post

0 Kudos
4 Replies
xian_
Expert
Expert

Make sure to increase the version number of the workflow called by your form to at least 0.0.1

0.0.0 will not work.

0 Kudos
vMarkusK1985
Expert
Expert

Both, the Workflow and the Action do have versions greater than 0.0.0 . 

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos
xian_
Expert
Expert

That is odd, just tested with the following action and worked fine:

var RestorePoints = new Array();
for (i = 1; i < 5; i++) {
    RestorePoints.push(new Properties({value: String(i), label: new Date(i, i, i)}));
}
return RestorePoints;

xian__0-1649414689560.png

xian__1-1649414740600.png

 

xian__2-1649414758136.png

 

Here is the Resource Action form:

xian__3-1649414858794.png

 

 

0 Kudos
vMarkusK1985
Expert
Expert

Arg, I found the issue...

there was an additional space  between "label: " and the value of the property. vRO was able to handle that, but vRA not.

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos