|Restricting nodes as children of the main Activity [message #498236]
||Mon, 16 November 2009 04:20
| Josh M
Registered: July 2009
Hello again! Picking up from my last post (thanks again Marc!) I took a look at the EPC view sample and have successfully created my own view and have happily been extending the metamodel for some custom needs. I've hit an obstacle that I was hoping someone here might have a workaround for....|
I created an extension plugin that defines my metamodel (extending off of jwt-we) and have some custom actions (extending from ActivityNode). There is some more subclassing I do from there. For example:
ActivityNode <--- TypeA_CustomNode
ActivityNode <--- TypeB_CustomNode
Similarly, I also extended the StructuredActivityNode:
StructuredActivityNode <--- CompositeNode
The desired functionality:
I would like to be able to create an Activity that I can add nodes of TypeA to, as well as my CompositeNode, but I would like to restrict nodes of TypeB from being drop directly to the main Activity, and constrain them only to the CompositeNode. (Type A can be placed anywhere)
Running through the code it seems because ActivityNode is the superclass, the CreateChild Request is fulfilled by the ScopeLayoutEditPolicy, which, though no fault of its own, only cares about the ActivityNode being added to the Activity. I would love to be able to inject the logic to cancel the command if the ActivityNode is of TypeB, but I can't do that.
Is there any combination of EditPolicies or extension points that could realize this type of behavior?
At the recommendation of Mr. Dutoo, I will also be posting this to the jwt mailing list.
Thanks in advance for any help you can offer!!
Powered by FUDForum
. Page generated in 0.01697 seconds