« Back to AAU Project

Getting Connectors IDs of a specific type

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Getting Connectors IDs of a specific type?
I found the command  "GET_CONNECTORS" which gives back the is_inside also. What we need is the connectors of type "Flow" only, is there any specific command for that?
Thanks

RE: Getting Connectors IDs of a specific type
Answer
7/3/15 6:03 AM as a reply to Fadi Al Machot.
Dear Fadi,

Thank you for your question. For getting only the instances of a special relation using the command GET_CONNECTORS  can be done in the following way:

 1CC "Core" GET_CONNECTORS objid: (objid)
 2#-->RESULT ecode:intValue objids:strValue
 3SET sConnectorList: (objids)
 4SET sFlowConnectorList:""
 5FOR i in: (sConnectorList) {
 6  CC "Core" GET_CLASS_ID objid: (VAL i)
 7  #--> RESULT ecode:intValue classid:intValue
 8  SET nObjClassId: (classid)
 9  CC "Core" GET_CLASS_NAME classid: (nObjClassId)
10  #--> RESULT ecode:intValue classname:strValue isrel:intValue
11  SET sObjClassName: (classname)
12     IF (sObjClassName="Flow") {
13     SET sFlowConnectorList: (tokunion (sFlowConnectorList , i, " "))
14     }
15}


In this case I would suggest you to work with AQL. The following AQL delivers the same output like the AdoScript above.

1CC "Core" GET_OBJ_NAME objid: (objid)
2SET sObjname: (objname)
3CC "AQL" debug EVAL_AQL_EXPRESSION expr: ("({\""+sObjname+"\"} -> <\"anyRany\">) OR ({\""+sObjname+"\"} <- <\"anyRany\">)") modelid: (modelid)

You can find the AQL documentation at the following Link:
http://www.adoxx.org/live/adoxx-query-language-aql