Hi,
Let's assume an Operational Activity with some (Actual) Measurement Set,
Suppose you want to access this set during simulation.
So far, I can use a "valueSpecification" action to get the content of an Actual Measurement Set, and then cascade it with "readStructuralValue" to get the fields I want.
Now, I want to access the sets attached to my Operation Activity. So far so good, I could get the set via "r=ALH.getTagValue("actualMeasurementSet");"
But the I am stuck with the next steps. I have to somewhat wrestle with the type hierarchy to access the internal data, but I do not know where to start
A naive attempt at using ALH.getValue ends up with an exception
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.nomagic.magicdraw.simulation.utils.ALH.getValue() is applicable for argument types: (com.nomagic.uml2.ext.magicdraw.classes.mdkernel.impl.InstanceSpecificationImpl...) values: [com.nomagic.uml2.ext.magicdraw.classes.mdkernel.impl.InstanceSpecificationImpl@2177e2d0 _2022x_2_f2f0366_1746039938903_39582_92846/efbca994-7a53-4904-9b7c-ee791e9a8670, ...]
Possible solutions: getValue(fUML.Semantics.Classes.Kernel.StructuredValue, java.lang.String), setValue(java.lang.String, java.lang.Object), setValue(fUML.Semantics.Classes.Kernel.StructuredValue, java.lang.String, java.lang.Object), getCaller(), getClass(), getTagValue(java.lang.String)
expression body: o=ALH.getValue(i, "ExecutionTime");
Can someone share some experience on this? I presume there are several errors. First, getTagValue returns an object, but most certainly it is somewhat of a collection. So I need additional conversions to get to the actual measurement set of interest.
Thanks,
Regards
