Book a Demo

Author Topic: v15.2 BPMN simulation with callActivity - How?  (Read 4858 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v15.2 BPMN simulation with callActivity - How?
« on: December 03, 2020, 12:57:49 pm »
I'm trying to simulate a BPMN Call using the callActivity mechanism in EA.



I'm (eventually) trying to show how we can set up multiple scenarios to test the called process.  Activity4 (a script activity) sets the scenario variables (as sim.<variable>).  Activity5 is a dummy.  Call GA1 is the callActivity which calls a BusinessProcess Global Activity 1.  As can be surmised, Activity4 will set sim.OK to either true or false and the appropriate path will be taken in Global Activity 1.  I have shown that if I make Activity1 in Global Activity 1 a script task and set the sim.OK value there, then Global Activity 1 (GA1) will execute appropriately.

Firstly, is what I'm trying to do in BPMN valid?  I can make the above scenario work with the called process a normal subprocess of the calling activity.  But that doesn't allow me to call the same global process for multiple scenarios (where the scenario variables change in the calling activity).

When I try and execute this diagram, only the  Global Activity 1 gets executed.  I expected the sequence to be:
Code: [Select]
StartEvent1->Activity4->Activity5->StartEvent1(in GA1)->Activity1->Gateway->(chosen path)->Activity2 or Activity3->EndEvent1(in GA)->EndEvent1(which is the sequence when GA1 is a subprocess of the calling activity)
Instead, what happens is:
Code: [Select]
StartEvent1(in GA1)->Activity1->Gateway->(chosen path)->Activity2 or Activity3->EndEvent1(in GA)
Call GA1 is a callActivity with calledActivityRef set to Global Activity 1  Both are in the same package.  Does the global process have to be in the same package?

Has anybody got BPMN simulation with callActivity working?  Where should I look?

TIA,
Paolo 
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v15.2 BPMN simulation with callActivity - How?
« Reply #1 on: December 03, 2020, 06:10:01 pm »
Paolo,

I experimented a bit with the BPMN simulation and remember bumping into similar issues.
Executing other business processes went wrong.

Since it was only an experiment for which I didn't have a real need, I left it at that and wrote it of as being another "sales feature" (looks good on glossy paper, but doesn't really work in the real world)

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 BPMN simulation with callActivity - How?
« Reply #2 on: December 03, 2020, 10:13:00 pm »
Paolo,

I experimented a bit with the BPMN simulation and remember bumping into similar issues.
Executing other business processes went wrong.

Since it was only an experiment for which I didn't have a real need, I left it at that and wrote it of as being another "sales feature" (looks good on glossy paper, but doesn't really work in the real world)

Geert
Thanks Geert,

Unfortunately, I have a REAL need.

Paolo
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: v15.2 BPMN simulation with callActivity - How?
« Reply #3 on: December 07, 2020, 12:57:58 pm »
[BUMP]

As I said, we have a REAL need to get this working...

Anyone?  Sparxians?

Am I missing a "secret sauce"?

Paolo
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: v15.2 BPMN simulation with callActivity - How?
« Reply #4 on: December 15, 2020, 04:24:01 pm »
So I managed to get the callActivity working!  The test "Global Activity" has changed slightly from the original - to allow additional testing and flows.  But is substantially unchanged.

Below are two scenarios - the grey notes are linked to the script tag in the appropriate script activity in the calling process.



and



The global activity will execute according to the parameters set in the calling process.  This allows us to create multiple scenarios to test our BPMN processes.

It seems a restriction (required to get the callActivity working) is that the global activity has to be in the same package as the two scenarios.  Since it's a "Global Activity" I would have thought this restriction to be a defect.  Thoughts?

Reported,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v15.2 BPMN simulation with callActivity - How?
« Reply #5 on: December 15, 2020, 06:26:33 pm »
Paolo,

What is a "Global Activity"?
I know of Global Tasks, but not Global Activities.

If I'm not mistaken there is no such thing. If you want to "reuse" an existing part of behavior, and call that from different places, you have to create a BPMN Business Process.

An Activity is always a local thing, and therefore should be owned by the Business Process or Subprocess Activity on who's diagram it is used on.
Similarly, an Activity should only be used on a single diagram.

Reuse is done calling Gobal Task (for atomic reusable actions) or calling another Business Process (for complex actions)

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2 BPMN simulation with callActivity - How?
« Reply #6 on: December 15, 2020, 10:10:19 pm »
Paolo,

What is a "Global Activity"?
I know of Global Tasks, but not Global Activities.

If I'm not mistaken there is no such thing. If you want to "reuse" an existing part of behaviour, and call that from different places, you have to create a BPMN Business Process.

An Activity is always a local thing, and therefore should be owned by the Business Process or Subprocess Activity on who's diagram it is used on.
Similarly, an Activity should only be used on a single diagram.

Reuse is done calling Global Task (for atomic reusable actions) or calling another Business Process (for complex actions)

Geert
Geert,
My bad it's a Business Process.  It's called by using a callActivty of subtype callProcessActivity

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!