Author Topic: UseCase is not legal for Actor --> UseCase  (Read 179 times)

BruceTOGAF2

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
UseCase is not legal for Actor --> UseCase
« on: October 24, 2017, 06:09:41 pm »
Even though I can build this connector manually, why is my Jscript being prevented from building a "UseCase" connector between an Actor client and a UseCase?

My Jscript function connectSupplierClient() has 3 input parameters
   mySupplier
   myClient
   connectorType

function connectSupplierClient() works well for a range of elements types and connector types, but refuses to work with
   an Actor element
   a UseCase element
   connector type "UseCase"

I have tried passing the
   Actor element as mySupplier
   UseCase element as myClient

I have tried passing the
   UseCase element as mySupplier
   Actor element as myClient

In both cases, I get runtime error message "UseCase is not legal for Actor --> UseCase"

There is nothing to stop me building the above model using the toolbox, but I cannot build the above model with Jscript. Any idea why?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7752
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UseCase is not legal for Actor --> UseCase
« Reply #1 on: October 24, 2017, 06:18:41 pm »
I guess it must be a bug.
Turning off the strict connector syntax settings will probably allow you to do this anyway.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: UseCase is not legal for Actor --> UseCase
« Reply #2 on: October 24, 2017, 06:47:06 pm »
I had no problem creating a connector this way. Hmmm. Any strange add-ins running?

q.

BruceTOGAF2

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: UseCase is not legal for Actor --> UseCase
« Reply #3 on: October 24, 2017, 11:27:12 pm »
According to 'Manage Add-Ins', I only have 2 Available Add-Ins. They are enabled and set to Load on Startup:
Visual Studio
Eclipse

How do I turn off this restriction? 
Do I use 'EA_OnPreNewConnector()' at the top of my Jscripts?
What is the syntax?

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: UseCase is not legal for Actor --> UseCase
« Reply #4 on: October 25, 2017, 12:04:21 am »
Tools/Options/Link (bottom left check box).

I have this option set and it does NOT croak. So I'd suggest you try with the add-ins turned off temporarily.

q.

BruceTOGAF2

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: UseCase is not legal for Actor --> UseCase
« Reply #5 on: October 25, 2017, 12:33:21 am »
Problem solved!!!

Tools/Options/Links
I unchecked the checkbox 'strict connector syntax'

My Jscript function connectSupplierClient() now works well when building a "UseCase" connector between an Actor and a UseCase

Thank you Geert and qwerty.

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
Re: UseCase is not legal for Actor --> UseCase
« Reply #6 on: October 25, 2017, 01:36:00 am »
Still makes me wonder why on my side this does not make a difference. But I won't dig into that mud ;-)

q.