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

Update variables on BPMN error #4080

Closed
jwulf opened this issue Mar 19, 2020 · 5 comments · Fixed by #10882
Closed

Update variables on BPMN error #4080

jwulf opened this issue Mar 19, 2020 · 5 comments · Fixed by #10882
Assignees
Labels
blocker/stakeholder Marks an issue as blocked, waiting for stakeholder input kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog version:8.2.0-alpha2 Marks an issue as being completely or in parts released in 8.2.0-alpha2 version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0

Comments

@jwulf
Copy link
Member

jwulf commented Mar 19, 2020

At the moment you can't implement a retry loop with a timer that is entered via a BPMN error throw and has decrementing retries:

Screen Shot 2020-03-20 at 1 24 26 am

What I'd like to be able to do is this:

Screen Shot 2020-03-20 at 1 25 52 am

However, there is no opportunity to mutate anything when throwing a bpmn error from the client....

@jwulf jwulf added the kind/feature Categorizes an issue or PR as a feature, i.e. new behavior label Mar 19, 2020
@jwulf
Copy link
Member Author

jwulf commented Mar 19, 2020

If you could mutate with the error throw, you could even do a back-off retry in the worker.

@saig0
Copy link
Member

saig0 commented Mar 20, 2020

Is this request only about providing a timeout before a failed job is retried?
If yes then this may be better implemented directly as part of the FailJob command (#164) instead of modelling it (maybe multiple times) in the workflow.

@berndruecker
Copy link
Member

For the issue at hand I do agree, that the increasing retry interval should be baked in the retrying of the service task itself (but probably we could have out-of-the-box support for that in future). It is not an error with any business reaction (that's what BPMN error events are for), but a technical problem that will probably be solved by retrying or end up with an incident. This should in general not be modeled. I thought I can easily point to a BP - but I think we should probably add this rule of thumb there: https://camunda.com/best-practices/dealing-with-problems-and-exceptions/#_distinguishing_between_strong_exceptions_strong_and_strong_results_strong

Adding payload alongside the error seems like an interesting option - but not related to this problem IMHO.

@ezolnbl-dpc
Copy link

ezolnbl-dpc commented Apr 2, 2020

👍 +1 to adding variable content for errors

@skayliu
Copy link
Contributor

skayliu commented Oct 28, 2022

Hi, @jwulf @saig0 @berndruecker, When throw error with variables, the variables will first been setted at the local scope of the job's associated task, then to the error event scope and last to the process scope. What you think?

image

image

zeebe-bors-camunda bot added a commit that referenced this issue Nov 15, 2022
10882: Support throw error with variables r=korthout a=skayliu

## Description

Support throw error with variables.

![image](https://user-images.githubusercontent.com/26370117/199285371-c30696cc-7468-4691-ae28-390408f812cd.png)


## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #4337
closes #4080 
closes #9473 



Co-authored-by: skayliu <skay463@163.com>
@remcowesterhoud remcowesterhoud added the version:8.2.0-alpha2 Marks an issue as being completely or in parts released in 8.2.0-alpha2 label Dec 6, 2022
@npepinpe npepinpe added the version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0 label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker/stakeholder Marks an issue as blocked, waiting for stakeholder input kind/feature Categorizes an issue or PR as a feature, i.e. new behavior scope/broker Marks an issue or PR to appear in the broker section of the changelog version:8.2.0-alpha2 Marks an issue as being completely or in parts released in 8.2.0-alpha2 version:8.2.0 Marks an issue as being completely or in parts released in 8.2.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants