Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] validating new embedded connections

Hi Greg,

 

I think the current connection binding mechanism in Sapphire is sufficient for your need to prevent connections between states if you make small changes to your model. The transitions embedded inside “state” and the transitions embedded inside “task” can be defined differently. For the transitions inside “state”, the “target” should be a reference to a “state” element. For the transitions inside “task”, the “target” can be a reference to either a “state” or “task” element. You might want to have a super class for “state” and “task”. So the target reference in task’s transition element can point to the super class, while the target reference in state’s transition element can only point to “state” subclass.

 

After you do that, when you try to create connection between a state node and another state node,  you won’t be able to finish the creation of the connection.

 

Let me know if this helps.

 

Shenxue

 

From: Greg Amerson [mailto:gregory.amerson@xxxxxxxxxxx]
Sent: Wednesday, January 18, 2012 11:30 PM
To: Sapphire project
Subject: [sapphire-dev] validating new embedded connections

 

Hey everyone,

 

In my diagram I have two types of elements in my workflow diagram.  States and Tasks.  Tasks can have connections to both States and Tasks.  But States can only have connections to Tasks.  Creating a State to State connection is not valid.  I can easily put a validation service on the transition element, but I can't seem to figure out how to prevent the diagram editor from making a state-to-state connection even possible.  I would like the ability to valid possible end points before the connection is created.  Is this possible to do?  

 

--

Greg Amerson

Liferay, Inc.


Back to the top