Show Menu
TOPICS×

Incremental query

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.
Related topics:
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:
  1. 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 .
  2. Click the Change button.
    In the Schedule editing wizard window, you can configure the type of frequency, event recurrence and event validity period.
  3. Click Finish to save the schedule.
  4. 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 days
      Recipients 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 starting
      This option lets you not purge the log when the activity is enabled.
    • SQL table name
      This parameter lets you overload the default SQL table containing the history data.

Output parameters

  • tableName
  • schema
  • recCount
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.