summaryrefslogtreecommitdiffstats
path: root/test/w3c/txml/test513.txml
blob: 65dda29f05a7a3f29b76ef2b72a95ee7191204d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0"?>

<!-- test that we get an HTTP success code back on successful delivery.  To run this test, implementations
must support an extension to send: if the parameter httpResponse is present with value 'true', then when
the processor gets an http response code back, it must raise an event 'http.n1.nrest' where 'ni' is
the first digit of the response code and 'nrest' are the remaining digits-->

<scxml initial="s0" conf:datamodel=""  version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  
<state id="s0" initial="s01">
  <datamodel>
    <data conf:id="1"/>
    </datamodel>
    
  <onentry>
    <send event="timeout" delay="30s"/>
    </onentry>
  <invoke type="http://www.w3.org/TR/scxml/">
    <content>
    <!-- child script. Once we're running send childRunning to parent and include basicHTTPAccess URI -->
    <scxml initial="child0" conf:datamodel=""  version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
       <state id="child0">
         <onentry>
           <send target="#_parent" event="childRunning">
             <param name="uri" conf:basicHTTPAccessURI=""/>
             </send>
          </onentry>
        </state>
     </scxml>
      </content>
    </invoke>
    
    <transition event="*" conf:targetfail=""/>
    
    <state id="s01">
    <!-- when we get the event from the child, extract the access uri and use
    the basicHTTP event i/o processor to send it an event -->
      <transition event="childRunning" target="s02">
        <assign conf:location="1" conf:eventDataFieldValue="uri"/>
         <send event="test" conf:targetExpr="1" httpResponse="true" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
     </transition>
     </state>
     
     <state id="s02">
     <!-- the child should send this back automatically. It does not need to take
     any transition on the event -->
  <transition event="HTTP.2" conf:targetpass=""/>
 </state>
 </state>
  
   <conf:pass/>
   <conf:fail/>

</scxml>