Add Variable Value
Warning
This is only available in Magic Draw for Enterprie Architect see: Write Variable Action
With add variable value actions you can assign values you provide via object flows, to a code snippet of your choice.
You can add them to your diagram by clicking on the Action
dropdown Any Action
.
After this select the the Add Variable Value Action
in the Action Metaclass
toolbox
The name of the add variable action will be used by Embedded Engineer as it is.
Note that the value
pin isn't shown by default. To get the value pin, click on the add variable value action and select Value Pin:
In this example, we use a value specification
and its result to write to the variable me->a
by forwarding the controlflow to the next element and also by creating an object flow from result
pin to the value
pin.
Info
Object flows do not need to run in the same direction as the control flow.