Datapolis Process System
Self-Timers
Self-timer is a mechanism which can automatically execute an action after given amount of time.
Setting-up new Self-Timer
We may want that some request would be approved automatically. (For example where the applicant is a person from Management of the company). In this case we may set the condition for the self-timer: "Use this self-timer only where the person created current element belongs to group Management". And this self-timer will launch action "Approve" immediately (after 0 min) when the workflow come to the state "Waiting for Approval".
Setting up more then one self-timer
You may set up as many self-timers in one State as many is needed. The most frequent scenario why more then one self-timer may be needed is shown by the following example: Example: We want to create workflow which check every morning prices of something (for example prices of gold) and if the price for one ounce is less than $1500 the workflow is automatically buying certain amount of gold ounces. The logic of the process looks like this:
There are two self-timers set in state 'Waiting" (A). First self-timer is launching action "buy" (C) immediately after workflow reached state Waiting (after O minutes: see picture below).
This self timer will be launched ONLY when the action "buy" is available. Action "buy" is available conditionally. (Please read here how to set up condition on action). If the condition is not met (is "false") the action "buy" will not be launched. There is second self timer in this state. This self timer is launching action "loop" (B) after one day (see below):
Action "loop" has not set up condition and this self-timer will always launch this action. When the action "loop" is launched workflow is going out and immediately going back to the state "Waiting" Then the self-timer buy is trying again to launch action "buy". If this time the "buy" action is available then the action is launched and workflow is going to the end. If "buy" action is still not available workflow will wait one day and again launch action "loop". this procedure will repeat until the condition of action "buy" is met.