我有几个在EA中建模的业务流程。它们都有相同的通道,因此(正如我在一些教程中所看到的),我添加了一个泛型元素,而流程通道都通过"partitionElementRef“引用同一个泛型元素。(请参见屏幕,较低的业务流程包含一个通道捕获,它链接到“分配给角色的通道”)。

如何向EA查询,我可以收集引用同一车道的不同业务流程中的所有活动?这样的话,我就可以从所有业务流程中收集到所有具有相同车道的元素“捕获”?因此,一个列表或一个矩阵将是完美的。
发布于 2019-11-27 07:12:31
我认为您不应该对泛型元素使用Lane,而是使用BPMN PartnerRole或PartnerEntity元素。
使用通道将违反BPMN语法。
此外,如果您想查询模型以获取所有通道及其泛型元素,则可以使用如下查询
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'Lane用带有标记的值PartitionElementRef链接到泛型元素,该值包含泛型元素的guid。
如果您想在您的车道上获得活动,您可以使用t_object再次使用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'额外提示:如果你把车道的名字空着,它会在图表上显示通用元素的名字。
发布于 2019-11-27 09:33:12
基于Geert Bellekens的解决方案,我只是添加了最后一个where子句.
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')最后,在查询结果中,按泛型元素分组
https://stackoverflow.com/questions/59055678
复制相似问题