Hi ,
I want to create a connection between entity type object and data collection object in table type model.
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.
Note: 1)created_entity means occurence of created entity type object.
2)created_collection means occurence of created data collection object.
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(); // here starting point of connection/relationship is entity.
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;
}
I am getting null in cnx variable.
If I will make data collection object as a source and entity type object as a destination then it is working fine but I want to make entity type as a source object in this case it is not creating connection.
see below mentioned case in which connection is created after changing source and destination.
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(); // here starting point for connection/relationship is collection.
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;
}
but I want to make entity type object as a source.
relationship between entity type and data collection should be "Depicts".
Please suggest. your one suggestion can resolve my high priority issue so please help me guys.
Please let me know in case you want more clarification.
Thanks,
Ankit