reset data src #20
-
It is possible to assign values to data's attribute expr. |
Beta Was this translation helpful? Give feedback.
Answered by
alexzhornyak
Apr 26, 2022
Replies: 1 comment
-
It is possible to do with <scxml> attribute 'binding=late' <scxml binding="late" datamodel="ecmascript" name="ScxmlShape1" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<state id="StateShape1">
<datamodel>
<data id="Var1" src="script1.js"/>
</datamodel>
<onentry>
<log expr="Var1" label="Var1"/>
</onentry>
<transition event="step" target="StateShape2"/>
</state>
<state id="StateShape2">
<datamodel>
<data id="Var1" src="script2.js"/>
</datamodel>
<onentry>
<log expr="Var1" label="Var1"/>
</onentry>
<transition event="step" target="FinalShape1"/>
</state>
<final id="FinalShape1"/>
</scxml> script1.js "this is the 1 script" script2.js "this is the 2 script" Output:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alexzhornyak
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to do with <scxml> attribute 'binding=late'
script1.js
"this is the 1 script"
script2.js
"this is th…