Datapolis Process System


Home > User Guide > Creating Workflows > Workflow Designer > States > State Properties > Self-Timers



Self-timer is a mechanism which can automatically execute an action after given amount of time.

Setting-up new Self-Timer

To set-up new self-timer you need to click "Self-Timer" option in State menu and then "Add new self-timer":

In the next menu you will see the following options:

  1. Self-timer name.
    There can be more than one self-timer in the state and the name allows you to recognize the one during the later edit.
  2. Pick up the action which self timer will launch.
    In this listbox you need to choose one action from all actions outgoing from the edited state.
  3. Self timer conditions.
    In most cases you do not need to set the set timer conditions. This option is useful when you would like to use self timer only under specific condition.
    Example: Let see "Simple Approval Process".

    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".

  4. Launching action at specified Date and time.
    Sometimes you need to launch automatically action after specific amount of time (for example after 2 days in particular state) and sometimes you need to launch an action at specific date (for example at 31st of December 2018 at 11.59PM).
    This option allows you to set the specific Date and time when workflow will be launched.

    You may write down the specific date, but you may also calculate it, take it from SharePoint list, from variable etc.. To define the date you may use lookups. The lookup icon is located at the right side of the textbox (see picture below):

    If you want to know more about lookups, read here: Lookups and Functions  
  5. Launching action after specific time.
    You may define after how many Minutes, Hours or Days action will be automatically launched. This option allows you to put specific integer value of minutes, hours, or days or you may calculate it or take from external sources using lookups (see above).

    Notice: Self-Timer will launch the action after specific amount of time only when the action is available. Action may not be available when there is set up logical condition on that action and the value of the condition at the time when self-timer wants to launch the action is "false". Please read more about Conditions.

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.