微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 Enterprise Architect 中获取调用操作操作的操作详细信息

如何解决在 Enterprise Architect 中获取调用操作操作的操作详细信息

我的活动图中有一个 CallOperation 操作。如何通过DB或API获取操作设置为调用操作动作。

enter image description here

解决方法

如果您将 Calloperation 链接到模型中的实际操作,则如下所示:

enter image description here

您可以使用属性中的“行为”选项卡选择操作

enter image description here

API 不会公开此信息,因此您必须自己查找。

操作的 GUID 存储在数据库字段 t_object.Classifier_guid 中。您可以使用方法 EA.Repository.GetMethodByGuid() 进行操作。

这里是如何在我的 framework

中实现的
        /// <summary>
        /// The operation to be invoked by the action execution.
        /// </summary>
        public UML.Classes.Kernel.Operation operation { 
            get{
                // first get the operations guid which is stored in the Classifier_guid column
                XmlDocument operationGUIDxml = this.EAModel.SQLQuery(@"select o.Classifier_guid from t_object o
                                    where o.Object_ID = " + this.id.ToString());
                XmlNode operationGUIDNode = operationGUIDxml.SelectSingleNode(this.EAModel.formatXPath("//Classifier_guid"));
                return this.EAModel.getOperationByGUID(operationGUIDNode.InnerText);
            }
            set{
                // no API method available,so we need to update the database directly
//              this.model.executeSQL(@"update t_object
//                                      set Classifier_guid = "+ ((Operation)value).GUID
//                                    + "where Object_ID = " + this.id.ToString();
                //TODO add GUID property to Operation
                throw new NotImplementedException();
                }
        }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。