Hi Andrea,
I don't think it is wise to implement a statechart design that assigns to arbitrary variable names passed from externally. The reason for this is that the data model declares a finite set of variables, defined at compile-time, and does not support assigning to variable names outside of this known set.
You could collapse the transitions you mentioned into a single transition which accepts a single event, and assigns to a variable in the data model based on a property in the event data. You could use a pattern like this:
<transition event="set">
<script>
switch(_event.data.lhs){
case "Va":
Va = _event.data.rhs;
case "Vb":
Vb = _event.data.rhs;
default:
throw new Error("Attempted to assign to unknown variable");
}
</script>
</transition>
Where lhs and rhs are left hand side and right hand side of the assignment, respectively.
It also would be possible to build a plugin that generates this code automatically on saving the statechart. I would be happy to guide you on how to develop this.