Using dynamic accounts in custom actions

You can dynamically override specific details of the account that is used to run a custom action created under a custom REST connector.

Before you begin

Do the following steps to enable a dynamic account for a custom action created under a REST connector:
Note: OAuth 2.0 (JWT Flow) and OAuth 2.0 (JWT Client Assertion Flow) authentication types are not supported for dynamic accounts in custom actions.
  1. Drag-and-drop a custom REST connector on canvas from the Connectors window, double-click it, and click "+" to create a new custom action.
    Note: If you want to enable dynamic account for an existing custom action, search the relevant action in the Select action drop-down list, and click the Edit icon.

    You are redirected to the Add Custom Action screen.

  2. Select or add the account that you want to use for the custom action. Give the action a name, toggle the Enable Dynamic Account switch, and click Next.

    On the Dynamic Account Configuration screen that appears, you can see a list of configuration fields and their default values for the selected account.

  3. Select the fields for which you want to specify values at run time and then click Next.
    Note: All mandatory account configuration fields are selected by default and cannot be deselected.
  4. Configure the operation for your custom action as explained in the Creating Custom Actions section and then click Next.
  5. Verify the details of your custom action and then click Done.

    You are redirected to the Select action screen.

    With this, the dynamic account feature is enabled for your selected custom action.

About this task

When the dynamic account feature is enabled for a custom action, you can use it whenever needed based on your requirements.

Procedure

  1. Drag the relevant Custom REST connector from the Connectors window onto the canvas. Next, select the appropriate dynamic account-enabled action from the Select action dropdown, choose the account that you want to use, and click Next.

    In the Action configuration screen that appears, a $connection block appears. This block contains all the fields that are selected at the time of enabling the dynamic connection along with the mandatory fields.

  2. Provide values for the relevant fields listed under the $connection block and then click Next.

    The values that you provide for these fields override the default values of your selected account.

    Note: Only encrypted fields (such as Password, Client Secret) are mandatory under the $connection block. You can choose to leave the remaining fields under the $connection block blank. In this case, webMethods Integration uses the default field values provided when the selected account was created.
  3. Test the action to see whether it is working as expected and then click Done.

    You are redirected to the canvas. Whenever you connect this action to any workflow and run it, webMethods Integration automatically replaces the default values with dynamic ones during the connection creation. The connection, now using the modified values, is then employed to run the custom action.