
BEAR (BPMN Environmental Animator) is a tool that supports the design and animation of environmental, multi-instance BPMN collaboration diagrams. BEAR guarantees a precise understanding of the interplay between BPMN collaborations and the physical environment through the visualisation of the model execution. BEAR gives a comprehensive view of the executions in terms of control- and message-flow token animation on the BPMN collaboration, and participants’ movements in the space model. Moreover, BEAR shows the environment’s evolution. Overall, BEAR animation features are helpful in practical modeling activities, for debugging errors that can arise due to environmental conditions that can influence process execution.
User Guide
Modeling with BEAR
BEAR embeds a user-friendly modeler capable of representing environmental BPMN collaborations.
The modeler is divided into two parts: a BPMN modeler (on the left) used to design the BPMN collaboration processes and an environment modeler (on the right) used to design the environment in the form of place graphs.

On the left of each modeler, BEAR shows an element palette used to design the two models. For each element in the modelers, it is possible to define additional properties using the property panel. One or more environmental attributes can be set for a place in the environmental model by using the associated property panel. In order to define an environmental attribute, it is necessary to define its name and its initial value. Environmental attributes can be referenced by other elements in the models by using the following notation: `place_name.attribute_name`. Other attributes can be defined by using data objects in the BPMN modeler, which will only be accessible by the elements that belong to that specific pool, using the `attribute_name` notation.
An initial position corresponding to one of the places in the environmental model can be set for each instance of a pool, which represents a participant in the collaboration.
Tasks in the model may include new properties:
Guard constrains the execution of a task to an environmental status. The guard expression has to be defined by specifying the name of a defined attribute and the value that activates the condition (e.g., `place_name.attribute_name == value`).
Destination indicates the place that the participant wants to reach from its current position. The destination has to be defined by selecting one of the places defined in the environmental model or by specifying the name of an attribute that contains the name of a place.
Assignments are used to modify the environment topology (by connecting or disconnecting places) and the value of its attributes. Assignments are defined by specifying the name of a defined attribute and its new value. To connect or disconnect places in the environmental model, it is possible to use the `connect` and `disconnect` keywords as attributes and dot separated pairs of places (e.g., `place1.place2`) as the values to be assigned.
In addition, BEAR enables the use of FEEL (Friendly Enough Expression Language) to define assignment, guards and destinations.
When a task specifies a destination, it is classified as a movement task, while if it specifies guards or assignments on spaces, it is classified as an environmental task (see figures below).

For a message event it is possible to set some properties:
Send Message Events may define a message payload, which can contain an attribute or any other arbitrary value, such as numbers and text.
Receive Message Events will in turn specify the name of the attribute to associate with the payload of the corresponding send message event.
BEAR makes it possible to save an environmental BPMN collaboration model by clicking on the Save button and to upload one by clicking on the Open button. When uploading a model, a .zip file containing the .bpmn file and the space .xml file will have to be provided by the user.
Animation with BEAR
BEAR embeds an animator capable of representing step-by-step the environmental BPMN collaboration execution. By selecting the Token Simulation button in the BEAR interface, a play button will appear over each fireable start event. Once this button is clicked, one process is activated. This creates a new token in the form of a small colored circle at the start event of the BPMN collaboration and another token in place of the environmental model corresponding to the set position of the pool, which starts to cross the two models.
The animation terminates once all tokens cannot move forward. In the case of a token remaining blocked due to environmental conditions (e.g., a guard condition violation) BEAR will highlight the issue using the red color.
The data panel in the top-right corner of the BEAR interface allows users to keep track of the evolution of the values related to data objects and environmental attributes throughout the animation. At any time, the animation can be paused by the user to check the distribution of the tokens in the environment and in the BPMN collaboration.
