Several Activity Steps Triggered by Identical Event

This type of issue indicates that in the activity diagram there are several signals with the same name that are all active (hold a token). Therefore, there are several activity steps which are triggered by this identical signal. This case can cause non-deterministic behavior at runtime and, thus, is not allowed.

Severity

Example

An example of this type of error is depicted in the following figure.

A token flowing through the fork node is duplicated. One of them rests in the left hand-side perception MESSAGE and the other in the right hand-side. This means that when a signal named MESSAGE arrives, two activity steps from the two perceptions are triggered:

  • an activity step that includes perception MESSAGE on the left hand-side and operation display,
  • an activity step that includes perception MESSAGE on the right hand-side and operation process.

Possible Solution(s)

Depending on the behavior of your application, there are several possible solutions. For the example above, two alternative constructions as shown in the following figure fix the error.

  • In 1, one signal MESSAGE is used to execute both operation display and process. Therefore, one signal is removed and the fork node is put after the signal.
  • In 2, the fork node is removed and we serialize the signals and operations.

Note that these two forms are different. In 1, operations display and process receive the same object of type String carried by signal MESSAGE. In 2, these operation receive different object.