Copying a Workflow with External Trigger retains the original Workflow External Trigger Details

What problem are you observing?

When working with Workflows, it is common the Duplicate the workflow if you need to work with it while the primary one is still Enabled and functioning.

The use cases are:

  • Testing initial functionality while developing additional.
  • Debugging a minor issue while the primary workflow is in use (Testing or PROD)
  • Viewing the workflow in Workflow Builder (since this view is not available to Enabled Workflows.

What I am seeing is that when you duplicate a Workflow with an External Trigger, the details of the External Trigger are duplicated as-is. This means that the Client ID is the same as the original, and the URL listed points back to the Original Workflow, not to the duplicated one.

This is an issue when you go to test this duplicated workflow. Since the developer is not provided with the Client Credential or new URL, they will go into the External Trigger and click New Access Token to regenerate these for the Duplicated Workflow. What we see happening though is that this is DELETING the originally assigned Client Credentials, and putting a new one in its place. However, since the client credentials were copied from the original, it is deleting the credentials that the original Workflow is using, and thus breaking the workflow process, and causing it to error out when called.

What is the correct behavior?

When duplicating a workflow with an External Trigger, the External Trigger should be reset to the default value of blank, and the user should have to regenerate a new token

OR

When the New Access Token button is clicked, it should check to see if the existing token is in use, and only delete it if there are no other referenced to it.

What product feature is this related to?

ISC Workflows with External Triggers.

What are the steps to reproduce the issue?

Create a simple Workflow with 3 steps:

  1. External Trigger
  2. Send Email (Could be any step just to show it ran)
  3. End Step - Success
  • Configure the External trigger with a new Access Token and record the values.
  • Set up the 2nd Step, Send Email in this case.
  • Save the workflow
  • Enable the workflow.
  • Call the workflow to verify it is working.
  • Record the URL and Client ID for the Original workflow to reference later.
  • Go to Global → Security Settings → API Management and verify the Credentials that were added.

Once the Primary/Original workflow is created and working, the following steps will produce the error:

  • Duplicate the Original Workflow

  • Optional: Export the JSON to view that the External Trigger shows the details for the original workflow.

  • Optional: Open the Workflow in the Workflow builder, and view the External Trigger to see the values are configured for the Original Workflow.

  • Enter the Workflow Builder and go to the External Trigger. Click on the New Access Token button to create new credentials. Record these credentials.

  • Save the workflow

  • Enable the workflow.

  • Call the duplicated workflow to verify it is working.

  • Now, go to Global → Security Settings → API Management and verify the Credentials for the Duplicated Workflow were added.

  • While there, look up the credentials for the Original Workflow. Notice that they no longer exist.

  • Go into the Workflows and locate the Original Workflow and verify that it’s external trigger still referenced it’s original Client ID that no longer exists.

Do you have any other information about your environment that may help?

This was Discovered by Tony in this post:

1 Like

Thank you for reporting this. A bug ticket has been submitted (PLTWRKFLW-4628).

1 Like

This has now been fixed.

2 Likes