Author Topic: Defined variables / string interpolation  (Read 477 times)

colin_e

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Defined variables / string interpolation
« on: November 18, 2017, 12:07:39 am »
No luck with my previous post (http://www.sparxsystems.com/forums/smf/index.php/topic,38828.msg240911.html#msg240911), so let try a different question-

I'm working in an environment (healthcare) with a very large number of stakeholders, and many long-established stakeholder groups, both formal and informal. One result of this is a wide variation in the names (terminology) used. One stakeholder group may refuse to accept a process description couched in the "wrong" terminology, even if the fundamentals are correct.

Trying to work out how to deal with this, it struck me it would be useful if the analysis tool (EA) supported-

  • Defined variables, along the lines of CONST or "#define" statements in many programming languages.
  • Interpolation of defined values into text strings, so for example an activity label of "Receipt by $clinician$" would be rendered on a diagram with $clinician$ variable or macro replaced by whatever the value of that string constant was defined to be in the current diagram.

With hierarchical inheritance, one could set up global defaults for the whole model, but then override them in sub-packages. Ultimately you could achieve "parametric diagrams" where the same process could be shown appropriately labelled for different user groups without re-drawing the whole thing from scratch.

So-

Is something like this possible in EA?

If not, would it be desirable, or am I barking up the wrong tree, and the same goal can be achieved in a different way with existing functionality?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7733
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Defined variables / string interpolation
« Reply #1 on: November 18, 2017, 12:38:39 am »
I think I would try go about it the other way around.

Make a global glossary of terms and have everyone agree on that.
Then also add all synonyms to the glossary (and mark them as being a synonym using the type)

Then together with the documentation provide the glossary with all "official" terms and all synonyms.

That avoids a ending up in a Babylonian story.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1072
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Defined variables / string interpolation
« Reply #2 on: November 18, 2017, 03:32:31 am »
Hi Colin,


The nearest thing I can think of is the word substitution feature, which allows you to replace a number of predefined terms in generated documents. It does not apply to diagram rendering nor to HTML reports, and you can't add your own terms for substitution. (Although that could probably be hacked around somehow.)

Related to this is the project constants feature, which allows you to define your own constants for use in report generation, but these are referred to from within document templates and are not substituted in the text pulled from the model.

Each element and connector has an alias, which can be presented instead of (or in addition to) the name, but this won't get you very far if you need multiple substitutions for a single term.

A set of AddIn-calling shape scripts could do it, but those only apply to diagrams and the performance would be atrocious. Simply put, this is not a concept that exists in EA's design. Trying to add it would be a lot of work and would result in a patchy solution at best.

Maybe something could be done with the cloud server and WebEA, but I doubt it.


/Uffe
My theories are always correct, just apply them to the right reality.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Defined variables / string interpolation
« Reply #3 on: November 20, 2017, 10:57:04 am »
Hi Colin,

Geert is spot on.  Your problem is the lack of a common vocabulary.

Look up "Helsinki principle".

You cannot solve this problem by continuing to allow the lack of a common vocabulary.  I have been working in this area for over three decades.
40+ years ago a (relatively obscure) French informatician named Jean-Raymond Abrial said (paraphrased) "The reason we can't build systems that work is that we can't unambiguously tell each other what we want".  40 years later, it's my experience that this is still a significant factor.

Good luck.

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

qwerty

  • EA Guru
  • *****
  • Posts: 8960
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Defined variables / string interpolation
« Reply #4 on: November 20, 2017, 07:28:17 pm »
Paolo,
it's Wittgenstein who brought this up in his "Tractatus": Whereof one cannot speak, thereof one must be silent.

q.

Glassboy

  • EA User
  • **
  • Posts: 896
  • Karma: +52/-54
    • View Profile
Re: Defined variables / string interpolation
« Reply #5 on: November 20, 2017, 09:25:24 pm »
it's Wittgenstein who brought this up in his "Tractatus": Whereof one cannot speak, thereof one must be silent.

Ahh the boozy swine.

qwerty

  • EA Guru
  • *****
  • Posts: 8960
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Defined variables / string interpolation
« Reply #6 on: November 20, 2017, 09:41:59 pm »
I suppose you met him at an orgy

q.

colin_e

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Defined variables / string interpolation
« Reply #7 on: November 21, 2017, 05:35:45 am »

...
>> Make a global glossary of terms and have everyone agree on that.
...

Geert

I can't disagree on the principle, but in a system the size of the UK NHS (~1.3m professionals, before you start counting the patients...) I think that might take rather longer than the one lifetime I have available :-}

True synonyms are one thing, and terms that appear in one stakeholders group's vocabulary but not in another are a second thing. Where things get really tricky is when the same term means subtly (or significantly!) different things to two or more different groups....

Glassboy

  • EA User
  • **
  • Posts: 896
  • Karma: +52/-54
    • View Profile

qwerty

  • EA Guru
  • *****
  • Posts: 8960
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Defined variables / string interpolation
« Reply #9 on: November 21, 2017, 09:39:26 am »
Those guys even can't write. Friedrich, not Freidrich Hegel. YT is nice to listen to music. You must not mix that with "education" or take it as (argh!) alternative facts (BULL SHIT!).

I'm pretty sure there are lots of videos that tell "all guys from New Zealand are cannibals".

q.

P.S. Like that: https://www.youtube.com/watch?v=n5hqoJRCryg
« Last Edit: November 21, 2017, 09:44:49 am by qwerty »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Defined variables / string interpolation
« Reply #10 on: November 21, 2017, 11:02:36 am »
Paolo,
it's Wittgenstein who brought this up in his "Tractatus": Whereof one cannot speak, thereof one must be silent.

q.
No, that's a different proposition.  Still equally true, but different.

I managed to get 5 pages into the Tractatus.  it was TOO dense, even for me!   ;)

