Workflow task organization

Workflows are organized into simple pieces called tasks. There are different kinds of workflow tasks. Each kind of workflow task does something different. For example, there are workflow tasks to create a record, change the contents of a record and create associations between records.

Workflow tasks are described in "Workflow building".

By arranging different types of workflow tasks into a suitable order and specifying the correct properties for each task, you can create a workflow that is capable of performing whatever business logic is needed.

Each kind of workflow task has a properties form associated with it that allows you to specify details of what the task will do. These properties typically include as how to find the record(s) that the task will work with, computations it should perform with the found record(s), or how it should modify the contents of the record(s).

There are a few fundamental techniques for arranging the order of workflow tasks. The most basic technique is to organize tasks into a simple sequence where after each task there is one other task that will be the next task performed.

Sometimes you want more than one task that can immediately follow a particular task. There are two kinds of workflow tasks you can use this way.

  • A Switch workflow task causes one of two sequences of tasks to be performed, based on whether a condition is true or false. Switch workflow tasks are described in "Switch task".
  • A Fork workflow task defines two or more sequences that can be performed at the same time. Fork workflow tasks are described in "Fork task".

Sometimes you will want a sequence of tasks to be performed multiple times. There are three kinds of workflow tasks you can use to cause a sequence of tasks to be repeated multiple times.

  • The Loop task is a general purpose task for repeating a sequence of tasks for any reason. Loop tasks are described in "Loop task".
  • The Iterator task is a simpler and more specialized kind of loop. It is used to repeat a sequence of tasks once for each record associated with a preceding task. Iterator tasks are described in "Iterator task".
  • A DataConnect workflow task gets a set of records from the designated staging table and acts as an iterator to create or update a record for each row in the staging table and to run the body of the task for each row. DataConnect workflow tasks are described in "DataConnect task".

Sometimes you want to reuse some business logic or have some business logic be shared by workflows. You can organize workflows to do these things by having one workflow call another workflow. There are two kinds of workflow tasks available for this purpose:

  • Workflows can use the Call Workflow task to launch synchronous workflows. The Call Workflow task is discussed in "Call workflow task".
  • The Trigger Action workflow task triggers actions which in turn cause events that can cause asynchronous workflows to be launched. The Trigger Action workflow task is discussed in "Trigger action task".