1
votes

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"). enter image description here

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.

2
With collect you mean query?qwerty_so
Something like that, yes. The result I need would be a kind of list or matrix (ideally for all lanes), such as: "lane A -> Task 1, Task 2" and "lane B -> Task 3, Task 4, Task 5"Walter Kuhn

2 Answers

1
votes

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.

0
votes

Based on Geert Bellekens solution, I simply added the last where clause...

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)
left join t_object act on (act.ParentID = o.Object_ID
                    and act.Stereotype = 'Activity'))
where (o.Stereotype = 'Lane' and act.Stereotype = 'Activity')

Finally, in the query result, grouped by Generic Element