}
public static GraphNode addServiceInstance(Graph g,
GraphNode serviceNode,
ServiceBeanInstance sbInstance) {
Node instance = g.addNode();
g.addEdge(serviceNode.getTableNode(), instance);
instance.set(VisualItem.LABEL, "");
GraphNode graphNode =
new GraphNode(sbInstance.getServiceBeanConfig().getInstanceID(),
serviceNode.getServiceElement().getOperationalStringName(),
(TableNode) instance);
instance.set(Constants.USER_OBJECT, graphNode);
if (graphNode.getInstance() != null) {
if (graphNode.getServiceItem() == null) {
instance.set(Constants.STATE, Constants.ACTIVE_NO_SERVICE_ITEM);
} else {
instance.set(Constants.STATE, Constants.ACTIVE);
}
} else {
instance.set(Constants.STATE, Constants.FAILED);
}
/*
if(graphNode.getServiceItem()==null) {
instance.set(Constants.STATE, Constants.FAILED);
} else {