I have several business processes modelled in EA. All have the same lanes, so (as I have seen in some tutorial) I added a generic element and the process lanes all reference via the "partitionElementRef" to the same generic element. (See screen, the lower business process contains a lane Capture, which is linked to the upper "Lanes assigned to Roles").
How can I query EA that I can collect all activities within the different business processes that refer to the same lane? Such, that I can collect from all business processes all elements with the same lane "Capture"? A list or a matrix would be perfect as a result.
I don't think you should use Lane
for the generic element, but rather use a BPMN PartnerRole
or PartnerEntity
element.
Using lanes would be a BPMN syntax violation.
Apart from that, if you want to query the model to get all lanes and their generic element you can use a query like this
select o.ea_guid AS CLASSGUID, o.Object_ID as CLASSTYPE, o.Name, o.Stereotype, gen.Name as GenericElement
from ((t_object o
inner join t_objectproperties tv on (tv.Object_ID = o.Object_ID
and tv.Property = 'PartitionElementRef'))
left join t_object gen on gen.ea_guid = tv.Value)
where o.Stereotype = 'Lane'
The Lane
is linked to the generic element with the tagged value PartitionElementRef
which contains the guid of the generic element.
If you want to get the Activities in your lane you join again with t_object
using the ParentID
select act.ea_guid AS CLASSGUID, act.Object_ID as CLASSTYPE, act.Name, act.Stereotype,
o.Name as Lane, gen.Name as GenericElement
from (((t_object o
inner join t_objectproperties tv on (tv.Object_ID = o.Object_ID
and tv.Property = 'PartitionElementRef'))
left join t_object gen on gen.ea_guid = tv.Value)
inner join t_object act on (act.ParentID = o.Object_ID
and act.Stereotype = 'Activity'))
where o.Stereotype = 'Lane'
Bonus tip: if you leave the name of the lane empty, it will show the name of the generic element on the diagram.