Profile picture for user rjoss

Hello



I have a few model-reports create with scripting. Now I would like to enhance these reports with version-informations, so when a report is startet on a specific version, that in the report is a revision-id and the description of the revision.

How can i find out these informations, when the user starts the report on a model-version or when the user is logged in the database with a selected version and starts the report on the model?

I work with Service-Release 2010-08.

Looking forward to all your responses.

Thanks & Regards

Roman

by Martin Schröder
Badge for 'Contributor' achievement
Posted on Thu, 01/13/2011 - 13:58

Apparently versioning information are not accessible for reports like model/object attributes,

c.f. this topic

 

0
by Roman Joss Author
Posted on Thu, 01/13/2011 - 14:24

THanks for the answer.

This may be correct  for the report wizzard, but not for scripting. There is a standard-report in the categorie 'analysis' (Reportname in deutsch: modellversionen vergleichen) that use the versioning-component 'var compVersioning = Context.getComponent("Versioning");'

With the method 'getModelRevisions ( Model p_Model )' you get all versions of the model. but also such in the future (if you are logged in with a selected older db-version).



My interest is now, how can i get the db-version, the user is logged into the database respectively how can i get the model-version, the user startet the report from.



thanks for your help

Roman

0
by Martin Schröder
Badge for 'Contributor' achievement
Posted on Thu, 01/13/2011 - 16:57

Sorry, you are right, it seems I resigned too early on Eva Klein's reply.

The "db-version" is the Change List no. in Aris terms, which the user selects when logging into the database. The 2nd of 3 Aris Script Help entries for the Method openDatabaseVersion ( ..., int p_nVersionID ) on the Report class ArisData page gives an example on how to select a specific Change List no. when opening a versioned DB programmatically.

But I am afraid for your purpose there is missing a method like getSelectedChangeList() to retrieve the actual change list no. selected by the ActiveUser in order to find the model revision no. 

 

0
by Roman Joss Author
Posted on Fri, 01/14/2011 - 08:25

Thanks for your informations. Therefore i have to create the needed methods by myselfe.

Regards,

Roman

0
by Roman Joss Author
Posted on Fri, 01/14/2011 - 16:35

Good idea, i'll go on...

0
by Sankaran Saminathan
Posted on Sat, 03/12/2011 - 17:43

Hi,

 var aModelRev = compVersioning.getModelRevisions(oModel);

The above returns number of versions of a corresponding model.  So if I have 3 versions saved for a model, it shows correctly.  But how do I open particular version of the Model in Script?

My requirement is to show version 1 of the model (objects and attributes) in one section of the report and version 2 in another section (assumption is each model will have only 2 versions)

 

Any ideas?

 

Cheers

Sankaran

 

 

0
by Brandon Wicklund
Posted on Mon, 03/14/2011 - 14:49

This will get you the list of versions:

var database = ArisData.getActiveDatabase();
var versioning = Context.getComponent("Versioning");
var changeListInfo = versioning.getChangelistInfos(database);

This will open the first database version from changeListInfo:

var dbVersion = ArisData.openDatabaseVersion(database.Name(locale),changeListInfo[0]);

 

0
by Sankaran Saminathan
Posted on Tue, 03/15/2011 - 07:41

Thanks,  It worked :)

0
by ravi kiran
Posted on Tue, 08/23/2011 - 07:28

hi  brandon

I am new of aris I have a question. I have to change group level

after what were the changes  done.I have to display that list

how it will done

could u tell me

thanks

 

