Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 234740

Summary: Lanes are not associated with activities on creation
Product: z_Archived Reporter: Antoine Toulmé <antoine>
Component: BPMNAssignee: Antoine Toulmé <antoine>
Status: RESOLVED FIXED QA Contact: Oisin Hurley <oisin.hurley>
Severity: normal    
Priority: P3 CC: soa.bpmnmodeler-inbox, till.essers
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Antoine Toulmé CLA 2008-05-29 18:14:55 EDT
When a lane is created, its activities are not computed automatically and added to it.

This can be done by adding something in the SubProcessCreationEditPolicy.
Comment 1 Till Essers CLA 2008-05-30 02:55:48 EDT
Are you sure it is SubProcessCreationEditPolicy? I thought this is meant for subprocesses not lanes.

I tried adding the SetActivitiesCommand from ResizableLaneEditPolicy, but it has no effect. Maybe this is never called when a Lane is created ;)
Comment 2 Till Essers CLA 2008-05-30 04:14:55 EDT
Another problem maybe you can give me a hint:
I've a class LaneCreationEditPolicy extending CreationEditPolicyEx and have overriden the getCreateElementAndViewCommand(). After I've done this I installed the policy in the LaneEditPart with the role CREATION_ROLE in createDefaultEditPolicies().
But it is never called? What is it I've done wrong.

Hope you don't mind me bothering you with all those questions.

Thanks
Comment 3 Antoine Toulmé CLA 2008-05-30 04:22:01 EDT
Two things:
the name of the SubProcessCreationEditPolicy is confusing, this edit policy is actually used in pools and subprocesses.

The CREATION_ROLE role for a lane will never be called, only containers are being called with requests of that type.

You need to be able to catch the call made in SubProcessCreationEditPolicy when a lane is called.
Comment 4 Antoine Toulmé CLA 2008-05-30 05:47:05 EDT
It is fixed.

svn ci -m "fix for bugs 234740 and 234741"
Password: 
Sending        org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/policies/PoolPoolCompartmentXYLayoutEditPolicy.java
Sending        org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/policies/ResizableLaneEditPolicy.java
Sending        org.eclipse.stp.bpmn.diagram/customsrc/org/eclipse/stp/bpmn/policies/SubProcessCreationEditPolicy.java
Transmitting file data ...
Committed revision 2294.
Comment 5 Till Essers CLA 2008-05-30 05:50:02 EDT
Your Kung Fu is bigger then mine ;)
Nice one, will test it.