이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 23. Transaction Mechanisms


23.1. Errors

An error represents a critical problem in a process execution and is indicated by the Error End Event. When a process finishes with an Error End Event, the event produces an error object with a particular error code that identifies the particular error event. The Error End Event represents an unsuccessful execution of the given process or activity. Once generated, it is propagated as an object within the current context and then further up the contexts until caught by the respective catching Error Intermediate Event or Error Start Event, which is waiting for an error with a particular error code. If the error is not caught and is propagated to the upper-most process context, the Process instance becomes ABORTED.

Every Error defines its error code, which is unique in the respective process.

Attributes

Error Code
Error code defined as a String unique within the process.

23.2. Compensation

Compensation is a mechanism that allows you to handle business exceptions that might occur in a process or sub-process, that is in a business transaction. Its purpose is to compensate for a failed transaction, where the transaction is presented by the process or sub-process, and then continues the execution using the regular flow path. Note that compensation is triggered only after the execution of the transaction has finished and that either with a Compensation End Event or with a Cancel End Event.

Note

Consider implementing handling of business exceptions in the following cases:

  • When an interaction with an external party or 3rd party system may fail or be faulty.
  • When you cannot fully check the input data received by your process, for example a client’s address information.
  • When there are parts of your process that are dependent on one of the following:

    • Company policy or policy governing certain in-house procedures.
    • Laws governing the business process, such as age requirements.

If a business transaction finishes with a Compensation End Event, the Event produces a request for compensation handling. The compensation request is identified by ID and can be consumed only by the respective Compensation Intermediate Event placed on the boundary of the transaction Elements and Compensation Start Event. The Compensation Intermediate Event is connected with an Association Flow to the activity that defines the compensation, such as a sub-process or task. The execution flow either waits for the compensation activity to finish or resumes depending on the Wait for completion property set on the Compensation End Event of the business transaction that is being compensated.

If a business transaction contains an event sub-process that starts with a Compensation Start Event, the Event Sub-Process is run as well if compensation is triggered.

The activity to which the Compensation Intermediate Event points may be a sub-process. Note that the sub-process must start with the Compensation Start Event.

If running over a multi-instance sub-process, compensation mechanism of individual instances do not influence each other.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.