MK

Hello,

 

I want to report the "Connection role" (AT_CXN_ROLE) from a connection.

function listOccsStrings(p_Output, p_ObjS, hm_DTbl, p_Array)
    {
        for(var i=0; i<p_Array.length; i++){
            p_Output.OutputLinkF( getAttrStrValue( p_Array[i].ObjDef(), Constants.AT_NAME, gn_Lang ), hm_DTbl.get("BMK"), getString("TEXT_STYLE_DEFAULT") );
            p_Output.OutputF( gs_Empty.concat(" (").concat( getCxnRole( p_ObjS, p_Array[i] ) ).concat(")"), getString("TEXT_STYLE_DEFAULT") );
            if( i<(p_Array.length - 1) ) { p_Output.OutputF( ", ", getString("TEXT_STYLE_DEFAULT") ); }
        }//END::for_i
        function getCxnRole( p_ObjS, p_ObjT){
            var aCxns   = p_ObjS.Cxns( CxnOccDirectionConstants.EDGES_IN, ReportConstants.EDGES_ALL);
            for(var j=0; j<aCxns.length; j++){
                if( ((aCxns[j].SourceObjOcc().equals(p_ObjS)) && (aCxns[j].TargetObjOcc().equals(p_ObjT))) ||
                    ((aCxns[j].SourceObjOcc().equals(p_ObjT)) && (aCxns[j].TargetObjOcc().equals(p_ObjS))) ){
 //Compare the right Source and Target object from connection
                    return aCxns[j].Attribute(Constants.AT_CXN_ROLE, gn_Lang).getValue();
//Doesnt work :(                
}
            }//END::for_j
            return gs_Empty;
        }//END::getCxnRole()
    }

This is an exapmle EPC:

My wish is to report like this:

 

Function                     Input

Funktion_1                Leistung1 (5)

Funktion_2                Leistung2 (2), Leistung3 (1)

 

Thanks a lot

Marcus Knappe

by Vladimir Bis
Posted on Fri, 12/23/2011 - 08:28

Hi Marcus,

try this code

var oModel = ArisData.getSelectedModels()[0];
var oOccs = oModel.ObjOccListFilter(Constants.OT_FUNC);
var g_nLoc = Context.getSelectedLanguage();

oOccs = ArisData.sort(oOccs, Constants.SORT_Y, g_nLoc);
for (var o = 0; o < oOccs.length; o++){ 
    var oCxnOccs = oOccs[o].CxnOccList();
    for (var c = 0; c < oCxnOccs.length; c++){
      if (oCxnOccs[c].CxnDef().SourceObjDef().TypeNum() != Constants.OT_FUNC &&
          oCxnOccs[c].CxnDef().SourceObjDef().TypeNum() != Constants.OT_EVT &&
          oCxnOccs[c].CxnDef().TargetObjDef().TypeNum() != Constants.OT_EVT)  
        Dialogs.MsgBox(oOccs[o].ObjDef().Name(g_nLoc) + ' ' + oCxnOccs[c].CxnDef().SourceObjDef().Name(g_nLoc));
    }
}
0
by Marcus Knappe Author
Posted on Fri, 12/23/2011 - 09:34

Hi Vladimir,

 

it doesn't work :(

Function                  Input



Funktion_1             Leistung1 (Leistung1)



Funktion_2             Leistung2 (Leistung2), Leistung3 (Leistung3)

 

I want this:

Function                  Input

Funktion_1             Leistung1 (5)// Not the name from SourceObj, the "connection role" between Function and performance(is Input for) (5,2,1)



thanks

0
by Vladimir Bis
Posted on Fri, 12/23/2011 - 10:35

Where are placed these numbers 5, 2, 1 - in connection "Identifier" attribute?

0
by Marcus Knappe Author
Posted on Fri, 12/23/2011 - 12:31

They were placed in connection "connection role" (AT_CXN_ROLE) attribute.

Not in "Identifier", because it's possible that two different performances have the same number to a function or a performance have the same number to two or more functions... The number isn't unique :)

0
by Vladimir Bis
Posted on Fri, 12/23/2011 - 18:41

OK Marcus. I can read this atrribute:

Dialogs.MsgBox(oOccs[o].ObjDef().Name(g_nLoc) + 
'\n' + oCxnOccs[c].CxnDef().Attribute(Constants.AT_CXN_ROLE, g_nLoc).GetValue(true));
0
by Vladimir Bis
Posted on Fri, 12/23/2011 - 18:49
   
Dialogs.MsgBox(oOccs[o].ObjDef().Name(g_nLoc) +
'\n' + oCxnOccs[c].CxnDef().Attribute(Constants.AT_CXN_ROLE, g_nLoc).GetValue(true));
0
by Vladimir Bis
Posted on Fri, 12/23/2011 - 19:00

Sorry for double comment...I don't know delete comment...

0
by Marcus Knappe Author
Posted on Mon, 01/02/2012 - 08:52

Thank you Vladimir,

 

it works for me fine. One more Question is, is it possible, to get connections which are are not aktiv in this EPC and which are NOT aktive in an allocation diagrams like "Function allocation diagram" for the functions, but they are aktive in "Product trees".

EPC                                 Product tree      

     

 

Big thanks and a happy new year :)

 
 

 

0
by Vladimir Bis
Posted on Mon, 01/02/2012 - 10:24

Hi Marcus,

try use OccList method for each function:

var oOccs2 = oOccs[o].ObjDef().OccList();
for (var o2 = 0; o2 < oOccs2.length; o2++){
    if (oOccs2[o2].Model().TypeNum() == Constants.MT_PRDCT_TREE){
       Dialogs.MsgBox("Function is in Product tree");
    }
}

Same to you Happy new year :)

0
by Marcus Knappe Author
Posted on Mon, 01/02/2012 - 16:56

It doesn't work :(

If I clean the EPC to normal EPC (only functions and events) then the connection role is lost :(

The products (Leistung 1-3) are shown correktly. If I copy one of the product back to EPC and connect it with its function, it works. But the big target ist normal EPCs and a product tree model.

I try it with a Function allocation diagram, but it doesn't work to :(

0
by Vladimir Bis
Posted on Tue, 01/03/2012 - 08:13

Hi Marcus,

I'm sorry, but I can't help you now, because it works on my computer - all occurences are listed correctly.

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