Contents | Overview | Examples | Editor | Forum |
---|
The <param> tag provides a general way of identifying a key and a dynamically calculated value which can be passed to an external service or included in an event.
Name | Required | Attribute Constraints | Type | Default Value | Valid Values | Description |
---|---|---|---|---|---|---|
name | true | NMTOKEN | none | A string literal | The name of the key. | |
expr | false | May not occur with ‘location’ | value expression | none | Valid value expression | A value expression (see 5.9.3 Legal Data Values and Value Expressions) that is evaluated to provide the value. |
location | false | May not occur with ‘expr’ | location expression | none | Valid location expression | A location expression (see 5.9.2 Location Expressions) that specifies the location in the datamodel to retrieve the value from. |
<scxml datamodel="lua" initial="s0" name="Scxml" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<state id="s0" initial="s01">
<transition cond="_event.data.someParam==1" event="done.state.s0" target="End"/>
<state id="s01">
<transition target="s02"/>
</state>
<final id="s02">
<donedata>
<param expr="1" name="someParam"/>
</donedata>
</final>
</state>
<final id="End">
<onentry>
<log expr="'Pass'" label="Outcome"/>
</onentry>
</final>
</scxml>
<scxml datamodel="lua" initial="s0" name="Scxml" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<datamodel>
<data expr="1" id="VarA"/>
</datamodel>
<state id="s0" initial="s01">
<transition cond="_event.data.someParam==1 and
_event.data.someParam==VarA" event="done.state.s0" target="End"/>
<state id="s01">
<transition target="s02"/>
</state>
<final id="s02">
<donedata>
<param location="VarA" name="someParam"/>
</donedata>
</final>
</state>
<final id="End">
<onentry>
<log expr="'Pass'" label="Outcome"/>
</onentry>
</final>
</scxml>
If the 'location' attribute on a param element does not refer to a valid location in the data model, the processor MUST place the error error.execution on the internal event queue.
If the 'location' attribute on a param element does not refer to a valid location in the data model, or if the evaluation of the 'expr' produces an error, the processor MUST ignore the name and value.
If the evaluation of the 'expr' produces an error, the processor MUST place the error error.execution on the internal event queue.
TOP | Contents | Overview | Examples | Editor | Forum |
---|