An incremental query lets you periodically select a target based on a criterion, while excluding the people already targeted for this criterion.
The population already targeted is stored in the memory by workflow instance and by activity, i.e. two workflows started from the same template do not share the same log. On the other hand, two tasks based on the same incremental query for the same workflow instance will use the same log.
The query is defined in the same way as for standard queries, but its execution is scheduled.
If the result of an incremental query is equal to 0 during one of its executions, the workflow is paused until the query's next programmed execution. The transitions and activities that follow the incremental query are therefore not processed before the following execution.
To do this:
- In the Scheduling & History tab, select the Schedule execution option. The task remains active once it has been created and will only be triggered at the times specified by the schedule for executing the query. However, if the option is disabled, the query is executed immediately and in one go .
- Click the Change button.In the Schedule editing wizard window, you can configure the type of frequency, event recurrence and event validity period.
- Click Finish to save the schedule.
- The lower section of the Scheduling & History tab allows you to select the number of days to be taken into account in the history.
- History in daysRecipients already targeted can be logged a maximum number of days from the day they were targeted. If this value is zero, the recipients are never purged from the log.
- Keep history when startingThis option lets you not purge the log when the activity is enabled.
- SQL table nameThis parameter lets you overload the default SQL table containing the history data.
This set of three values identifies the population targeted by the query. tableName is the name of the table that records the target identifiers, schema is the schema of the population (usually nms:recipient) and recCount is the number of elements in the table.