Book a Demo

Author Topic: Simulation variables - how to set?  (Read 3584 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Simulation variables - how to set?
« on: March 08, 2012, 12:53:13 pm »
Version 9.3 build 930.
I've setup a BPMN process (as it happens how to install SPARX EA on a client machine in a particular environment  ;)) and I now want to write a simulation script to run a particular scenario.

I have set the guards on the outbound transitions of the gateways using the (I think recommended syntax eg:
Code: [Select]
sim.EALiteNeeded==true;)

I thought I could initialise the variables in the Simulation tab of the Edit Script dialog via the Input textbox:
Code: [Select]
sim.EALiteNeeded=true;
However when it gets to the first gateway, the simulation hangs.  The two outgoing sequence flows have the conditional expressions set:
Code: [Select]
sim.EALiteNeeded==true; (and false)as required.

The Variables window shows EALiteNeeded True

Anybody know what's going on?

TIA,
Paolo
« Last Edit: March 08, 2012, 12:54:37 pm by PaoloFCantoni »
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: Simulation variables - how to set?
« Reply #1 on: March 09, 2012, 11:11:54 am »
Bump!

Sparxians?

Do I need to submit a support request?

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

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Simulation variables - how to set?
« Reply #2 on: March 09, 2012, 11:30:02 am »
Yes you do. The Simulation gurus are very infrequent Forum browsers.
Best Regards, Roy

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Simulation variables - how to set?
« Reply #3 on: March 09, 2012, 11:36:32 am »
I don't know for sure, but isn't the equivalence operator '=' not '==' ?
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Simulation variables - how to set?
« Reply #4 on: March 09, 2012, 02:22:38 pm »
Quote
I don't know for sure, but isn't the equivalence operator '=' not '==' ?

Thanks KP,

The help for "Dynamic Simulation with Javascript" explicitly says: "==".

[edit]The problem was actually caused by different bug in the Simulation process (of which there appear to be a number).[/edit]

Paolo
« Last Edit: March 09, 2012, 03:50:11 pm by PaoloFCantoni »
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: Simulation variables - how to set?
« Reply #5 on: March 09, 2012, 04:06:34 pm »
The initialization problem is now sorted.

However, as part of the processing I'm doing, I need to set a variable to a value on an outgoing sequence flow.

The only way I can seem to get it to work is to make the flow conditional of type expression and place the variable assignment in the conditionExpression.  This, naturally, places a conditional lozenge on the argon end of the SequenceFlow.  This, I'm sure, is wrong.

So what's the correct way to assign a sim. variable in a sequence flow?

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