EA14.0与EA12.5中Deployment Specification行为差异及迁移问询
Having worked extensively with Enterprise Architect across versions, I’ve encountered this exact behavior shift when dealing with Deployment Specification elements. Let’s break down the differences and address your technical questions clearly:
Overview
In EA 12.5, using Deployment Specification was straightforward: you only needed to set the Instance Classifier to configure run states via the Ctrl+Shift+R shortcut—no Parent configuration required.
In EA 14.0, however, the rules changed entirely: you must specify a Parent to access overridable properties, while still setting an Instance Classifier (which can even be an unrelated object with no bearing on the properties you’re configuring).
EA 12.5: Steps to Set Run State
- Set the
Instance Classifierfor theDeployment Specification - Select
Select Run State(via theCtrl+Shift+Rshortcut or menu) - Define
Variablesbased on the attributes of theInstance Classifier - The final
Deployment Specificationwill display theInstance Classifierclass, serving as the foundation for yourVariablesconfiguration
EA 14.0: Steps to Configure Property Initializers
- Following EA 12.5’s steps directly will trigger an error
- After assigning a
Parentto theDeployment Specification, you can configure variables using theParentclass’s attributes - The
Instance Classifiercan be set to any arbitrary object (e.g., aTotally unrelated objectwith no properties) - Bonus note: When opening an EA 12.5 model in EA 14.0, you can view original run states but cannot modify them unless you set the original
Instance Classifieras theParent
Technical Questions & Answers
1. Is this due to an operational mistake?
Almost certainly not. This is a deliberate behavior change introduced in EA 14.0, not a result of incorrect steps. Many users have reported the same shift in community discussions, so it’s highly unlikely you’re making an error in your workflow.
2. What’s the background and reason for this behavior change?
Sparx Systems likely adjusted this to align Deployment Specification behavior more closely with UML standards, where the Parent element is intended to be the primary source of inheritable properties. This change also enforces a more structured model hierarchy, ensuring property configuration is tied to a clear parent element rather than relying solely on the Instance Classifier. Additionally, it may have been part of a broader refactor of how EA handles runtime configuration elements to improve consistency across the tool.
3. How can I batch migrate existing Deployment Specification objects across multiple models?
You have two reliable options:
- Use EA’s API: Write a simple add-in (using C#, VB.NET, or PowerShell via COM interop) that iterates through all
Deployment Specificationelements in your models. For each element, set itsParentproperty to the value of its existingInstance Classifier. This is the safest method as it works within EA’s native object model. - Direct database update: If your models use a local database (like SQL Server Express or SQLite), you can run a SQL script to update the
t_objecttable. Look for objects whereObject_Type = 'DeploymentSpecification', then set theParentIDto theClassifierIDvalue. Always back up your model before making direct database changes to avoid data corruption.
内容的提问来源于stack exchange,提问作者Ronald Rink 'd-fens'

