Archi Forum

Archi => Archi Development => Topic started by: Marbi on December 01, 2016, 08:07:44 AM

Title: Feature request: incrementing counter type property value
Post by: Marbi on December 01, 2016, 08:07:44 AM
Hi,

It would be nice to have an incrementing automatic counter assigned to a named property value field, which increases itself by 1  every time  a new model item containing the given property associated with the counter is created. It would be good to be able to define any number of such named counters.
The field of application of this counter type properties  is very broad. For example, to build  model elements identifiers in the profiles which are discussed so much recently. Having such a counter type  property we can  define another regular text type property containing a constant prefix (and optionally a second one,  which contains a suffix). The concatenation of the prefix, counter (and the suffix)  provides a unique, human-readable reference to the model element that could be used in browsing the model or reports generated from the model.

Regards,
Marbi
Title: Re: Feature request: incrementing counter type property value
Post by: Jean-Baptiste Sarrodie on December 01, 2016, 08:34:55 AM
Hi,

That's an interresting idea. My main concern is that this would not work when spanning the work accross several Architects (for example using Grafico & Git).

I wonder (thinking out loud) if exposing the internal id of the element would not be enough?

(Still thinking out loud): why not use a tool outside Archi? On windows you can easily create a small utility (using Auto It (https://www.autoitscript.com/site/autoit/) for example) that can be called though a key combination. Such utility can then locally generate such ID/sequence and paste it in the current text field. An enhanced version could call a webservice to have a shared sequence accross several Architects...

Regards,

JB
Title: Re: Feature request: incrementing counter type property value
Post by: Marbi on December 01, 2016, 10:05:03 AM
Hi,

Maybe a globally unique identifier (GUID) standard mechanism could solve the problem? The issue is how to implement it "smartly" into the Archi modeler.
Maybe there is a sense to create a project-wide  structured item ID as a concatenation of:
the project id + the Archi model id + the prefix property string type  value + THE COUNTER  type model item property value + the optional suffix property string type value?

The idea is to have a configurable,  automatically running item identification mechanism,  somehow controlled by  and visible to or  readable by a human project stakeholder, and  containing some meaningful information.

Regards,
Marbi
Title: Re: Feature request: incrementing counter type property value
Post by: Jean-Baptiste Sarrodie on December 01, 2016, 10:07:45 AM
Hi,

Archi now uses a GUID for internal IDs (https://github.com/archimatetool/archi/commit/4549c6e007f7a1ad2e0a668092e8c915c16a1f35) ;-)
Title: Re: Feature request: incrementing counter type property value
Post by: Marbi on December 01, 2016, 10:27:00 AM
Hi,
Ok, but internal id is used only for the "technical" (export, import, etc.) purpose.  The idea is to have an additional id property, which has some semantic meaning within the model as well.
Regards,
Marbico
Title: Re: Feature request: incrementing counter type property value
Post by: Jean-Baptiste Sarrodie on December 01, 2016, 10:30:54 AM
IMHO "Semantic" implies that it has to be defined by human (impossible to automate something with meaning).

If we want a property with a really unique value, then we just have to make the internal ID visible somewhere... Or maybe I missed your point?

Regards,

JB
Title: Re: Feature request: incrementing counter type property value
Post by: Marbi on December 01, 2016, 12:14:22 PM
Hi,

Only the counter type property value  increments automatically.
The role of the counter is to ensure uniqueness within the model. The project level  uniqueness is ensured by the other parts of the identifier predefined by a human (project stakeholder) according to some project-wide rules ( for example,  project naming convention,  structure of the modeled system, business units structure, etc.), in course of  the organizational and/or  project management  processes.

Regards,
Marbi