0
by ravi kiran
Posted on Tue, 08/23/2011 - 07:29
var g_nLoc = Context.getSelectedLanguage(); 
var oSelGroups = ArisData.getSelectedGroups(); 
  for(var i=0; i<oSelGroups.length; i++){ 
      var oModels = oSelGroups[i].ModelList(true);   
      for(var j=0; j<oModels.length; j++){    
          var oModel = oModels[j];     
          var description = oModel.Attribute(Constants.AT_DESC,g_nLoc);  
      description.setValue("Under review – not yet approved"); 
    }
  } 
  var database = ArisData.getActiveDatabase(); 
  var versioning = Context.getComponent("Versioning"); 
  var changeListInfo = versioning.getChangelistInfos(database); 
  var dbVersion = ArisData.openDatabaseVersion(database.Name(locale),changeListInfofunction createHeader() {
   
   
   
   g_ooutfile.BeginTable(200, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
    g_ooutfile.TableRow();
    g_ooutfile.TableCell("Process ModelName", 50, "Arial", 10, Constants.C_WHITE, Constants.C_DARK_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VCENTER, 0);
    g_ooutfile.TableCell("Description", 50, "Arial", 10, Constants.C_WHITE, Constants.C_DARK_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_CENTER | Constants.FMT_VCENTER, 0);
    g_ooutfile.TableRow()
}
}
main();

 

0
by ravi kiran
Posted on Tue, 08/23/2011 - 07:30

here i got error

 

0
by Roman Joss Author
Posted on Tue, 08/23/2011 - 09:07

Hi,

i dont understand what you want to do. If you would like to change the group where a mode has to be moved to, then you can use the Model-Method 'ChangeGroup(args)'. As argument you should use the Object of the new Group.

Hope that was you were looking for.

Regards,

0
by Bernd Schickerbauer
Posted on Thu, 08/25/2011 - 09:24

Hi @all.

My intention is to create a kind of  "version history" for a .doc report - a version history on model level, i.e. the report is started on a model.

 

I did the following:

var sModel =  ArisData.getSelectedModels()[0];
var vcomponent = Context.getComponent("Versioning");
var rlist = vcomponent.getModelRevisions(sModel);

The "rlist" is an array of 2 versions  - that's correct.... the method help says that the return value of the "getModelRevisions"-Method is of type "RevisionInfo[ ]".

How Can i fetch now further details to these two array items (versions)? Because the methods "getChangeListInfo()" or "getRevisionNumber() do not seem to work?

 

Hoping for some hints.

 

BR

Bernd

 

 

EDIT 25.08.2011:

Got it. As the return value is an array of model revisions, you have to execute the "getChangeListInfo()" to a single item in that array. Once you got the change list for one array item ( = one model revision), you can fetch user, id, description and timestamp.

 

for (var a=0; a<rlist.length; a++){
        var rli = rlist[a].getChangeListInfo();

        var rUser = rli.getUser();
        var rStamp = rli.getSubmitTimeGMT0();
        var rID = rli.getID();
        var rDesc = rli.getDescription();

}

 

 

0
by ravi kiran
Posted on Mon, 09/05/2011 - 15:24

hi i am new of aris could u tell me

how to disply list of version object numbers

thanks

 

0
by Sankaran Saminathan
Posted on Tue, 09/06/2011 - 13:04

Hi Ravi:

Here is the code snippet,

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

var aModelRev = compVersioning.getModelRevisions(p_aModel[i1]);                                            

if (aModelRev.length != 0)

      var sFirstRev = p_aModel[i1].Name(nLocale);

      var secondRev = aModelRev[aModelRev.length-1].getChangeListInfo()

0
by ravi kiran
Posted on Wed, 09/07/2011 - 06:35

hi sankaran

p_aModel[i1]);

here shows error

thanks for your suggessions could u tell me

 

0
by Vivek Ingle
Posted on Wed, 09/25/2013 - 11:39

Hi All,

 

Thanks & regards

Vivek Ingle

0
by Ignacio Cardenal
Posted on Wed, 08/20/2014 - 10:49

Hi all,

Does anyone knows how can i show model version in Business Publisher via scripting?

 

Context.getComponent("Versioning")

return null value when it is executed  in Business Publisher.

I´m working with 9.6 ARIS version.

Thanks in advance

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock