elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.03k stars 1.1k forks source link

http activity(flow) multiple input port error [BUG] [V3] #5415

Open korayerken opened 1 month ago

korayerken commented 1 month ago

I received an error in the sample workflow I drew in the image I added. elsaschema

To summarize the error I receive, when there is more than one login to the http flow activity, it cannot redirect the unmached status on the previous activity's ports. I have a process, this process makes a request. If this request receives the 200 http status code, it continues to port 200, that is, commit activity. If a different http status code arrives, it continues its rollback activity from the unmached status code port. If the commit activity returns http code 200, it continues with success http response activity over the success 200 port. A different http status code other than 200 continues rollback activity from the unmached status code port. If rollback activity returns 200, success http response is returned. But if a different http status code comes, error http response activity is called via the unmached status code.

In the logic I explained above, when a code other than process activity 200 http status code arrives, the unmached status code port does not trigger and the workflow remains at that step as suspended. elsa instance

Elsa definition export file; sample-process-transaction (1).json

glime-ai[bot] commented 1 month ago

To address the issue you're experiencing with the Elsa workflow, it's important to understand how the HTTP Request (Flow) activity works and how it handles different HTTP status codes. The HTTP Request (Flow) activity is designed to branch the workflow based on the status code received from the HTTP request. Each status code can be configured to lead to a different outcome, allowing you to handle success and failure scenarios differently.

From your description, it seems that when the HTTP Request (Flow) activity receives a status code that does not match the expected 200 status code, the workflow is not correctly redirecting to the Rollback activity as it should. Instead, the workflow is getting suspended.

This behavior could be due to a misconfiguration in the workflow or a bug in the Elsa workflow engine. To troubleshoot this issue, you should:

  1. Review the workflow definition JSON file to ensure that the outcomes for different status codes are correctly configured.
  2. Check the Elsa workflow documentation and community forums for any known issues or updates related to the HTTP Request (Flow) activity and status code handling.
  3. Consider reaching out to the Elsa community or support channels with your workflow definition and a detailed description of the issue for further assistance.

If there is a bug in the Elsa workflow engine, it may require a fix from the Elsa development team. Keep an eye on the GitHub issues and commits for any updates that might address this problem.

Since you've provided a JSON file with your workflow definition, you can also try importing this file into a fresh instance of Elsa to see if the issue persists. This could help determine if the problem is specific to your current environment or a more general issue with the workflow definition.

Lastly, if you're not already using the latest version of Elsa, consider upgrading to the latest release to see if the issue has been resolved in a more recent version.

If you need further assistance, please provide more specific details about the error messages you're receiving and any relevant logs or screenshots that could help in diagnosing the issue.

This comment was generated by Glime.