Book a Demo

Author Topic: Why this error comes?  (Read 3895 times)

Thiyagaraj A

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Why this error comes?
« on: February 13, 2008, 11:13:48 pm »
There is an Activity called "activity1" and there is an InterruptibleActivityRegion called "interruptActRegion".
The following code gives an "External component has thrown an Exception" exception. What is the cause for it?

               Connector contr = (Connector)activity1.Connectors.AddNew("sample", "Information Flow");
               contr.SupplierID = activity1.ElementID;
               contr.ClientID = interruptActRegion.ElementID;
               contr.Update();
               activity1.Connectors.Refresh();
Regards,
Thiyagaraj A.

thomaskilian

  • Guest
Re: Why this error comes?
« Reply #1 on: February 14, 2008, 12:56:04 am »
I guess you have to omit the blank in InformationFlow

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Why this error comes?
« Reply #2 on: February 14, 2008, 05:59:58 am »
Yes, that's the problem.

The documentation tells you two different things about this: to choose from the list given, or to look at the t_connectortypes table for the allowable types.

Both of these seem out of date. The given list is incomplete, and not all entries in t_connectortypes can be directly created in code.

What we really need is a complete and correct list in the Type property writeup, much as we do for elements.

In the meantime look at t_connectortypes. When you use one of these entries, you must use the exact spelling; punctuation and capitalization both matter.

HTH, David
No, you can't have it!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Why this error comes?
« Reply #3 on: February 14, 2008, 07:00:00 am »
Hi thiyagaraj_a, could you please name your posts more specific next time? More people may be visiting specific topics and help you :-)
Jan 'Bary' Glas