Activity partition


how can I get the activity partition containing the action?
Method getParent() for action return null.


Hi Anita,

Sorry for my late reply. I’ve passed the details to our engineers to follow-up, and will keep you informed for any news about this issue.

Best regards,
Lilian Wong

Hi Anita,

Partition contains its children in its property PROP_CONTAINED_ELEMENTS (not parent-child)

Therefore you need to get Partition from its child and call the following function:

IModelElement model = …; // <---- the model of Action
IModelElement[] models =
IModelElementFactory.MODEL_TYPE_ACTIVITY_PARTITION, // <------ owner’s modelType (Partition’s modelType)
IActivityPartition.PROP_CONTAINED_ELEMENTS // <----- owner’s propertyName (Partition’s PROP_CONTAINED_ELEMENTS)

PS: return is IModelElement[], it is because a model may be referenced by more than 1 owner

I hope this will help. If there is any further inquiry, please do not hesitate to contact me.

Best regards,
Lilian Wong