我在Enterprise Architect 14上。我有一个包含接口User
和两个类Employee
和Customer
的组件图,其中realize
接口{{1 }}
此外,我创建了两个实例,每个类之一,并通过User
>指定属性的值。 Features & Properties
。
接下来,我创建了一个包含2个属性的组件,一个类型为Set Run State...
,另一个类型为Employee
。然后我创建了一个组件的实例。
现在,我想通过将Customer
分配给ArbitraryUser
属性并将Employee
分配给组件实例的ArbitraryCustomer
属性来设置组件实例的运行状态。根据文件,这应该是可能的(见here)。
在运行时,Object实例可以具有其属性的特定值,或者以特定状态存在。要在运行时模拟对象的变化行为,请使用从“选择”对话框和运行时状态或运行状态中选择的实例值。
但是我无法弄清楚如何做到这一点。有人能帮助我吗?
答案 0 :(得分:0)
AFAIK that is not possible.
I'm not sure what the quote from the help really means, but I've only ever been able to type a value for the run state.
An partial alternative would be to use associations rather than attributes to model such relations. Then you can create a link as an instance of the association to relate instances of Employee
or Customer
with instances of a ArbitraryComponent
.
This solution doesn't work for datatypes, but it seems a bit far fetched to start modelling instances of datatypes.