How it works...

Automated actions act on a model, and can be triggered either by events or by time conditions. The first steps are to set the Model and When to Run values.

Both methods can use a filter to narrow down the records that are eligible to perform the action on. We can use a domain expression for this. You can find further information about writing domain expressions in Chapter 10, Backend Views. Alternatively, you can create and save a filter on project tasks, using the user interface features, and then copy the automatically generated domain expression, selecting it from the Set selection based on a search filter list.

The domain expression we used selects all the records with a non-empty Deadline date, in a stage where the Fold flag is not checked. Stages without the Fold flag are considered to be work in progress. This way, we avoid triggering notifications on tasks that are in the Done, Canceled, or Closed stages.

Then, we should define the time condition—the date field to use and when the action should be triggered. The time period can be in minutes, hours, days, or months, and the number of periods can be positive, for time after the date, or negative, for time before the date. When using a time period in days, we can provide a Resource Calendar that defines the working days and that can be used by the day count.

These actions are checked by the Check Action Rules scheduled job. Note that, by default, this is run every four hours. This is appropriate for actions that work on a day or month scale, but, if you need actions that work on smaller timescales, you need to change the running interval to a smaller value.

Actions will be triggered for records that meet all the criteria and whose triggering date condition (the field date plus the interval) is after the last action execution. This is to avoid repeatedly triggering the same action. Also, this is why manually running the preceding action will work in a database in which the scheduled action has not yet been triggered, but why it might not work immediately in a database where it was already run by the scheduler.

Once an automated action is triggered, the Actions tab tells you what should happen. This might be a list of server actions that do things such as changing values on the record, posting notifications, or sending out emails.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset