Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DAHLing

Pages: [1]
1
Hi,
thank you all, it works:

Code: [Select]
void getConnector(Element pElement, Repository repository){
      Iterator <Connector> connector = pElement.GetConnectors().iterator();
      System.out.println("Element: "+pElement.GetName());
            while (connector.hasNext()){
            Connector conn = connector.next();
            String endTarget = conn.GetStyleEx();
            System.out.println("Endtarget: "+repository.GetAttributeByGuid(endTarget.substring(5,43)).GetName());
            }
      }

2
Thanks, I'll check it today.

3
I can not find a topic about how to get the details for the linked feature.
Can you help again please? Sorry... :-/

4
Yes, you are right. Thanks so much!

5
The problem is that connector seems to be empty and the program will not go into the while-loop.

Should it work for an association and "Link to Element Feature"?

Wir können auch über PM deutsch schreiben, wenn es für Sie okay ist ;)

6
Hi qwerty,

thanks for your fast answer.
Unfortunately I don't have much experience in java programming, so I hope you can help me one more time please.

When I try the code below, it seems that "connector" is empty, because there is no output of "Endtarget:".
Is the code not correct or could it be there is something wrong in the model?

Code: [Select]
void writeTestScript(Repository repository, String gUID)
{
Package eaPackage = null;
eaPackage = repository.GetPackageByGuid(gUID);
Iterator <Connector> connector = eaPackage.GetConnectors().iterator();
while (connector.hasNext()){
Connector conn = connector.next();
String endTarget = repository.GetElementByID(conn.GetSupplierID()).GetName();
System.out.println("Endtarget: "+endTarget);
}      
}

Thanks,
Markus

7
Hi,

We use the interface with java and have now the problem that we don't know how we can get the name or alias from the endpoint of an association. We use the function "Link to element feature."
For example: We have a mask (first name, last name, save button) and for this a business object with first name, last name. The input field from the mask has the association to first name from business object and last name from mask has also an association to last name attribute from business object. Now we want  write a script that automatically looks for the business attribute for an input field from a mask. But we have no idea how we have to do it. We tried it with some methods from Connector, but without any successful results....

I hope my description is understandable... ;)

thanks

Markus

Pages: [1]