Skip to content

Commit

Permalink
fix(assets): display bpmn-element images (#4620)
Browse files Browse the repository at this point in the history
* fix(assets): display bpmn-element images

* fix(assets): display bpmn-element images

---------

Co-authored-by: Amara Graham <[email protected]>
  • Loading branch information
timstawowski and akeller authored Nov 20, 2024
1 parent 9b9a4de commit a4e0b89
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,29 @@ Aside a general strategy to mark service tasks as being save points you will oft

**Do** configure a savepoint **after**

- _User tasks_ <img src="/img/bpmn-elements/task-user.svg" width="40"/>: This savepoint allows users to complete their tasks without waiting for expensive subsequent steps and without seeing an unexpected rollback of their user transaction to the waitstate before the user task. Sometimes, e.g. when validating user input by means of a subsequent step, you want exactly that: rolling back the user transaction to the user task waitstate. In that case you might want to introduce a savepoint right after the validation step.
- _User tasks_ <img src="/img/bpmn-elements/task-user.svg"/>: This savepoint allows users to complete their tasks without waiting for expensive subsequent steps and without seeing an unexpected rollback of their user transaction to the waitstate before the user task. Sometimes, e.g. when validating user input by means of a subsequent step, you want exactly that: rolling back the user transaction to the user task waitstate. In that case you might want to introduce a savepoint right after the validation step.

- Service Tasks (or other steps) causing _Non-idempotent Side Effects_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" width="40" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" width="40" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" width="40" />: This savepoint makes sure that a side effect which must not happen more often than once is not accidentally repeated because any subsequent steps might roll back the transaction to a savepoint well before the affected step. End Events should be included if the process can be called from other processes.
- Service Tasks (or other steps) causing _Non-idempotent Side Effects_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" />: This savepoint makes sure that a side effect which must not happen more often than once is not accidentally repeated because any subsequent steps might roll back the transaction to a savepoint well before the affected step. End Events should be included if the process can be called from other processes.

- Service tasks (or other steps) executing _expensive Ccmputations_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" width="40" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" width="40" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" width="40" />: This savepoint makes sure that a computationally expensive step does not have to be repeated just because any subsequent steps might roll back the transaction to a savepoint well before the affected step. End Events should be included if the process can be called from other processes.
- Service tasks (or other steps) executing _expensive Ccmputations_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" />: This savepoint makes sure that a computationally expensive step does not have to be repeated just because any subsequent steps might roll back the transaction to a savepoint well before the affected step. End Events should be included if the process can be called from other processes.

- Receive tasks (or other steps) catching _external events_, possibly with payload <img src="/img/bpmn-elements/task-receive.svg" alt="Receive Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/signal-intermediate.svg" alt="Signal Intermediate Event" width="40" /> : This savepoint makes sure that a external event like a message is persisted as soon as possible. It cannot get lost just because any subsequent steps might roll back the transaction to a savepoint well before the affected step. This applies also to External Service Tasks.
- Receive tasks (or other steps) catching _external events_, possibly with payload <img src="/img/bpmn-elements/task-receive.svg" alt="Receive Task" /> <img src="/img/bpmn-elements/message-intermediate.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/signal-intermediate.svg" alt="Signal Intermediate Event" /> : This savepoint makes sure that a external event like a message is persisted as soon as possible. It cannot get lost just because any subsequent steps might roll back the transaction to a savepoint well before the affected step. This applies also to External Service Tasks.

**Do** configure a savepoint **before**

- _Start events_ <img src="/img/bpmn-elements/none-start.svg" alt="None Start Event" width="40" /> <img src="/img/bpmn-elements/message-start.svg" alt="Message Start Event" width="40" /> <img src="/img/bpmn-elements/signal-start.svg" alt="Signal Start Event" width="40" /> <img src="/img/bpmn-elements/timer-start.svg" alt="Timer Start Event" width="40" />: This savepoint allows to immediately return a process instance object to the user thread creating it - well before anything happens in the process instance.
- _Start events_ <img src="/img/bpmn-elements/none-start.svg" alt="None Start Event" /> <img src="/img/bpmn-elements/message-start.svg" alt="Message Start Event" /> <img src="/img/bpmn-elements/signal-start.svg" alt="Signal Start Event" /> <img src="/img/bpmn-elements/timer-start.svg" alt="Timer Start Event" />: This savepoint allows to immediately return a process instance object to the user thread creating it - well before anything happens in the process instance.

- Service tasks (or other steps) invoking _remote systems_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" width="40" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" width="40" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" width="40" />: This savepoint makes sure that you always transactionally separate the potentially more often failing remote calls from anything that happens before such a step. If a service call fails you will observe the process instance waiting in the corresponding service task in cockpit.
- Service tasks (or other steps) invoking _remote systems_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" />: This savepoint makes sure that you always transactionally separate the potentially more often failing remote calls from anything that happens before such a step. If a service call fails you will observe the process instance waiting in the corresponding service task in cockpit.

- _Parallel joins_ <img src="/img/bpmn-elements/gateway-parallel.svg" alt="Parallel Join" width="40" /> <img src="/img/bpmn-elements/gateway-inclusive.svg" alt="Inclusive Join" width="40" /> <img src="/img/bpmn-elements/task-service-multi.svg" alt="Multiinstance Task" width="40" />: Parallel joins synchronize separate process pathes, which is why one of two path executions arriving at a parallel join at the same time will be rolled back with an optimistic locking exception and must be retryed later on. Therefore such a savepoint makes sure that the path synchronisation will be taken care of by Camunda's internal job executor. Note that for multi instance activities, there exists a dedicated "multi instance asynchronous after" flag which saves every single instance of those multiple instances directly after their execution, hence still "before" their technical synchronization.
- _Parallel joins_ <img src="/img/bpmn-elements/gateway-parallel.svg" alt="Parallel Join" /> <img src="/img/bpmn-elements/gateway-inclusive.svg" alt="Inclusive Join" /> <img src="/img/bpmn-elements/task-service-multi.svg" alt="Multiinstance Task" />: Parallel joins synchronize separate process pathes, which is why one of two path executions arriving at a parallel join at the same time will be rolled back with an optimistic locking exception and must be retryed later on. Therefore such a savepoint makes sure that the path synchronisation will be taken care of by Camunda's internal job executor. Note that for multi instance activities, there exists a dedicated "multi instance asynchronous after" flag which saves every single instance of those multiple instances directly after their execution, hence still "before" their technical synchronization.

The Camunda JobExecutor works (by default) with [exclusive jobs](https://docs.camunda.org/manual/latest/user-guide/process-engine/the-job-executor/#exclusive-jobs), meaning that just one exclusive job per process instance may be executed at once. Hence, job executor threads will by default not cause optimistic locking exceptions at parallel joins "just by themselves", but other threads using the Camunda API might cause them - either for themselves or also for the job executor.

**Don't** configure save points **before**

- User tasks and other _wait states_ <img src="/img/bpmn-elements/task-user.svg" alt="User Task" width="40" /> <img src="/img/bpmn-elements/task-receive.svg" alt="ScrReceiveipt Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/signal-intermediate.svg" alt="Signal Intermediate Event" width="40" /> <img src="/img/bpmn-elements/timer-intermediate.svg" alt="Timer Intermediate Event" width="40" /> <img src="/img/bpmn-elements/gateway-event.svg" alt="Event Based Gateway" width="40" /> including steps configured as _external tasks_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" width="40" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" width="40" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" width="40" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" width="40" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" width="40" />: Such savepoints just introduce overhead as [wait-states](https://docs.camunda.org/manual/latest/user-guide/process-engine/transactions-in-processes/#wait-states) on itself finish the transaction and wait for external intervention anyway.
- User tasks and other _wait states_ <img src="/img/bpmn-elements/task-user.svg" alt="User Task" /> <img src="/img/bpmn-elements/task-receive.svg" alt="ScrReceiveipt Task" /> <img src="/img/bpmn-elements/message-intermediate.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/signal-intermediate.svg" alt="Signal Intermediate Event" /> <img src="/img/bpmn-elements/timer-intermediate.svg" alt="Timer Intermediate Event" /> <img src="/img/bpmn-elements/gateway-event.svg" alt="Event Based Gateway" /> including steps configured as _external tasks_ <img src="/img/bpmn-elements/task-service.svg" alt="Service Task" /> <img src="/img/bpmn-elements/task-script.svg" alt="Script Task" /> <img src="/img/bpmn-elements/task-send.svg" alt="Send Task" /> <img src="/img/bpmn-elements/message-intermediate-send.svg" alt="Message Intermediate Event" /> <img src="/img/bpmn-elements/message-end.svg" alt="Message End Event" />: Such savepoints just introduce overhead as [wait-states](https://docs.camunda.org/manual/latest/user-guide/process-engine/transactions-in-processes/#wait-states) on itself finish the transaction and wait for external intervention anyway.

- _All forking_ and _exclusively joining gateways_ <img src="/img/bpmn-elements/gateway-exclusive.svg" alt="Exclusive Gateway" width="40" /> <img src="/img/bpmn-elements/gateway-parallel.svg" alt="Parallel Join" width="40" /> <img src="/img/bpmn-elements/gateway-inclusive.svg" alt="Inclusive Join" width="40" />: There should just be no need to do that, unless execution listeners are configured at such points, which could fail and might need to be transactionally separated from other parts of the execution.
- _All forking_ and _exclusively joining gateways_ <img src="/img/bpmn-elements/gateway-exclusive.svg" alt="Exclusive Gateway" /> <img src="/img/bpmn-elements/gateway-parallel.svg" alt="Parallel Join" /> <img src="/img/bpmn-elements/gateway-inclusive.svg" alt="Inclusive Join" />: There should just be no need to do that, unless execution listeners are configured at such points, which could fail and might need to be transactionally separated from other parts of the execution.

### Adding save points automatically to every model

Expand Down
Loading

0 comments on commit a4e0b89

Please sign in to comment.