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.
- About Workflow Parameters
Workflow Parameters pass information into a workflow when a new workflow instance starts. - About Workflow Variables
Workflow Variables are specific to a workflow version and can change during the workflow runtime. - About Workflow Activities
Workflow Activities specify what happens during each step of a workflow. - About Workflow Connections
Workflow Connections link workflow activities and determine the path through the workflow at runtime. - About Workflow Participants
Workflow Participants have operational privileges on workflows.
Parent topic: About Workflows
20.1.2.1 About Workflow Parameters
Workflow Parameters pass information into a workflow when a new workflow instance starts.
Workflow Parameters are inputs for the workflow that APEX passes to the workflow when a new workflow instance starts. For example, a workflow that approves an employee's request for a new laptop could include parameters like Employee ID and Laptop Type.
Workflow parameters support data types and format masks, and can be based on SQL queries or page items. Workflow parameters can have directions: In, Out, and In/Out. Out and In/Out parameters can only be based on workflow items (variables and parameters). Out parameters can only be set when the workflow is invoked from another workflow. Out parameters can not be set when the workflow is used in a page process.
When the direction is set to In, workflow parameters are read-only. When the direction is set to In/Out or Out, the workflow parameter can be updated while the workflow instance is running.
Parent topic: About Workflow Definitions
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 result of a completed workflow activity
- the workflow administrator explicitly calling the
apex_workflow.update_variables()
API - the workflow administrator updating the variable from the workflow details page
Note:
If the workflow variable is aCLOB
datatype and the value exceeds theVARCHAR2
limit, use theapex_workflow.update_variables()
API instead of the details page.
Parent topic: About Workflow Definitions
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.
- 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, Workflow Switch, and Invoke Workflow
- 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.
Parent topic: About Workflow Definitions
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.
Parent topic: About Workflow Definitions
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.
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.
Parent topic: About Workflow Definitions