Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Request workflow event is not triggered if imported #15087

Closed
barthamark opened this issue Jan 13, 2024 · 3 comments · Fixed by #15291
Closed

HTTP Request workflow event is not triggered if imported #15087

barthamark opened this issue Jan 13, 2024 · 3 comments · Fixed by #15291
Labels
Milestone

Comments

@barthamark
Copy link
Contributor

Describe the bug

Say you have a working contact form and a corresponding workflow with a HTTP request event. If it's exported, then imported on a different site or using a setup recipe, it won't work anymore until the URL is regenerated (it returns 404).

To Reproduce

Steps to reproduce the behavior:

  1. Enable Workflows HTTP and Form features.
  2. Create a Workflow that is triggered by a HTTP Request event. Set it to POST. To make it testable add a Notify task and a Redirect task that redirects back to an existing URL.
  3. Create a Page with a Form widget or a Form widget on a layer. Set the URL provided by the HTTP Request event. Add a Submit button.
  4. Test the Page, click on the Submit button, observe that it's working.
  5. Create a Deployment Plan with Workflows and Content items. Export to a file.
  6. Reset the site (ie. delete the App_Data folder).
  7. Make sure the Workflows HTTP and Form features are enabled.
  8. Import the recipe.
  9. Test the Page again, observe that it's not working anymore (returns 404 after submit).
  10. Go to the Workflow editor, regenerate the URL, save. Go to the Form, update the URL, Save.
  11. Test the Page again, observe that it's working again.

Expected behavior

The imported workflow and page should work, ie. the HTTP POST URL should still be active.

@sebastienros
Copy link
Member

Have you looked at the recipe to see if it's missing some data, if the data is not imported correctly, or if the data is corrupted?

@lampersky
Copy link
Contributor

@sebastienros I guess it is by design. You can't decrypt token from different tenant.
It will only work when you will export workflows and import them back on the same tenant.
I faced the same issue in the past, and solve it be regenerating activity URL.

image

@sebastienros
Copy link
Member

@lampersky I guess I missed this step: "Reset the site (ie. delete the App_Data folder).". That makes sense.

So this is about implementing the secrets management feature to support it, or to configure the tenants with a data protection store that is reused.

But your PR looks like a good solution too. We'll review it. Maybe we should do a pass on things that use data protection which could also be exported and be solved with the same technique.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants