20.6 About Using Workflows in Page Processes
Add the new Workflow Process Type plug-in to a page to expose workflow operations.
The Workflow Process Type plug-in is a new Process Type available in the processing section of application pages. This plug-in exposes specific operations for workflows.
- Starting a Workflow Instance
Start a workflow instance with the Workflow Start page process. - Terminating a Workflow Instance
Terminate a running workflow with the Workflow Terminate page process. - Suspending a Workflow Instance
Suspend a running workflow with the Workflow Suspend page process. - Resuming a Workflow Instance
Resume a suspended workflow with the Workflow Resume page process. - Retrying a Workflow Instance
Retry a faulted workflow with the Workflow Retry page process.
Parent topic: Managing Workflows and Tasks
20.6.1 Starting a Workflow Instance
Start a workflow instance with the Workflow Start page process.
To start a workflow instance:
Parent topic: About Using Workflows in Page Processes
20.6.2 Terminating a Workflow Instance
Terminate a running workflow with the Workflow Terminate page process.
To terminate a workflow instance:
Parent topic: About Using Workflows in Page Processes
20.6.3 Suspending a Workflow Instance
Suspend a running workflow with the Workflow Suspend page process.
To suspend a workflow instance:
Parent topic: About Using Workflows in Page Processes
20.6.4 Resuming a Workflow Instance
Resume a suspended workflow with the Workflow Resume page process.
- Resuming Suspended Workflows at Any Activity
Learn about resuming suspended workflows at any activity.
Parent topic: About Using Workflows in Page Processes
20.6.4.1 Resuming Suspended Workflows at Any Activity
Learn about resuming suspended workflows at any activity.
A suspended workflow can be resumed at any activity in the workflow by using APEX_WORKFLOW.RESUME
and specifying the workflow instance ID and the static ID of the activity the workflow should resume with. The default is the current activity, which is the activity where the workflow was suspended.
If the workflow is resumed at a different activity than the current activity, the current activity is terminated and the workflow resumes at the specified activity.
Example 20-1 Exposing the Workflow Activity ID in the Workflow Admin Console
To expose the workflow activity ID in the Workflow Admin Console, add a new page item P<X>_ACTIVITY_STATIC_ID
of type Select List in the Dialog Footer of the page with the following SQL query:
select wa.name as name,
wa.static_id as value
from apex_appl_workflow_activities wa,
apex_appl_workflow_versions wv,
apex_workflows wf$
where wf$.workflow_id = :P<X>_WORKFLOW_ID
and wf$.workflow_version_id = wv.version_id
and wv.version_id = wa.version_id
and wv.workflow_static_id = wa.workflow_static_id
and then modify the Resume processing element to take the page item value of P<X>_ACTIVITY_STATIC_ID
for item Activity Static ID.
With this, a business administrator can select the static ID of the activity from a dropdown list and click Resume to resume the workflow at the specified activity.
Parent topic: Resuming a Workflow Instance
20.6.5 Retrying a Workflow Instance
Retry a faulted workflow with the Workflow Retry page process.
To retry a workflow instance:
Parent topic: About Using Workflows in Page Processes