Dear colleagues, good day!
I kindly ask you not to judge me harshly for my question, as I have limited experience in writing scripts. I have already created some complex scripts, but still, my experience is not extensive enough, which is why I have to ask seemingly "silly" questions.
Currently, I'm working on a script to export an RACI matrix for department positions. For the first time in my experience, I need to traverse all the "nodes" of the model, starting from the root. At the moment, I'm not entirely clear about the following:
-
From the perspective of ARIS, is an organizational structure model considered a graph or a tree? And accordingly, which algorithm is best to use for traversing the structure (graph or tree)?
-
I plan to first traverse the entire structure, gather data about the objects in the organizational structure model, their hierarchy, and relationship types. I need to store this information somehow in order to later search for connections with business process models, generate report views, and so on. However, I'm not sure how to store this data effectively. Initially, I thought about creating a separate object (in this case, "object" is a term from the point of view of object-oriented programming) for the parent Organizational Unit, and store an array of child object occurrencies within it. However, this approach won't work as departments can have multiple levels of nesting.
I kindly request the esteemed community to help me find answers to these questions.
Hi Anton,
(1) Whats the difference for you ? There are objects which are connected somehow and you have to go through the connections to get (hopefully) all objects in the model
- How do you get the start org unit: Go through all org unit objets in the model and check which one has no incoming org unit connections
- Then go through the outgoing connections to get all positions etc
- then make a recursive call to get the lower org units (make sure to check if you have already been on this element once)
(2) Well, just build an object with the corresponding sub elements:
tOrgUnit = function() {
this.sName = "";
this.oObjDef = null;
this.aoPositions = new Array() // add object definitions of the positions here
this.atSubOrgUnits = new Array(); // add here additional "sub" tOrgUnits
}
Then you can place the lower org units into atSubOrgUnits of the higher element...
BR Robert
Hi Robert,
thank you very much for your response! It fully addresses the content of my message.
Unfortunately, I did not ask the question accurately. More precisely, I did not provide all the necessary information. I completely forgot to mention that I also need to somehow store information about the affiliation of each position to the nested organizational units. This is required in order to later generate the matrix header as shown in the picture. And here I have doubts. I assume that in "aoPositions" I would need to add data in the form of a HashMap, where the key would be the GUID of the organizational unit, and the value would be an occurrence of the position object. Or am I overcomplicating things and is there a simpler option?
Regards, Anton
Well yes, but you can also put an array into the hashmap - like [oObjOcc_OrgUnit, oCxnOcc_to_Org_Unit]...]
Hello Anton,
there are several standard reports you can adopt:
Regards, Martin
Hello Martin,
thank you for your response!
Yes, you are absolutely right about the standard reports. Unfortunately, I currently lack the expertise to customize those reports for my specific needs. Therefore, it is easier for me to write my own script and, additionally, gain new experience in script development.
Regards, Anton
Hi Martin,
and sorry to say, I would never recommend changing a standard script. The problem is, that they are normally adapted to solve all possible solutions used by a customer and as such, they are extremly hard to understand...
BR Robert
Well, I am no java developer, but only a merciless code ripper. For me it worked best to copy the necessary methods like those covering Anton's question (1) from a standard script into my own. I consider starting from scratch would be too time consuming.
And in order to extend a standard script you can simply duplicate it to protect it from updates.
Regards, Martin
If that standard script ISN'T LOCKED by Software AG. Some are and you can't even make a copy that you can edit.
Yes, Michael, I feel the pain with you. Sometimes when you ask support nicely but sternly you will get a copy of a locked script. And some have been distributed as unlocked duplicates in the installation package/add-on content.
Regards, Martin