Technical information:
- ARIS 7.x
- Model type: BPMN process diagram (2.0 beta)
- Objects' types
> Function
> Cluster
In our models, we link functions to Clusters with connections of type CT_HAS_OUT.
These connections have 2 custom attributes of type "list of values".
We use a script which at first creates the objects, their connections, and sets all their attributes.
Then it creates the models and displays the objects and their connections into it.
The template is set and applied to the models:
- model.setTemplate(DMI_TEMPLATE);
- model.ApplyTemplate();
Our template is designed to display the connections’ attributes in the models. But after running the script, the attributes can be seen only after a refresh of each model, and saving them doesn't succeed: while reopening the models, the connections' attributes are no more displayed.
Our users can't be refeshing the models each time they open them (there are hundreds of models).
Does anybody know a solution to have the attributes displayed beside the connections while opening the models ?
Hi Fabienne,
You can try to call this function at the end of your script :
activedatabase.refreshObjects ( null, true);
if it doesn't work, try to call this function for every model you modify :
activedatabase.refreshObjects ( model, true);
activedatabase == your data base
model == the modified model.
Let me know if it works.
Best Regards.
Hi Romain,
Thanks for your reply.
Actually this was a good idea but it doesn't work.
As suggested, I put the command at the end of my script:
> var db = group.Database();
> db.refreshObjects(null, true);
Then tested with the command at the end of the function creating the models:
> var db = mod.Database();
> db.refreshObjects(mod, true);
But it wouldn't make it.
On my side, I still search on other ways to solve this issue. But any other idea would be welcomed !
Best Regards,
Fabienne
Hi, maybe you can call the execution of your script inside a macro. then at the end of the macro, call the code :
Designer.refresh(Context.getSelectedGroups()[0]); //If the selection is a group
Could you please try to create a macro with only this line:
Designer.refresh(Context.getSelectedGroups()[0]);
Then, run your script.
After your script is finished, run the macro on the group where your models are stored.
Finally, open your model to see if it is refreshed.
Let me know if it works,
ps. you can also try on one model with the code :
Designer.refresh(Context.getModels()[0]);
Hello Romain,
I've tried your suggestions, but this still doesn't work.
I should precise that in the same script, we also create models which display connections between two objects which both have type FUNC. The connections have similar attributes but aren't the same : they are of type CT_IS_PREDEC_OF_1 instead of CT_HAS_OUT, and their attributes are correctly displayed.
I've simplified my script in order to create only 3 objects and 2 connections :
- FUNC1 -- CT_IS_PREDEC_OF_1 --> FUNC2
- FUNC2 --------- CT_HAS_OUT -------> CLUSTER
The 2 connections have 2 attributes but only the attributes of the first connection (CT_IS_PREDEC_OF_1) are displayed. Maybe that's an ARIS issue ?
Quick status on the results I've got so far.
It seems that default ARIS attributes are displayed properly on CT_HAS_OUT connections, whereas custom attributes aren't.
That's a weird issue, considering that on other connection types, custom attributes are correctly managed.
Did someone already faced that problem ?