ARIS Community - We Love BPM

Extracting Attribute information from Model

nictan86's picture
by Nicholas Tan in Reports & Macros posted on 2017-12-15

Hi I'm trying to retrieve all the object attributes in the BPMN model, i have tried looking around in the forum. but no avail in my search with my limited knowledge in this area.

Hoping someone can help me, here is a sample of my report scripting.

I would eventually need someone to show me how to extract all the attributes in a single object, so i could customize which attribute i could put into the report.

 

var oOutput = Context.createOutputObject();     // Output object
var nLocale = Context.getSelectedLanguage();    // Selected database language
 
var aModels = ArisData.getSelectedModels();     // Array of selected models
for (var i = 0; i < aModels.length; i++) {            
var oModel = aModels[i];                    // Current model
var sModelName = oModel.Name(nLocale);      // Name of current model
 
oOutput.OutputLn("Model: " + sModelName, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
     
var aObjDefs = oModel.ObjDefList();         // All object definitions that have occurrences in the model
for (var j = 0; j < aObjDefs.length; j++) {            
var oObjDef = aObjDefs[i];              // Current object definition
var sObjName = oObjDef.ObjectData(nLocale) //Attribute(Constants.AT_BPMN_ACTIVITY_TYPE , nLocale);   // Name of current object
         
oOutput.OutputLn("Object: " + sObjName, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 10);
    }    
}
oOutput.WriteReport();

 

984 Views
0 Likes
3 Comments
Sorry there are no tags
There are no attachments
Robert Goldenbaum posted on 2017-12-15

var sObjName = oObjDef.Attribute(Constants.AT_NAME, nLocale).getValue()

Nicholas Tan posted on 2017-12-17

Hi based on this

var sObjName = oObjDef.Attribute(Constants.AT_NAME, nLocale).getValue()

i am guessing that there is Constants, is there a way to see a list of constants?

 

Robert Goldenbaum posted on 2017-12-18

Yes sure - in the ARIS administration tab - configuration - method...