Skip to content

reset data src #20

Answered by alexzhornyak
pettaa123 asked this question in Q&A
Discussion options

You must be logged in to vote

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 th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alexzhornyak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #19 on April 28, 2022 14:19.