SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
580 stars 353 forks source link

'Redirect to Page' workflow action doesn't complete itself when set to 'Never continue' #5924

Closed byrdley20 closed 4 months ago

byrdley20 commented 4 months ago

Description

When using the Redirect to Page workflow action and setting the Processing Options to Never continue, the Redirect to Page action itself does not get marked as completed. As a result, when an attempt is made to resume the workflow, it executes the Redirect to Page again and ends up in a loop, never allowing the workflow to actually continue/complete.

Actual Behavior

The Redirect to Page action itself does not get marked as completed. As a result, when an attempt is made to resume the workflow, it executes the Redirect to Page again and ends up in a loop, never allowing the workflow to actually continue/complete.

Expected Behavior

The Redirect to Page action itself gets marked as completed, even when the Processing Options is set to Never continue. Therefore, when an attempt is made to resume the workflow, the next action executes and the workflow continues.

Steps to Reproduce

  1. Create a workflow with 1 Activity and 2 Actions
    • Action 1: Redirect to Page https://google.com with Processing Options set to Never continue
    • Action 2: Complete the Workflow
  2. Add the Workflow to a Page
  3. Visit the Page in a browser, which should redirect the browser to https://google.com
  4. Find the WorkflowId of the executed workflow
  5. Visit the page in a browser again, with the query parameter of ?WorkflowId=<WorkflowId from Step 4>. This should resume the workflow
  6. The Workflow will immediately redirect to https://google.com instead of executing Action 2 to complete the workflow.

Issue Confirmation

Rock Version

1.16.5.4

Client Culture Setting

en-US

nairdo commented 4 months ago

@byrdley20 We're making these options clearer and updating the documentation to improve clarity.

That "Never continue" option was there to cause the workflow to fail-and-stop processing. If you're trying to mark the action as completed, you would need to restructure your workflow's actions or choose a different 'Processing Option' action setting such as "Always Continue".