Setting a timeout for User Interaction in vRealize Orchestrator

When using a User Interaction element in your workflow you might want to have it timeout after a certain amount of time. A user interaction accepts an input parameter of the Date-type that contains the date and time when the user interaction should timeout if it is not answered.
In the image below you see a workflow that contains a Scriptable task used to create the date_time variable to be used in the user interaction.

User Interaction in vRealize Orchestrator with timeout setting

The Javascript code from the Scriptable task is this (without the comments and logging):

timeout_date = new Date();
timeout_date.setTime( timeout_date.getTime() + (86400000) ); 
What is done here is that we get the current date and time and add the amount of milliseconds that represents one day. The math for this is:
1000 (milliseconds) * 3600 (seconds in an hour) * 24 (hours in a day) = 86,400,000
This will make the user interaction timeout after one day. If you would it to timeout after two hours the math would be: 1000 (milliseconds) * 3600 (seconds in an hour) * 2 = 7,200,000
The user interaction element then uses your date_time variable as input to decide when to timeout. When it does it throws an error that would end your workflow with a failed condition. If that is what you want then that's fine. But if you want to take action when it has timeout add a next element to the error channel of the input presentation to handle that. You can see that representation in the below image.

Scriptable task with javascript to set timeout value


Add new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
8 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

vRealize Orchestrator Articles on this website

Follow us on LinkedIn




Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer