kaushal.kishor's picture

Hi,

i am new to ARIS script I have written the below code , i need to check Connection type like Any function or activity connected to org unit and internal person has connection type "is responsible for"

or" is accountable for", this is my code i am stuck can any body suggest 

function Rule_867a0260_5760_11e8_44b4_0050568d644b(selection, ruleID, unused, outputObject)
{
         
     var selModel = selection;
       
  
     for(var i=0;i<selModel.length;i++){
     var config = getConfiguration("2cb291d0-575f-11e8-44b4-0050568d644b");
        
    var objocc = selModel[i].ObjOccList();
  
    for(var j=0;j<objocc.length;j++){ 
        
        var check = objocc[j].ObjDef().CxnList(Constants.EDGES_INOUT)
         
         }  
        for (var k =0;k<check.length;K++){
        var conn = check[k].TypeNum();
        
        
    if(conn =="462" == 0){
        Dialogs.MsgBox("code is working")
      setSemCheckInfoMark(objocc[j],"Connection type error");
    }
}}
}