VMware Cloud Community
asnev
Contributor
Contributor
Jump to solution

Is it possible to determine the Execution ID of a vRO workflow in a script action

I have a vRO workflow that creates a 'User Interaction' that I want to reply to via REST API using

https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/executions/{executionID}/interaction/

In the workflow, before the 'User Interaction' action I want to use a script action to determine the workflow ID and ececution ID. The first is easy, I use the javascript  workflow.id but I have not been able to find the execution ID of the current workflow.

Any help here would be greatly appreciated.

Reply
0 Kudos
1 Solution

Accepted Solutions
eoinbyrne
Expert
Expert
Jump to solution

The static reference you're using (workflow) is actually a WorkflowToken object which has the following members

pastedImage_0.png

-- credit - vroapi.com

If you want the ID of the workflow you can get it from

workflow.currentWorkflow.id

HTH

View solution in original post

Reply
0 Kudos
5 Replies
eoinbyrne
Expert
Expert
Jump to solution

The static reference you're using (workflow) is actually a WorkflowToken object which has the following members

pastedImage_0.png

-- credit - vroapi.com

If you want the ID of the workflow you can get it from

workflow.currentWorkflow.id

HTH

Reply
0 Kudos
asnev
Contributor
Contributor
Jump to solution

Perfect,

Thankyou

Reply
0 Kudos
kerya
Contributor
Contributor
Jump to solution

But how to get current executionID ?

Reply
0 Kudos
garyhaight
Contributor
Contributor
Jump to solution

was this ever answered - i require the currentWorkflow execution Id and then i need a way to run again if failed. If someone else is trying this please let me know.,

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee
Jump to solution

Here It is 

 

 

var workflowId = workflow.currentWorkflow.id
var executionId = workflow.id