VMware Cloud Community
zwal1986
Enthusiast
Enthusiast

Anyway to set max workflow run time for all workflows?

Similar to how vRA utilizes workflow stub timeouts in an XML document on the IaaS server, is there a way in vRO to configure a workflow timeout that would automatically cancel/fail all workflows when it exceeds?

Thanks in advance!

Reply
0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

Hi,

I think there is nothing out of the box to configure such timeout, but you can do it yourself.

The idea is to write a workflow which will retrieve all workflow tokens from vRO server (using scripting method Server.findAllForType("WorkflowToken")), then will iterate over the tokens, check if the token is not completed yet, compute the time the workflow is running for (by subtracting the token start time token.startDateAsDate from the current system time), and if the running time is larger that the desired timeout, cancel the token using token.cancel() scripting method.

Once you have this workflow, you can either schedule it to be executed with some recurrence, or wrap the workflow scripting code in an infinite loop.

Let me know if you need help implementing the above algorithm.

Reply
0 Kudos