20.6 About Using Workflows in Page Processes

Add the new Workflow Process Type plugin to a page to expose workflow operations.

The Workflow Process Type plugin is a new Process Type available in the processing section of application pages. This plugin exposes specific operations for workflows.

20.6.1 Starting a Workflow Instance

Start a workflow instance with the Workflow Start page process.

For APEX to create tasks, you must define a Workflow Process Type plugin, and add it to a page process. When the page process runs, APEX creates a new workflow instance based on the workflow definition. In order to use this process, at least one workflow definition must exist as a shared component in the application.

To start a workflow instance:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
  2. In either the Rendering or Processing tab, locate the node where the process must occur. Right-click and select Create Process.
  3. Under Identification:
    1. Name - Specify the name of the process.
    2. Type - Select Workflow.
  4. Set the Type to Start.
  5. Select the Workflow Definition.
  6. Bind the Workflow Parameters to values.
    These values can be Static Content, Page Item (with optional format mask), SQL Query, Expression, Function Body, Default, and Null. You only need to assign values to required parameters.
  7. (Optional) Specify the Details Primary Key by selecting the page item that contains the value of the Primary Key of the Source Table specified in the corresponding workflow version.
  8. (Optional) Workflow ID Item - If the ID of the Workflow Instance that gets created must be returned into a page item, specify the page item here.
  9. Configure the rest of the Process.
    For more information, see Creating Page Processes.
  10. Set the Page Process Parameters.
    If the Workflow Definition has parameters specified, these appear in the Process Tree on the page. Parameters can be set to static values or page items. If a parameter is not required, it can be left as Null. If a parameter is marked Required in the Workflow Definition, it must be set in the process. If a required parameter is not set, there is an error when saving the page.
  11. Click Save.

20.6.2 Terminating a Workflow Instance

Terminate a running workflow with the Workflow Terminate page process.

To terminate a workflow instance:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
  2. In either the Rendering or Processing tab, locate the node where the process will occur. Right-click and select Create Process.
  3. Under Identification:
    1. Name - Specify the name of the process.
    2. Type - Select Workflow Process Type.
  4. Set the Type to Terminate.
  5. For Workflow ID Item, specify the page item that contains the workflow instance ID.
  6. Configure the rest of the Process.
    For more information, see Creating Page Processes.
  7. Click Save.

20.6.3 Suspending a Workflow Instance

Suspend a running workflow with the Workflow Suspend page process.

To suspend a workflow instance:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
  2. In either the Rendering or Processing tab, locate the node where the process will occur. Right-click and select Create Process.
  3. Under Identification:
    1. Name - Specify the name of the process.
    2. Type - Select Workflow Process Type.
  4. Set the Type to Suspend.
  5. For Workflow ID Item, specify the page item that contains the workflow instance ID.
  6. Configure the rest of the Process.
    For more information, see Creating Page Processes.
  7. Click Save.

20.6.4 Resuming a Workflow Instance

Resume a suspended workflow with the Workflow Resume page process.

To resume a workflow instance:
  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
  2. In either the Rendering or Processing tab, locate the node where the process will occur. Right-click and select Create Process.
  3. Under Identification:
    1. Name - Specify the name of the process.
    2. Type - Select Workflow Process Type.
  4. Set the Type to Resume.
  5. For Workflow ID Item, specify the page item that contains the workflow instance ID.
  6. Configure the rest of the Process.
    For more information, see Creating Page Processes.
  7. Click Save.

20.6.5 Retrying a Workflow Instance

Retry a faulted workflow with the Workflow Retry page process.

To retry a workflow instance:

  1. View the page in Page Designer.
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
  2. In either the Rendering or Processing tab, locate the node where the process will occur. Right-click and select Create Process.
  3. Under Identification:
    1. Name - Specify the name of the process.
    2. Type - Select Workflow Process Type.
  4. Set the Type to Retry.
  5. For Workflow ID Item, specify the page item that contains the workflow instance ID.
  6. Configure the rest of the Process.
    For more information, see Creating Page Processes.
  7. Click Save.