Book a Demo

Author Topic: [Ask] Ask about enum tagged value  (Read 11438 times)

demian824

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
[Ask] Ask about enum tagged value
« on: September 19, 2023, 10:40:07 pm »
Hello Professors,

I have a question about tagged value. I try to create two tagged value with enum type, Category and sub-category. Is there any way to change sub-category list follow by category selection, programmatically?


Thanks,

WonChul Choi
 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [Ask] Ask about enum tagged value
« Reply #1 on: September 20, 2023, 12:04:44 am »
I'm not a professor, but I'm pretty sure that is not possible.

You cannot change the allowed values of a tagged value at runtime.

Can could either

- merge the two into one: eg. cat1-sub1, cat1-sub2, cat2-sub1
- validate/correct the allowed values after the user chose them
- create two separate stereotypes for your categories (possibly inheriting from a common abstract stereotype)

Geert

demian824

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: [Ask] Ask about enum tagged value
« Reply #2 on: September 20, 2023, 12:12:45 am »
Hello Geert,

Thanks to know  :)

Thanks,

WonChul Choi

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: [Ask] Ask about enum tagged value
« Reply #3 on: September 20, 2023, 10:02:17 am »
Hello WonChul Choi,

You may realise it by using the TagGroup setting. For detail, see the following page:
https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_frameworks/define_tag_groupings.html

HTH,
--
t-kouno

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [Ask] Ask about enum tagged value
« Reply #4 on: September 20, 2023, 03:33:29 pm »
Hello WonChul Choi,

You may realise it by using the TagGroup setting. For detail, see the following page:
https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_frameworks/define_tag_groupings.html

HTH,

Hi Takeshi,

Could you explain how taggroups solve the problem of having different values in the sub-category depending on the selected category value?

Geert

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: [Ask] Ask about enum tagged value
« Reply #5 on: September 21, 2023, 10:49:21 am »
Hi Geert and all,

I realised that I had misunderstood WonChul Choi's question. Geert's comment made me reread the original post and found my misunderstanding.
Sorry for the confusion...

--
t-kouno

ea0522

  • EA User
  • **
  • Posts: 134
  • Karma: +5/-0
    • View Profile
Re: [Ask] Ask about enum tagged value
« Reply #6 on: September 21, 2023, 04:20:57 pm »
Reading the documentation on TagGroups I was wondering.
Suppose you define a TagGroup for each sub-category.
Would it then be possible to programmatically open/close (fold/unfold) each sub-category group depending on the value of the Category selected?
The program being triggered when the selection changes.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: [Ask] Ask about enum tagged value
« Reply #7 on: September 21, 2023, 05:13:36 pm »
I'm not aware of any functionality supporting this.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: [Ask] Ask about enum tagged value
« Reply #8 on: September 21, 2023, 05:17:44 pm »
Reading the documentation on TagGroups I was wondering.
Suppose you define a TagGroup for each sub-category.
Would it then be possible to programmatically open/close (fold/unfold) each sub-category group depending on the value of the Category selected?
The program being triggered when the selection changes.
I don't think we can do that ourselves.
For BPMN something similar happens, but IIRC that was programmed in by Sparx.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: [Ask] Ask about enum tagged value
« Reply #9 on: September 21, 2023, 09:07:01 pm »
Reading the documentation on TagGroups, I was wondering.
Suppose you define a TagGroup for each sub-category.
Would it then be possible to programmatically open/close (fold/unfold) each sub-category group depending on the value of the Category selected?
The program being triggered when the selection changes.
I don't think we can do that ourselves.
For BPMN, something similar happens, but IIRC, that was programmed in by Sparx.

Geert
And, as usual, the implementation is defective!  If you select Task, the Task Group opens (and the others close); however, if you select Sub-process, the Task Group closes, but the Sub-process Group remains stubbornly closed!  You have to open it manually!

I'm sure if I report the defect, I will be told - "this is by design..."

Sheesh!

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