Skip to main content



      Home
Home » Eclipse Projects » Sirius » Java Service
Java Service [message #1860882] Thu, 07 September 2023 03:03 Go to next message
Eclipse UserFriend
Hi community !

I'm trying, with no success so far, to get a functional Java Service in my odesign project.

I'm pretty sure that my service is correctly registered, because the autocompletion works and propose the methods that I've written. Also, if I suppress the Java extension declaration, the validation tells me that the services can't be found.

But.

But nothing happens then. For example, I have a simple Task concept with an attribute 'name' and the service below returns nothing:

public String getTaskName(Task task) {
    	return task.getName();
    }


or when I try to calculate a collection, it seems to return nothing:
    public List<Task> getAllTargets(Task task) {
      List<Task> targets = new ArrayList<>();
      targets.add(task);
      return targets;
    }


Have anyone have a clue about what I've missed ?

Thx
Re: Java Service [message #1860884 is a reply to message #1860882] Thu, 07 September 2023 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

The code for the service methods seem fine, so the problem is probably elsewhere.

How do you invoke these in your odesign?
Re: Java Service [message #1860887 is a reply to message #1860884] Thu, 07 September 2023 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Pierre-Charles,

for example, on a Relation Based Edge whose Source and Target mappings are 'Task node', I'm trying to use the getAllTargets() service in the 'TargetFinder Expression' with
aql:self.getAllTargets()


or in a Label Expression, under the 'Task node', I'm using
aql:self.getTaskName()

[Updated on: Thu, 07 September 2023 04:45] by Moderator

Re: Java Service [message #1861111 is a reply to message #1860887] Thu, 21 September 2023 05:50 Go to previous message
Eclipse UserFriend
Hi,

at last, it works... but I had to delete my Eclipse workspace and re-import my projects.

So, I don't know where the problem was.
Previous Topic:Sirius at EclipseCon 2023
Next Topic:Creating multiple views for an element
Goto Forum:
  


Current Time: Fri Jul 04 18:16:02 EDT 2025

Powered by FUDForum. Page generated in 0.03145 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top