IS

Hello!

I try to output some attributs from objects from BP by script and use "Attribute(int attrTypeNum, int localeID)" function for it.

In ARIS help there is not note "This method is also available in Business Publisher Report."  And all other Item-class functions don't have this note.

Script always finish succesful. But result sumetimes is proper and is not proper other times. Do someone know how to get attribute values form objects in BP reports? Functions like Name(-1) and GUID() always work properly.

Thanks! 

by Jens Heylmann
Posted on Mon, 05/14/2012 - 14:48

Hi Iiya,

I never had problems with this function in the past in ARIS Business Publisher

/Jens

0
by Srinivas CH
Posted on Fri, 05/18/2012 - 12:17

Hi IIya,

Please check the below code, We need to use appropriate API Name of the attributes in an object. The below code consists of the API's which I used in my local,

var nLocale=Context.getSelectedLanguage();
function main(){
// creates an output object
var oOutput=Context.createOutputObject();
//Begining of a table
oOutput.BeginTable(100,Constants.C_DARK_BLUE, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
oOutput.TableRow();
oOutput.TableCell("Object Name",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Identifier",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Type",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Description",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Time of Generation",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Creator",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Last Change",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.TableCell("Last User",30,"Arial",10,Constants.C_BLACK, Constants.C_LIGHT_YELLOW, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP, 0);

var models=ArisData.getSelectedModels();
for(var i=0;i<models.length;i++){
    var oModel=models[i];
    var objects=oModel.ObjDefList();
    for(var j=0;j<objects.length;j++){
        var oObject=objects[j];
        var sobjectName = oObject.Name(nLocale);
        var sobjectID = getAttributeValue(oObject,Constants.AT_ID);
        var sobjectType = oObject.Type();
        var sobjectDesc = getAttributeValue(oObject,Constants.AT_DESC);
        var sobjectTOG = getAttributeValue(oObject,Constants.AT_CREAT_TIME_STMP);
        var sobjectCreator = getAttributeValue(oObject,Constants.AT_CREATOR);
        var sobjectLC = getAttributeValue(oObject,Constants.AT_LAST_CHNG_2);
        var sobjectLU = getAttributeValue(oObject,Constants.AT_LUSER);
        oOutput.TableRow();
        oOutput.TableCell(sobjectName,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); 
        oOutput.TableCell(sobjectID,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);  
        oOutput.TableCell(sobjectType,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        oOutput.TableCell(sobjectDesc,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        oOutput.TableCell(sobjectTOG,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0); 
        oOutput.TableCell(sobjectCreator,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);  
        oOutput.TableCell(sobjectLC,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        oOutput.TableCell(sobjectLU,30,"Arial",10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
    }
}
oOutput.EndTable("",100,"Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOutput.WriteReport();
function getAttributeValue(oItem,nAttrType){
    var oAttr=oItem.Attribute(nAttrType,nLocale);
    var sAttrValue=oAttr.getValue();
return sAttrValue;
}
}
main();
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
  • SS
  • MZ
  • Profile picture for user kbiront
  • Profile picture for user Tony Iliev
  • Profile picture for user amandeep.7.singh
  • PacMan

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