Connect to OCI Process Automation Services - Example

Here's an example of how to connect to Oracle Cloud Infrastructure Process Automation (also known as OCI Process Automation and Process Automation) services using two different authentication methods: identity propagation and fixed credentials (OAuth 2.0 Resource Owner Password). You'll also learn how to use different authentication for different phases of your extension's development, test, and deployment cycle.

Note:

This example applies to Oracle Cloud Applications 24D and later.

Example Scenario

In this example we'll look at two scenarios:
  • Your Oracle Cloud Applications instance is configured with VB Studio, while Process Automation is provisioned in another IDCS/identity domain.
  • Your Oracle Cloud Applications instance is configured with VB Studio, and Process Automation is provisioned in the same IDCS/identity domain.

You've created an extension that consumes a Process Automation REST API and are ready to begin testing. During the test phase, you want your extension to connect to the Process Automation Test instance that has a base URL of https://<OPA-test-URL>, and a REST API service path of /process/api/v1/tasks. When your extension is deployed to the Production instance, you want to connect to a different server; namely, the Process Automation Prod instance, which has a base URL of https://<OPA-prod-URL>.

Prerequisites

The prerequisites differ a bit, depending on the authentication method you're planning to use:

For identity propagation, you'll need: For OAuth 2.0 Resource Owner/Password, you'll need:
A Process Automation instance that is paired with a subscription to a Fusion-based Oracle Cloud Applications service. See this for more details. You or your administrator need relevant Developer access to Process Automation
Blank Access to details from Process Automation's IDCS domain, such as client ID and secret, token URL, and scope. For this, Process Automation recommends creating a new confidential application with the Process Automation process scope. See here on how to set this up, and make sure the OAuth 2.0 Resource Owner grant type is available for this confidential application (others are optional for the purpose of this example).

Steps

Here are the steps for setting up this scenario:
  1. Set up a local server as a backend for Process Automation
  2. Add service connections to the backend
  3. Configure the backend for your Process Automation test instance
  4. Preview and deploy to the test instance
  5. Deploy to the production instance (or other instances)

Step 1: Set Up a Local Server as a Backend for Process Automation

In this step, you'll create a backend to represent the Process Automation instance, which is a one-time configuration for your extension. Since you're going to use one server for testing and a different one at runtime, you'll want to use a local server for this backend, which means it is used only during test and development and thus isn't stored in the source code.

Note:

For reusability purposes, it's a good idea to add all your frequently used backends to a common extension, deploy it, then use this extension as a dependency wherever you need it.
  1. In the Services panel, click the Backends tab, then click Add (+) to create a custom backend.
  2. Name the backend opacustom, then click Next to provide the server details.
  3. In the backend's Server tab, add these values:
  4. Click Create.

Step 2: Add a Service Connections to the Backend

Next, add the service connections that your extension requires to the backend you just created.

  1. Select the custom backend's Overview tab, then click + Service Connection.
  2. Create the service connection by endpoint, selecting the opacustom backend. Add the rest of the endpoint's URL, /process/api/v1/tasks.
  3. Navigate to the service connection's Test tab and test the service connection.
  4. If the connection works, click Create.

Step 3: Configure the Backend for Your Test Instance

The Preview feature in the VB Studio Designer runs on your Oracle Cloud Application test pod. Since you want this instance to have access to the Process Automation test pod during the test phase, you need to provide these details explicitly to Oracle Cloud Applications; the local server definition itself is not used during Preview. To do this:

  1. Navigate to opacustom's Overview tab.

    You will see a warning there, which indicates that we haven't yet provided Oracle Cloud Applications with the information it needs.

  2. Click Edit Configuration. If you don't have the required Administrative privileges, ask your administrator to complete the next steps. If you don't see this button at all, that means your instance has not yet been enabled to use this functionality and you won't be able to continue. Contact Oracle Support for more information.
  3. In the Manage Backends on Visual Builder Studio screen, enter these details:
    Blank For Identity Propagation For Fixed Credentials
    URL
    https://<OPA-test-URL>
    https://<OPA-test-URL>
    Authentication OAuth 2.0 User Assertion OAuth 2.0 Resource Owner Password
    Client id, Secret N/A Obtained during the prerequisite step
    Username, Password N/A Obtained during the prerequisite step
    Scope Corresponds to the Process Automation instance (typically https://<OPA-test-URL>/process Corresponds to the Process Automation instance (typically https://<OPA-test-URL>/process
    Token URL N/A Corresponds to the IDCS instance connected to Process Automation (typically
    https://<IDCS host>/oauth2/v1/token)

Once this is done, you'll no longer see a warning on the opacustom backend's Overview tab.

Step 4: Preview and Deploy to the Test Pod

  1. In VB Studio, click Preview to ensure that the extension is running as expected.
  2. Commit the sources and push them (or merge them) to the branch used to package your extension.
  3. If the build pipeline isn't configured for the extension, configure the build pipeline and deploy the extension on the Test pod.
  4. Test the extension to ensure everything works correctly.

Step 5: Deploy to Production and Other Pods

In this step you'll deploy your extension to an appropriate prod instance of Process Automation, just as you used a Process Automation test pod for testing. To do this, you'll need to supply new details about the opacustom backend on the Oracle Cloud Application Manage Backends for Visual Builder Studio screen. If you want to deploy to other instances, follow this procedure to configure the backend opacustom for each instance.

Note:

If you're using the identity propagation authentication method, make sure that you have a paired a Process Automation instance to whichever pod you are deploying to, so that the OAuth 2.0 User Assertion authentication will work.
  1. Create the production build pipeline for the Prod instance according to this link.
  2. Navigate to the opacustom backend's Overview tab.
  3. To make things easier on the Oracle Cloud Applications side, click Copy Link to add the current URL value (your test instance) to your buffer.
  4. Paste the copied URL into a text editor, then replace the base portion of the URL with the base URL for the prod Oracle Cloud Applications instance. For example, replace https://<OPA-test-URL> with https://<OPA-prod-URL>).
  5. Use this link to go to the Manage Backends for Visual Builder Studio screen on the production pod you want to deploy to. If you don't have the required Administrative privileges, send the link to your administrator to complete the next step.
  6. Use the same information you used in "Step 3: Configure the Backend for Your Test Instance", except for Scope, use the URL for the Process Automation prod instance, typically https://<OPA-prod-URL>/process.
  7. Run the production build pipeline, then test the deployed extension in the production pod.