Book a Demo

Author Topic: Script Automation - add asynchronous signal to sequence diagram  (Read 5417 times)

tweber

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Script Automation - add asynchronous signal to sequence diagram
« on: December 18, 2023, 11:28:01 pm »
Does anyone know how to configure a connector on a sequence diagram so it shows as an asynchronous signal, rather than as a synchronous call?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #1 on: December 19, 2023, 12:43:55 am »
Make two connectors, one synchronous, and one asynchronous, and then compare both records in t_connector to figure out the difference.

Geert

tweber

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #2 on: December 19, 2023, 07:13:45 am »
Thanks for the quick reply.  I've done that.  The async info is stored in PDATA (1 and 3).  That said, MiscData(0) and MiscData(2) are read only and I can't update them to 'Asynchronous' and 'Signal' respectively.  I'm searching for a way to create a signal via script.

Thanks.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #3 on: December 19, 2023, 10:09:54 am »
You need to place an according UPDATE SQL in repository.execute("..."). It's undocumented but the only circumvention we have in such cases.

q.

Takeshi K

  • EA User
  • **
  • Posts: 620
  • Karma: +41/-1
    • View Profile
    • Sparx Systems Japan
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #4 on: December 19, 2023, 01:05:29 pm »
Hello tweber,

You can use Connector.Properties collection. In this collection, when Property.Name = "Kind", set Property.Value = "Signal" and similart to "IsAsync".

HTH,
--
t-kouno

tweber

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #5 on: December 20, 2023, 12:34:26 am »
Takeshi K,

I added this to my script:
  evConn.Properties("Kind").Value   = "Signal";
  evConn.Properties("IsAsync").Value   = true;

That worked. 

For connectors,
Properties contains five (key, value) pairs:

tweber

  • EA User
  • **
  • Posts: 46
  • Karma: +0/-0
    • View Profile
Re: Script Automation - add asynchronous signal to sequence diagram
« Reply #6 on: December 20, 2023, 12:55:19 am »
Looks like my reply got truncated.

The five Key, Value pairs are:
Name    Value = the name of the message/signal
Type      Value = "Sequence"   (apparently, for both message and signal)
Kind      Value =  <blank> for Message, "Signal" for signals
IsReturn Value = boolean
IsAsync  Value = boolean (true for signals)

Appreciate your help.