Paolo
« Last Edit: November 21, 2017, 11:08:11 am by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 5875
  • Karma: +71/-77
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Defined variables / string interpolation
« Reply #11 on: November 21, 2017, 11:07:26 am »

...
>> Make a global glossary of terms and have everyone agree on that.
...

Geert

I can't disagree on the principle, but in a system the size of the UK NHS (~1.3m professionals, before you start counting the patients...) I think that might take rather longer than the one lifetime I have available :-}

True synonyms are one thing, and terms that appear in one stakeholders group's vocabulary but not in another are a second thing. Where things get really tricky is when the same term means subtly (or significantly!) different things to two or more different groups....
Decades ago, I was involved in creating a data model for the Australian Health System.  It had to start with defining a glossary.

We have developed an ontological modelling technology (using Sparx EA) that helps get you to that place while recognising that there are degrees of inconsistency in the real world.

The minimum you need is to be self-consistent - within your own system.
Concistency, konsistency, consistensy! TMUffe - after Paolo

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

colin_e

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Defined variables / string interpolation
« Reply #12 on: November 21, 2017, 11:19:06 am »
Thanks for the responses. I'm disappointed but not entirely surprised to find EA can't handle this. I had been trawling through the user help (not always a fruitful exercise) and not found any hints at this capability.

In terms of other (non toolset) ways of dealing with this, the one approach I've seen is for the analysis to use a lot of newly-invented terms (essentially process-specific role descriptions) that none of the stakeholder groups are likely to recognise, and then having a "glossary per discipline" to translate into real-world business language.

This has the disadvantages that-

  • It's a lot of work
  • None of the stakeholders will recognise the language in the model

qwerty

  • EA Guru
  • *****
  • Posts: 8960
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Defined variables / string interpolation
« Reply #13 on: November 21, 2017, 11:21:20 am »
I managed to get 5 pages into the Tractatus.  it was TOO dense, even for me!   ;)

Paolo
I didn't make it over the first page. But the essence is probably enough. Especially since Gödel proved that closed axiom systems are impossible, which did lead the Tractatus ad absurdum. If that were not a reason to get massively drunk?

q.

qwerty

  • EA Guru
  • *****
  • Posts: 8960
  • Karma: +136/-123
  • I'm no guru at all
    • View Profile
Re: Defined variables / string interpolation
« Reply #14 on: November 21, 2017, 11:27:33 am »
colin_e,
I did something similar to what Paolo did. Instead of the build-in glossary we extended our MDG so it covered creation of a glossary with terms and definitions (probably a more simplistic version of what Paolo did). This proved to work rather well.

q.

Ontology is something that needs at least three dining philosophers.