-
Notifications
You must be signed in to change notification settings - Fork 28
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
Configurable behavior on HTTP status codes #4
Comments
As a first step, the worker completes a job with a variable See b485db5. |
That does not work IMHO as you might have parallel pathes overwriting that message. |
Currently, jobs are not failed if the returned status code is in the given |
Thanks! I will add a test case and fix that. |
Regarding the My idea was that if the worker gets a 202 status code, it completes the job with its However, it is okay to remove it for now and wait until someone requests it. |
Thanks for the explanation! My hope would be that camunda/camunda#3417 allows to have a more flexible approach without the worker doing this (e.g. using the jobKey in an EL on input/output) - but let's wait for that to be sketched out |
Originally came up to Allow HTTP 202 for HTTP as a service task could be to invoke an HTTP endpoint:
If that HTTP endpoint returns a 202 it means, that it will do the processing asynchronously. In this case the following behavior of the HTTP Worker would be beneficial:
This might happen around https://github.com/camunda-cloud/zeebe-http-worker/blob/master/src/worker/worker.ts#L136
A discussion is if we need to have this behavior configurable. Or in other words: Do people want the workflow to continue in case of HTTP 202 (I could imagine that this is the expectation for most people).
Together with #3 this improves the support for orchestration of functions. So for example in AWS it could work like this:
As an alternative you could go for an explicit modeling of the asynchronous indirection:
The downside is that the workflow model gets pretty bloated. While it is technically correct and you could argue that it is good that you can see it is asynchronous under the hood, I am pretty sure a lot of people will freak out about it, especially compared to AWS Step Functions where it is always one box.
Also another challenge with that alternative is the correlation (how to route the message to the right waiting workflow instance). In the 202 scenario described above this is solved by the "jobId" from Zeebe. In the async modeling scenario somebody has to create a unique UUID to be used for correlation. This is currently not out-of-the-box with the HTTP cloud worker.
The text was updated successfully, but these errors were encountered: