Skip Ribbon Commands
Skip to main content

A process allows you to use many of the same constructs available in interactive forms to create non-interactive activities in ContactsLaw.

Process structure

As with interactive forms, processes are built from a series of components:

A process has two set of rules; one which defines the behaviour of the process itself ("Process rules") and another which runs upon completion ("Finish rules"). Only the process rules can refer directly to records. The process rules are executed only once, and any validation errors will cause the execution of the process to be cancelled. 

Uses

The ability of form processes to run synchronously, without user interaction, gives them many uses in ContactsLaw, some of which are not possible with interactive forms. These include:
  • As scheduled tasks, which can be performed either periodically or as a one-off by the ContactsLaw Daemon
  • As subroutines/functions that can be called by other forms, simplifying designs and re-using logic
  • As actions which can be called directly from the REST API (using the /api/Activities/{id}/Execute endpoint)
  • As add-ons to existing interactive activities, e.g. pre-filling fields or performing extra actions

Process execution

Processes are most typically executed by the ContactsLaw Daemon as a scheduled task. You can schedule a form process in one of two ways:

  • Using the 'Execute form process' job type (provided by the Interactive Forms Framework).
  • Using the built-in 'Run activity' job type. This requires a form activity to be created for the process.

(The latter approach can be useful, as you can include activities for processes in conventional workflows, process models, etc)

Processes can also be executed directly from another process or interactive form using the 'Run process' action in a rule. The calling form will stop and wait for the process to complete, allowing you to capture and act upon its outputs in subsequent rules.

Finally, a process or interactive form can schedule a task for another process to be executed by using the 'Daemon job' record type. A process can even schedule future runs of itself, allowing it to recur until some stop condition is satisfied.

Directives

If a process operates on a specific record or requires input values, these must be defined as input directives. The data will be passed to the activity using either the information on the task or the preceding step of the workflow, as configured in ContactsLaw.

If the process creates new records or otherwise produces meaningful output, these must be defined as output directives. The data will be passed to the next step of the workflow, as configured in ContactsLaw. Processes do not necessarily have to produce any output.

See also