このコンテンツは選択した言語では利用できません。

Chapter 21. Events mechanism


During process execution, the Process Engine ensures that all the relevant tasks are executed according to the process definition, the underlying work items, and other resources. However, a process instance often needs to react to a nevent it was not directly requesting. Such events can be created and caught by the Intermediate Event elements. See Chapter 39, Throwing Intermediate Events for further information. Using these events in a process enables you to specify how to handle a particular event.

An event must specify the type of event it should handle. It can also define the name of a variable that will store the data associated with the event. This enables subsequent elements in the process to access and react to the data.

An event can be signaled to a running instance of a process in a number of ways:

  • Internal event

    Any action inside a process, for example the action of an action node or an on-entry action a node, can signal the occurrence of an internal event to the process instance.

    kcontext.getProcessInstance().signalEvent(type, eventData);
  • External event

    A process instance can be notified of an event from the outside.

    processInstance.signalEvent(type, eventData);
  • External event using event correlation

    You can notify the entire session and use the event correlation to notify particular processes. Event correlation is determined based on the event type. A process instance that contains an event element listening to external events is notified whenever such an event occurs. To signal such an event to the process engine:

    ksession.signalEvent(type, eventData);

You can also use events to start a process. When a Message Start Event defines an event trigger, a new process instance starts every time the event is signalled to the process engine.

This mechanism is used for implementation of the Intermediate Events, and can be used to define custom events.

Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.