Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Paolo F Cantoni on March 08, 2012, 12:53:13 pm

Title: Simulation variables - how to set?
Post by: Paolo F Cantoni 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
Title: Re: Simulation variables - how to set?
Post by: Paolo F Cantoni on March 09, 2012, 11:11:54 am
Bump!

Sparxians?

Do I need to submit a support request?

Paolo
Title: Re: Simulation variables - how to set?
Post by: RoyC on March 09, 2012, 11:30:02 am
Yes you do. The Simulation gurus are very infrequent Forum browsers.
Title: Re: Simulation variables - how to set?
Post by: KP on March 09, 2012, 11:36:32 am
I don't know for sure, but isn't the equivalence operator '=' not '==' ?
Title: Re: Simulation variables - how to set?
Post by: Paolo F Cantoni 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
Title: Re: Simulation variables - how to set?
Post by: Paolo F Cantoni 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