20.1.2 About Workflow Definitions

Workflow Definitions contain information about workflows including parameters, variables, activities, connections, and participants. Workflow definitions exist on the application level in the Shared Components section.

20.1.2.1 About Workflow Parameters

Workflow Parameters are inputs to the workflow that APEX passes to the workflow instance when the workflow starts.

Workflow Parameters are inputs for the workflow. For example, a workflow that approves an employee's request for a new laptop could include parameters like Employee ID and Laptop Type.

APEX passes parameters to the workflow instance when the workflow starts. Workflow parameters support data types and format masks, and can be based on SQL queries or page items.

Workflow parameters are read-only, and do not change value during a workflow instance.

20.1.2.2 About Workflow Variables

Workflow Variables are specific to a workflow version and can change during the workflow runtime.

Workflow Variables are inputs for the workflow that are specific to the workflow version. Workflow variables support data types and format masks. They can be based on SQL queries, expressions, function bodies, or workflow parameters. Workflow variables can initiate as a NULL value.

The value of a workflow variable can change during the workflow runtime. Workflow variables update due to:
  • the result of a completed workflow activity
  • the workflow administrator explicitly calling the apex_workflow.update_variable() API

20.1.2.3 About Workflow Activities

Workflow Activities specify what happens during each step of a workflow.

A Workflow Activity is a logical step in a workflow. Each workflow activity requires human or machine resources to support workflow execution. For example, a workflow activity could programmatically evaluate data from a table in order to conditionally branch an activity, or an activity could request input from a workflow participant.

In APEX, each workflow activity corresponds to a process type plugin. All workflows have:
  • exactly one Start Activity at the beginning
  • at least one End Activity at the end
  • support for existing process type plug-ins, including Execute Code, Send E-Mail, Human Task - Create, Send Push Notification, Invoke API, and Server Side Geocoding (supported only on Oracle Autonomous Database).
  • support for workflow-specific process type plug-ins, including Workflow Start, Workflow End, Wait, and Workflow Switch
Each workflow activity, regardless of type, has the following common properties:
  • Due On - Specifies activity timeouts. Wait activities have their own timeout specifications.
  • Additional Workflow Data - Specifies a SQL Query. The workflow can use the columns from the query as bind variables or substitution strings in the activity.
  • Sequence - The sequence in which the workflow appears in the Designer Tree. The sequence and the placement of the activity in the workflow are not the same, and changing the sequence of an activity does not move the activity earlier in the workflow.
  • Label - A display name that appears in the workflow diagram.

In addition to the activity properties, a workflow activity may also have one or more Activity Variables. Activity variables also have their own properties, and can capture information about the workflow activity that can be used later on in the workflow.

You can also configure activities for error handling. Error handling is not managed on the activity itself--instead, configure Error Connections from the activity that dictate how specific errors are resolved. For more on configuring error connections, see Adding a Workflow Connection.

20.1.2.4 About Workflow Connections

Workflow Connections link workflow activities and determine the path through the workflow at runtime.

A Workflow Connection is a link between two workflow activities. Workflow connections determine the path through a particular workflow at runtime.

There are two types of connections: branches and transitions.

Branches

Branches are connections from switch activities. Switch activities split the workflow path from one activity to multiple other activities depending on the result of the condition specified in the switch activity. Each of these splits is called a branch. For example, a True False Check switch has one branch if the condition specified in the activity evaluates as true, and one branch if the condition specified in the activity evaluates as false.

Transitions

Transitions are connections that go directly from one activity to another. For example, a Start activity can transition directly to an Execute Code activity. There are three types of transitions that connect activities in a workflow.

Normal

The default connection between two workflow activities. Every workflow activity must have at least one incoming and one outgoing normal connection with the exception of start activities, which cannot have an incoming connection, and end activities, which cannot have an outgoing connection.

Timeout

Every activity can have a timeout connection specified if there is already a timeout value in the deadline section of the activity properties. The only exception is the wait activity, since it already has its own timeout specification and cannot have another timeout connection stemming from it.

Error

Every activity can have one or more error connections specified. Each error connection specifies the SQL errorcode. When an error occurs during runtime, the workflow executes the target activity of the error connection instead of going into a faulted state.

20.1.2.5 About Workflow Participants

Workflow Participants have operational privileges on workflows.

Workflow Participants are APEX users with operational privileges over a workflow. Workflow participants are associated with a specific workflow version. They are not represented in the workflow diagram, but they are visible in the Workflow Designer Tree.

You can start an In Development workflow without adding participants. However, in order to start an Active workflow, you must specify participants.

You can specify Workflow Owners and Workflow Administrators in the tree.

Workflow Owner
Can start and terminate an instance of the workflow. Can retry a faulted workflow.
Workflow Administrator
Can start, terminate, suspend, resume, and retry a workflow instance. Can update variable values of a workflow instance.

An APEX user does not need to be a workflow participant to start a workflow. The user who starts a workflow is known as the Workflow Initiator. Initiators can terminate workflow instances, but only for workflows they initiated.