ARIS Community - We Love BPM

Versioning in Script

W Engelbrecht's picture
by Willem Engelbrecht in Reports & Macros posted on 2017-09-11

Hi All,

How do I implement versioning in ARIS 9 using scripting.

I used the following to add a new version, after a model has been updated in a merged database, but I get an error when the version part is done.

My code:

    var compVersioning = Context.getComponent("Versioning");

    var relID = "Version " + rID
    var compVersioningOptions = compVersioning.createOptions();
    compVersioningOptions.setRecurseChildGroups(true);
    var result = compVersioning.archive(model, relID, compVersioningOptions, true);

The rest of actually comparing dates/changes, and the actual merge works great, but when the version is added, I get the following error:

"Can't find method com.aris.modeling.server.bl.components.versioning.AversioningScriptInterface.archive(com.aris.modeling.server.number.com.aris.modeling.server.bl.components.versioning.AversioningScriptInterface$AmyVersioningOpti....

I suggested using an attribute for the versioning, but I'm not sure how this will work when comparing models.

Any ideas or suggestions would be greatly appreciated.

Thanks,

Willem

479 Views
0 Likes
2 Comments
Sorry there are no tags
There are no attachments
Martin Schröder posted on 2017-09-11

Hello Willem,

according to this post your parameter in compVersioning.archive(model, ...
may be the cause.

Apart from this I am wondering why you set

compVersioningOptions.setRecurseChildGroups(true);

if you want to version specified models and not a whole group.

Regards, Martin

Willem Engelbrecht posted on 2017-09-12

Hi Martin,

Thanks for your reply.

So I went through my code again, and noticed that the model that I'm trying to update is not in an array, I changed it, and it worked.

Regarding the setRecurseChildGroups(true), was actually a mistype....

Thanks again,

Willem