Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Cascading updates
Cascading updates [message #667245] Wed, 27 April 2011 15:24 Go to next message
Daniele is currently offline DanieleFriend
Messages: 45
Registered: August 2010
Member
Hi Graphiti,

I was wondering whether it is possible to have cascading updates for PE and BO or not.

Let me explain.

Suppose that I have a graph with nodes and links, where nodes have numbers and links convey simple operations + - * /

Suppose also that the PE for each node shows on the diagram the associated BO's number, and that it can be modified in the property panel (i.e., by modifying the BO).

Now, suppose that I have the simple graph:

A1 = 3
A2 = 5

A1 --(+)-> A
A2 --(-)-> A

A = -2

Which means that I have a graph with three nodes, in which the node A is calculated by using the node values A1, A2 and by considering the two operation links + and -.

Now what I want is that : When I change the values of A1 or A2 in the property panel, other than updating the PE of A1 or A2, the BO's number value of A is automatically updated as well as its PE.

Is there a way to notify and trigger a general algorithm (a class) which can propagated such a cascading update on all PE and BO elements belonging to the graph.

Thank you so much for you help!
Daniele



[Updated on: Wed, 27 April 2011 17:26]

Report message to a moderator

Re: Cascading updates [message #667332 is a reply to message #667245] Thu, 28 April 2011 07:45 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Daniele,

that can be achieved by linking the PE for A with all relevant influencing
BOs (in the example A1 and A2). By doing that the update fetaure for A will
be triggered as soon as a A1 or A2 change. The update feature can then
calculate the display value anew. This is a kind of depends-on scenario,
where you would link a PE to all BOs that potentially influence it.

Another way would be to enhance the update features for A1 and A2 to follow
the outgoing dependencies and trigger updates for all linked PEs (or do the
update themselfes).

HTH,
Michael


"Daniele" wrote in message news:ip9c0f$pg6$1@news.eclipse.org...

Hi Graphiti,

I was wondering whether it is possible to have cascading updates for PE and
BO or not.

Let me explain.

Suppose that I have a graph with nodes and links, where nodes have numbers
and links have simple operations + - * /

Suppose also that the PE for each node shows the associated BO number on the
diagram and that can me modified in the property panel (i.e., by modifying
the BO).

Now, suppose that I have the simple graph:

A1 = 3
A2 = 5

A1 --(+)-> A
A2 --(-)-> A

A = -2

Which means that I have a graph with three nodes, where the node A is
calculated by using the node values A1, A2 and by considering the two
operation links + and -.

Now what I want is that : When I change the values of A1 or A2 in the
property panel, other than updates the PE of A1 or A2, the BO value of A is
automatically updated as well as its PE.

Is there a way for notify and trigger a general algorithm which can
propagated such a cascading updated on all the PE and BO elements in the
graph.

Thank you so much for you help!
Daniele
Re: Cascading updates [message #667549 is a reply to message #667245] Fri, 29 April 2011 13:42 Go to previous message
Dobrou Mising name is currently offline Dobrou Mising nameFriend
Messages: 16
Registered: December 2010
Junior Member
Maybe overriding and implementing method IDiagramTypeProvider.getRelatedBusinessObjects(Object[] bos); in your DiagramTypeProvider may help.

For every object from "bos" you would return list of dependend objects in your graph - and graphiti will update all those objects.

NOT TESTED - I'm just guessing from inspecting this method and where it is used.
Please leave here a note if it's working if you try it...
Previous Topic:How to change line dash patterns?
Next Topic:How to embed Graphiti in another application
Goto Forum:
  


Current Time: Sat Sep 21 00:47:06 GMT 2024

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

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

Back to the top