Hello,
I am trying to get hold of the GUID of an object representing an assignment in ARIS.
In script help, this function is referenced: ObjDef.CxnList(int), with the below explanation of the parameter to pass:
"
Type and direction of the relationships to be returned: |
"
However, when using the EDGES_ASSIGN constant, the function only returns outgoing relationships. I also can not get any of the other options to return any assignment connections.
Can anyone assist with a way to access the GUID of connections representing assignments?
Thanks.
ObjDef.CxnList(Constants.EDGES_ASSIGN) will return inherent relationships between the parent object (the object that has the model assigned to it) and its child objects (the objects in the assigned model).
I do not believe there is a way to actually pull the assignment relationship itself to get the GUID. You can get an assigned model with ConnectableDef.AssignedModels(), but that returns an array of the assigned models, not the relationship between the object definition and its assigned model.
Hi,
as I understand you would like to get a connection that has at least one assignment to a model.
In this case you can check each connection definition of an object occurence or object definition with a method that will return "true" if the connection has an assignment.
You can do this like Ellen mentioned with the method "AssignedModels()" of the ConnectableDef class:
function isAssignedConnection( cxnDef ) { return cxnDef.AssignedModels().length > 0; }
Hi,
I understand that ARIS automatically selects the correct connection type when I connect objects. Such as selecting "is under responsibility of"
However, there are instance where I want to change the selected connection type from "is under responsibility of" to "accepts". How do I do this? I cannot seem to see the other allowed connection types.
I am a system user and logging into the entire method filter, using ARIS IT Architect 7.1 Module.
Please help.
Hi Mr. Jens,
Thank you for your response. What I actually wanted to do was change the connection type between two objects from "is under the responsibility" to "accepts", while I am designing the model in Designer mode.
I know that ARIS automatically assigns the connection type, and I do not see an option on how to change this.
I hope you can help.
Thank you.
Dear Atomic Euphora,
I think in this posts are two questions discussed. My previous answer goes to the first post of Troels Ravn.
Regarding your question:
The type of a connection between two objects is not assigned. The type is a property of the connection itself. The type of connection depends on the two objects are connected with each other. This objects specify which type of connection you can use. If there are more then one connection type allowed between both objects, you can choose one of them in a dialog that appears when you creation the connection.
If you would like to change the type later, you have to delete the connection and create a new one. In report script it is the same. To change connection types, the script have to delete the old connection and create a new one with a other connection type.
By the way, the ARIS method specifies which connection types are allowed between the differnent object types. Therefore check the ARIS method help to see which connection types are allowed for your different cases....
Thank you both for your responses.
Ms Pelletier, I do not find the method returns any such inherent relationships. If I model two Value-added Chain diagram models, with one function in each, and create an assignment from one of the functions to the other model, I would expect the method to return an array with one item. However, only an empty array is returned. I would expect that if the function returned the relationship as expected, I would be able to get the GUID for it (as the objects in the returned array are Item subclasses and therefore would have a GUID).
Mr Heylmann, actually it is assignments from objects to models that we work with, not from connections to models. Unfortunately the problem is not solved if we know if there is an assignment or not. Let me describe in more detail what we are trying to achieve. Feel free to contribute with alternative solution proposals as well :).
As part of our release cycle management, we merge approved models from a WIP database to a database which holds all approved models for publication. The trouble is that if an assignment is deleted in the WIP database (source of the merge operation), and the object / models in the assignment relationship were previously approved (i.e. they were previously merged to the database with approved models), then the deleted assignment is not deleted from the approved database (target for the merge operation). I raised this issue with IDSS support previously, but was told this was a feature by design. Therefore we are trying to compare the assignments in the two databases and programatically delete those from the target database which are not found in the source database. We could do the comparison by traversing all objects and comparing the GUIDs of assigned models for each object, however this would be cumbersome. Comparison by assignment GUID would be much more elegant and efficient if we can use the database object to find directly by GUID - only we have trouble finding any GUID for the assignments in the first place...
Thanks.
Hi Troels,
ok now I understand what you are looking for. But I am sorry, all that I know is, that there is no GUID for a assignment in database, because a assignment is a only pointer. What you are doing now is the only way to search for assignments in database -> traversing all objects....