VMware Cloud Community
xian_
Expert
Expert
Jump to solution

Poll external approval

I need to implement an approval policy for external approval. By using event subscription I need to run a single workflow polling the external system if the request has been approved or not.

This approval can take long (days) and I do not like the idea of having a running workflow for such a request for days (what if something fails during that timeframe). Is there a better approach? I'd rather have a workflow "waking up" hourly, checking the approval status and keep vRA deployment in pending approval until it gets a yes/no.

I was thinking of implementing an internal vRA approver (some kind of service user) instead of EBS and a scheduled vRO workflow polling the external system and approving the vRA request via API once the external approve happened. Does that make sense, or I'm on a completely wrong path?

1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

I suppose you could do that, but depending on how high this needs to scale I may spawn a separate scheduled workflow for each request setting that ID that checks against your external system. As they are approved/disapproved, those scheduled workflows get torn down. Makes it a little more deterministic without running everything through just one, so if you have a problem there everything is impacted.

View solution in original post

Reply
0 Kudos
4 Replies
daphnissov
Immortal
Immortal
Jump to solution

You can programmatically create a scheduled workflow to check this condition. If the condition is true and the request approved, delete the scheduled task.

xian_
Expert
Expert
Jump to solution

Glad to hear the idea looks viable. I was thinking of a generic sheduled workflow fetching all the pending workitems and checking the external system for each, then "approve" via API.

The policy would have two levels: the first opening the external request and fetching the reqID, the second a "manual" internal approver, to be impersonated by scheduled vRO task.

Reply
0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

I suppose you could do that, but depending on how high this needs to scale I may spawn a separate scheduled workflow for each request setting that ID that checks against your external system. As they are approved/disapproved, those scheduled workflows get torn down. Makes it a little more deterministic without running everything through just one, so if you have a problem there everything is impacted.

Reply
0 Kudos
xian_
Expert
Expert
Jump to solution

Works fine, thanks for the suggestions.

Reply
0 Kudos