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();
    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$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.



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


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,