Book a Demo

Author Topic: v16 - BPMN Sim - Spurious Element Usage dialogs  (Read 3391 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v16 - BPMN Sim - Spurious Element Usage dialogs
« on: October 21, 2022, 05:27:02 pm »
Let me preface my remarks by conceding that I am not a BPMN guru and am even less familiar with BPMN Simulation.  That being said, I would suggest that I have some knowledge about the general theory and practice of systems modelling.  Also, there is some consideration of First Principles.

So, I have recently been posting about BPMN Scenario Simulation of non-trivial BPMN processes.

We have built a non-trivial process with 11 activities, ten gateways, and five pools – one with two lanes plus other assorted related items (not required for simulation).  The gateway exit flows are populated with the appropriate guard condition expressions to correctly route the execution.
We have set up several scenarios to test our process and ensure that, given the input values for the relevant guards, the process will execute correctly and execute the required activities, terminating at the correct end event.

The scenario simulation is working well.  We have some high-level processes that set up the required variables to drive the simulation. Then we invoke the Process under Simulation (PuS) via a Call Activity (by dragging the PuS onto the higher-level scenario process.
So far, all is good!

It is our practice to create “Neighborhood” diagrams (NDs) for our repository items (attached as the composite diagram of the item).  The Neighborhood diagram locates all the related items to the Item under Observation (IuO) and all the diagrams in which the IuO appears.  For most items, this means our users are never more than two double-clicks away from anywhere in the repository the item appears.  This is a very powerful concept – especially for new hires who need to understand “what’s going on”.

Since the composite diagram mechanism is NOT used by BPMN 2.0 simulation, we figured that shouldn’t be a problem.

So, we started by creating NDs for our high-level scenario process.  NDs were successfully created and worked as usual.  We ran the Validation Process on the package, and it passed with no errors or warnings!
We then ran the simulation.  Everything proceeded as normal until the PuS had to return to the calling process.  At that point, we were presented with an Element Usage dialog (no indication of the element it was related to); it had two diagrams specified, the ND for the Call Activity and the Business Process Diagram wherein the Call Activity was located.  This fact is how we surmised the Element Usage dialog was called by the return to the calling activity.

Now, it seems to us that a BPMN process can have only one Composite Structure diagram (since the diagram is the process's definition).  When exiting a lower-level process, the return process and activity therein to be returned-to should be held in the metadata.  It should have NOTHING to do with the number of diagrams the item appears in.  However, this seems to be the case with the defective implementation of the simulation process.  Any arbitrary item in the repository could appear in any number of diagrams for any number of reasons.  From a simulation perspective, only BPMN diagrams are relevant.

But wait, there’s more!
Since NO simulation error was caused by creating the NDs for the other BPMN items in the high-level diagram, we created NDs for the PuS.
Imagine our surprise when, unlike the activities in the higher-level process, where the NDs had (apparently) NO impact on the simulation, we were presented with an Element Usage Diagram for every element in the lower-level process that had an ND!  This is just bizarre self-inconsistency!  Surely the ONLY items that are relevant to the simulation are the business processes and their components (both vertices and arcs) – since both can only appear in one BPMN diagram at a time.
 
While this is strictly true, if we wish to visualise the simulation, we need to be able to update the appropriate diagram with the relevant item to highlight!  Surely this should be part of the metadata carried by the “conceptual token” that is being moved around the simulation.  There is no need to examine the collection of diagrams the item can appear in.  Consequently, you should look for the business process diagram in the collection and use that.  If there is more than one such diagram, then that is an error that should be caught by the validation process!

To rectify this defect, I recommend NOT using the diagram collection to manage the visualisation of the simulation.  But as a temporary solution, use the only Business Process diagram in the collection.


Thoughts?
Reported,
Paolo
« Last Edit: October 21, 2022, 05:29:09 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v16 - BPMN Sim - Spurious Element Usage dialogs
« Reply #1 on: November 03, 2022, 01:42:13 pm »
A week or so ago, I received the following response from Sparx:

Without actually seeing your model, I believe the difference is that the Activity is not on the current diagram. As a result, when it becomes the current element, EA will attempt to find a diagram that it can show that element. If it appears on multiple diagrams, it prompts. Because the other elements on the diagram do appear on the existing diagram, EA doesn't need to find a diagram to show them on.

Unfortunately, the description of your neighborhood diagrams and the suggestion of only using business process diagrams don't help. A BPMN process or global activity would not necessarily appear on any BPMN diagrams, so any diagram that they appear on would be valid to show. As such, there is no reason to discard your neighborhood diagrams from the list of candidates.


As might be expected, This didn't thrill me!  I responded immediately with:

A number of points in reply.  Remember, this defect shouldn't occur if we weren't rendering the simulation!  Otherwise, diagrams should not enter into the question at all!
Firstly, the Neighborhood diagrams only highlighted the problem.  They are NOT, per se, germane to the issue.  As you note in your reply, the defect occurs when the activity is on any other diagram.

Secondly, from the way in which the simulation behaves, if the activity is NOT on the current diagram, then it must be on one of the currently open ones.  When "descending" to a called process, its diagram is opened first, and then the start activity is located on it.  The defect only occurs when ascending!  Consequently, instead of naively looking for any diagram, look for the BPMN diagram among the currently open ones!  The activity involved must only appear on one BPMN diagram within the repository (BPMN rules?); consequently, it must be on one of the opened diagrams.  So again, notwithstanding that the

Thirdly, if the Global Task or Business Process does not appear on any diagram, the question is therefore moot, since there would have been no diagram to descend to in order to manifest the defect on ascending.  In order to trace the simulation rendering to the called business process, there must be a diagram for it to trace to so the initial condition (no diagram) is voided!

Fourthly, we are conducting a BPMN simulation!  The ONLY diagrams of concern are BPMN diagrams (or their derivatives).  The simulation's prerequisites are rather restrictive (but I can't argue against that). Looking at any other diagram types other than BPMN diagrams is just plain wrong!


I haven't received anything since.

What do others think about the situation?
Paolo
« Last Edit: November 03, 2022, 01:47:59 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!