Previous page | Process Management | Next page |
Using delays and repeats |
Delays allow you to postpone actions rather than executing them immediately. Actions placed as children of the Delay in the event tree will have their execution delayed by the period specified in the Delay. The delay will schedule the child actions (shown indented in the tree) to be executed later, and the current event will continue to execute any actions below the delay (not indented). Why delay?Often you want to do things immediately, but there are lots of cases when it’s useful to delay
Configuring the length of delayThere are a number of ways to specify how long the delay should be – or when the delay should end. Settings Delay tab Delay until This defines the moment when the delay should end, and child actions should start to be executed. Choose: Now No delay – but useful when adjusted – see below Date Specify a date and time when the delay should end. Start of Next Choose from Day, Month, Year Query field Choose a query and field that contains the date and time to be used Adjust Select 'later' or 'earlier' to define the direction the adjustment should be made in, relative to the end-point defined above. Timespan Enter an explicit timespan Query field - choose a query and field that contains a timespan to be used To use no adjustment, choose Timespan and leave the timespan fields blank. Repeat tab Repeat To enable repeats, check the Repeat checkbox Every Choose how often the child actions should be executed: Timespan Enter a timespan for the interval between executions Query field Choose a query and field that contains a timespan to be used Until Forever The child actions will be repeated an unlimited number of times Number of times The child actions will be repeated the specified number of times. Choose: Number Enter the number of times to repeat Query field Choose a query and field that return the number of times to repeat Date The child actions will be repeated until the specified date. Choose: Date Enter the date after which the child actions will not be repeated Query field Choose a query and field that return the date after which the child actions will not be repeated
Queries tab This tab allows you to specify one or more queries in support of the values on the other tabs The underlying Queries must first be configured in Query components Add, Edit and Remove buttons allow for queries to be added to the dialog. This does not affect the underlying Query components themselves, just their inclusion on this dialog. Each entry here is shown as a Query Embed dialog The options shown on this dialog is a simplified version of the general Query Embed dialog shown when embedding a Query on a text surface, with the following differences:
Usage notesOnce the delay, with any adjustment has been computed, this results in a date and time, at which time the system return to the event tree, and looks to see what actions to execute. If the moment turns out to be in the past, then this will happen straight away (although events are evaluated each minute so in practice there may be a delay of up to 60 seconds). If a number of delays end at the same moment, the system will work through them as quickly as it can, but they won’t all happen at the same instant, and you should not make assumptions about the order of execution. How delays affect when criteria are evaluated.The event tree can contain multiple criteria objects, delay objects, and action objects. The system starts at the top of the tree, and executes each object in turn. When a delay object is encountered, evaluation of objects further down the tree is postponed until the delay is over. This means that if the values that the criteria are based on change during the delay, the new values will be used for the subsequent evaluation, not the original values. Cascading delaysYou can chain multiple delays together to gain more flexibility than a single delay provides. For example: Imagine you want to allow a client to specify that they want to receive a reminder email n days before the end of the next month – where they can specify the number of days, and you want the email to be sent at 10am First delay: Delay until Start of next Month Second delay: Delay until Now Preservation of contextDespite the delays postponing execution of actions, actions retain access to the context of the original triggering action, including the user id, ip address of the user triggering the event. Delays are persistent – that is, they will survive server reboot or downtime – any action scheduled for execution whist the server was off will be executed as soon as it returns to service. Cancelling a delayed actionOnce a delay has been executed, the evaluation will resume once the delay period is over. This of itself cannot be cancelled. However, you can add a Criteria action as child object of the delay, to be executed when the delay is over, and use this to determine whether the subsequent actions should be executed or not. For example, if the delayed action is to send an email to prospective customers, you might want to add a criteria to see if they have in the meantime asked not to be emailed.
|
|