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

 or register to reply.

Notify Moderator