Profile picture for user toven

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  
by Torsten Haase
Posted on Thu, 03/27/2014 - 10:41

Hi Toven,

this error occurs if the source and target ObjOcc are not Occs in the same model.



BR, Torsten

0
by Toven B Author
Posted on Tue, 04/01/2014 - 02:09

Hi Torsten.

I solved this problem.

 

You're right. It's my fault.

I create Function Type occurrence, "aObjOcc", in EPC, FAD model each.

I tried to connect "aObjOcc" occurrence in EPC to "oActObjOcc" occurrence at FAD.

 

Thanks Torsten.

 

Best Regards,

Toven

0
by Alexey Shmonov
Posted on Mon, 06/23/2014 - 22:09

Hi Toven,

 

I'm trying to create connections on the model, script is running without issues, no errors or so, but there is no connections created.

I stuck with this and I think I tried everything :) I also studied this your fragment of code... 

Is there anything else I should do except CreateCxnOcc? Do you create Connection Definition before?

0
by Toven B Author
Posted on Tue, 06/24/2014 - 04:40

In reply to by shmonoff

Hi Alexey,

 

I know CreateCxnOcc only to create creation on model. 

And I don't create Connection Definition before.

If your script has no errors, please check your Filter setting.

In Filter, connection have to be allowed between objects.

Above sample source, CXNTypeNumber is allowed between two objects in Filter.

 

If you are possible, please show me your script.

 

Regards,

Toven

 

0
by Ankit ranka
Posted on Tue, 09/09/2014 - 13:15

HI Toven,

I need your help in one issue.

I am creating two objects in one model and after that I want to create relationship between those objects.

I am trying to create connections on the [Table type] model, script is running without issues, no errors or so, but there is no connections created.

 

 

 var cxnPoints = astCxnPoints(created_entity,created_collection); //user defined function

       

var cnx = model.CreateCxnOcc(created_entity,created_collection,Constants.CT_DEPICTS_1,cxnPoints);

 

function astCxnPoints(entity,collection) {

    var startXPos = entity.X();

    var startYPos = entity.Y();

   

    var endXPos = collection.X();

    var endYPos = collection.Y();

   

   

   

    var points = new Array();

    points[0] = new java.awt.Point(startXPos,startYPos);

    points[1] = new java.awt.Point(endXPos,endYPos);

   

    return points;

}

 

created_entity  -->      means occurence of entity type in [table type] model

created_collection --> means occurence of data collection in [table type] model

but if I will change the source and destination then it is working fine. see below mentioned case in which I am getting relationship.

 

var cxnPoints = astCxnPoints(created_entity,created_collection); //user defined function



var cnx = model.CreateCxnOcc(created_collection,created_entity,Constants.CT_DEPICTS_1,cxnPoints);

 

 

function astCxnPoints(entity,collection) {

var startXPos = collection.X();

var startYPos = collection.Y();



var endXPos = entity.X();

var endYPos = entity.Y();







var points = new Array();

points[0] = new java.awt.Point(startXPos,startYPos);

points[1] = new java.awt.Point(endXPos,endYPos);



return points;

}

 

 

 

I want to make entity type as a source object and data collection as a destination object. 

I want to connect these object by depicts relationship.

 

please help me guys....

 

Thanks,

Ankit

 

 

 

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

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