Hi, I am using ARIS 7,2 and trying to create a connection between oActObjOcc with aObjOcc in FAD model using script. I get the message "createCxnOcc illegal argumentsl.". And the details provided are as follows:   But it's no problem create connection manually.    
getorCreateCXN(oModel, aObjOcc, oActObjOcc)


    function getorCreateCXN(aModel, SourceOcc, TargetOcc) {
        var CxnTypeList;
        var cCXN = null;
        if ((TargetOcc != null) && (SourceOcc != null)){
            CxnTypeList = ArisData.ActiveFilter().CxnTypes(aModel.TypeNum(), SourceOcc.SymbolNum(), TargetOcc.SymbolNum());
            if (CxnTypeList.length > 0) 
                cCXN = getorCreateCXN2(aModel, SourceOcc, TargetOcc, CxnTypeList[0]);
        }
        return cCXN;
    }


function getorCreateCXN2(cModel, sourceOcc, targetOcc, CXNTypeNumber){
    var iCxnOcc = cModel.Neighbour(sourceOcc, targetOcc)
    if(!isValidItem(iCxnOcc) || iCxnOcc.SourceObjOcc().ObjDef().GUID() != sourceOcc.ObjDef().GUID()){
        
        var sourcePoint;
        var targetPoint;
        
        var import_custom = JavaImporter(Packages.java.awt) ; // Java Package Import
        with(import_custom){
            sourcePoint = new Point(sourceOcc.X() + sourceOcc.Width()/2, sourceOcc.Y()+sourceOcc.Height());
            targetPoint = new Point(targetOcc.X() + targetOcc.Width()/2, targetOcc.Y());
         }
       
        var points = new Array();
        points[0] = sourcePoint;
        points[1] = targetPoint;
    
        iCxnOcc = cModel.CreateCxnOcc(sourceOcc, targetOcc, CXNTypeNumber, points, false, true);
    }
    return iCxnOcc;
}
  oModel - Function Allocation Diagram oActObjOcc - Information carrier type Occurrence aObjOcc - Function type Occurrence CXNTypeNumber - provides input for       2014. 3. 19 ???? 5:09:52 SEVERE: error running Model.CreateCxnOcc(IObjOcc, IObjOcc53,Point[],false,true): IObjOcc.createCxnOcc illegal arguments java.lang.IllegalArgumentException: IObjOcc.createCxnOcc illegal arguments  at com.idsscheer.aris.server.arisomimpl.directctx.AObjOcc.createCxnOcc(AObjOcc.java:117)  at com.idsscheer.aris.server.arisomimpl.methodctx.AObjOcc.createCxnOcc(AObjOcc.java:45)  at com.idsscheer.aris.server.arisomimpl.accessrightctx.AObjOcc.createCxnOcc(AObjOcc.java:28)  at com.idsscheer.aris.server.arisomimpl.arisctx.AObjOcc.createCxnOcc(AObjOcc.java:37)  at com.idsscheer.aris.server.bl.common.reportobjects.aris.logic.AModel.createWithExistingDef(AModel.java:1667)  at com.idsscheer.aris.server.bl.common.reportobjects.aris.logic.AModel.CreateCxnOcc(AModel.java:1630)  at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  at java.lang.reflect.Method.invoke(Method.java:601)  at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:160)  at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243)  at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3335)  at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2484)  at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)  at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)  at com.idsscheer.report.execution.javascript.AScriptContextFactory.doTopCall(AScriptContextFactory.java:281)  at com.idsscheer.report.execution.javascript.ADelegatingContextFactory.doTopCall(ADelegatingContextFactory.java:183)  at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)  at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:173)  at com.idsscheer.report.execution.debugger.backend.AScriptDebugger.startScript(AScriptDebugger.java:166)  at com.idsscheer.report.execution.interpreter.AJReportDebugger.executeReport(AJReportDebugger.java:153)  at com.idsscheer.aris.server.bl.logic.webreport.scripting.AJavaScriptReportThread.run(AJavaScriptReportThread.java:91)  at com.idsscheer.aris.server.bl.logic.webreport.scripting.AJavaScriptDebuggerThread.run(AJavaScriptDebuggerThread.java:36)  at java.lang.Thread.run(Thread.java:722) 2014. 3. 19 ???? 5:09:52 SEVERE: (0): An error occurred in the report object model. error running Model.CreateCxnOcc(IObjOcc, IObjOcc53,Point[],false,true): IObjOcc.createCxnOcc illegal arguments     Best Regards, Toven  

 or register to reply.

Notify Moderator