Project

General

Profile

1 21707 george.ath
<?xml version="1.0" encoding="UTF-8"?>
2
3
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
           xmlns="http://sarasvati.googlecode.com/ProcessDefinition"
5
 targetNamespace="http://sarasvati.googlecode.com/ProcessDefinition"
6
 elementFormDefault="qualified">
7
8
    <xs:element name="process-definition">
9
      <xs:complexType>
10
11
        <xs:annotation>
12
          <xs:documentation>
13
            A process definition consists of a unique name and a set of nodes.
14
            The nodes are connected via arcs.
15
          </xs:documentation>
16
        </xs:annotation>
17
18
        <xs:sequence>
19
          <xs:element name="custom" minOccurs="0" maxOccurs="1">
20
            <xs:complexType>
21
              <xs:sequence>
22
                <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
23
              </xs:sequence>
24
            </xs:complexType>
25
          </xs:element>
26
27
          <xs:element name="node" type="Node" minOccurs="1" maxOccurs="unbounded" >
28
            <xs:annotation>
29
              <xs:documentation>
30
                Every process definition must have at least one
31
                node. If a process definition contains no nodes
32
                with the isStart attribute set to true, it can
33
                not be run on it's own. This is still valid
34
                however, since it could be referenced from
35
                another process definition.
36
              </xs:documentation>
37
            </xs:annotation>
38
          </xs:element>
39
40
          <xs:element name="external" type="External" minOccurs="0" maxOccurs="unbounded" >
41
            <xs:annotation>
42
              <xs:documentation>
43
                Every process definition may contain contain zero or more
44
                references to external process definitions.
45
              </xs:documentation>
46
            </xs:annotation>
47
          </xs:element>
48
49
        </xs:sequence>
50
51
        <xs:attribute name="name" type="xs:string" use="required">
52
          <xs:annotation>
53
            <xs:documentation>
54
              Every process definition must have a unique name.
55
            </xs:documentation>
56
          </xs:annotation>
57
        </xs:attribute>
58
59
      </xs:complexType>
60
61
    </xs:element>
62
63
64
    <xs:complexType name="Node">
65
66
      <xs:sequence>
67
        <xs:element name="join" type="Join" minOccurs="0" maxOccurs="1" />
68
        <xs:element name="guard" type="Guard" minOccurs="0" maxOccurs="1" />
69
        <xs:element name="arc" type="Arc" minOccurs="0" maxOccurs="unbounded" />
70
71
        <xs:element name="custom" minOccurs="0" maxOccurs="1">
72
          <xs:complexType>
73
            <xs:sequence>
74
              <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
75
            </xs:sequence>
76
          </xs:complexType>
77
        </xs:element>
78
      </xs:sequence>
79
80
      <xs:attribute name="name" type="xs:string" use="required">
81
        <xs:annotation>
82
          <xs:documentation>
83
            Node names must be unique within a given process definition.
84
          </xs:documentation>
85
        </xs:annotation>
86
      </xs:attribute>
87
88
      <xs:attribute name="joinType"
89
                    type="JoinType"
90
                    use="optional"
91
                    default="or"/>
92
93
      <xs:attribute name="joinParam" type="xs:string" use="optional">
94
        <xs:annotation>
95
          <xs:documentation>
96
97
          </xs:documentation>
98
        </xs:annotation>
99
      </xs:attribute>
100
101
      <xs:attribute name="type"
102
                    type="xs:string"
103
                    use="optional"/>
104
105
      <xs:attribute name="isStart"
106
                    type="xs:boolean"
107
                    use="optional"
108
                    default="false">
109
        <xs:annotation>
110
          <xs:documentation>
111
            If isStart is set to true, this node will have a token
112
            placed in it. Guard functions will still be called for
113
            start nodes.
114
          </xs:documentation>
115
        </xs:annotation>
116
      </xs:attribute>
117
118
      <xs:attribute name="x"
119
                    type="xs:int"
120
                    use="optional"/>
121
122
      <xs:attribute name="y"
123
                    type="xs:int"
124
                    use="optional"/>
125
126
    </xs:complexType>
127
128
    <xs:complexType name="External">
129
      <xs:sequence>
130
        <xs:element name="arc" type="ExternalArc" minOccurs="0" maxOccurs="unbounded" />
131
132
        <xs:element name="custom" minOccurs="0" maxOccurs="1">
133
          <xs:complexType>
134
            <xs:sequence>
135
              <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
136
            </xs:sequence>
137
          </xs:complexType>
138
        </xs:element>
139
      </xs:sequence>
140
141
142
      <xs:attribute name="name" type="xs:string" use="required">
143
        <xs:annotation>
144
          <xs:documentation>
145
            Since it may be desirable to include the same external process definition
146
            more than once, each external must define a name which must be unique in
147
            the process definition.
148
          </xs:documentation>
149
        </xs:annotation>
150
      </xs:attribute>
151
152
      <xs:attribute name="processDefinition" type="xs:string" use="required">
153
        <xs:annotation>
154
          <xs:documentation>
155
            Must refer to a valid process definition name.
156
          </xs:documentation>
157
        </xs:annotation>
158
      </xs:attribute>
159
160
      <xs:attribute name="x"
161
                    type="xs:int"
162
                    use="optional"/>
163
164
      <xs:attribute name="y"
165
                    type="xs:int"
166
                    use="optional"/>
167
168
169
    </xs:complexType>
170
171
    <xs:simpleType name="Guard">
172
        <xs:annotation>
173
          <xs:documentation>
174
            Contains a GuardLang statement
175
          </xs:documentation>
176
        </xs:annotation>
177
        <xs:restriction base="xs:string">
178
        <xs:whiteSpace value="collapse"></xs:whiteSpace>
179
      </xs:restriction>
180
    </xs:simpleType>
181
182
    <xs:simpleType name="Join">
183
        <xs:annotation>
184
          <xs:documentation>
185
            Join strategies may require additional information, which can be provided in the join parameter.
186
            This may include things like a token set name or a JoinLang program
187
          </xs:documentation>
188
        </xs:annotation>
189
        <xs:restriction base="xs:string">
190
        <xs:whiteSpace value="collapse"></xs:whiteSpace>
191
      </xs:restriction>
192
    </xs:simpleType>
193
194
    <xs:complexType name="Arc">
195
      <xs:attribute name="external" type="xs:string" use="optional" default=""/>
196
      <xs:attribute name="to" type="xs:string" use="required"/>
197
      <xs:attribute name="name" type="xs:string" use="optional" default=""/>
198
    </xs:complexType>
199
200
    <xs:complexType name="ExternalArc">
201
202
      <xs:attribute name="from" type="xs:string" use="required" >
203
        <xs:annotation>
204
          <xs:documentation>
205
            Name of the node in the this external process
206
            definition that this arc will start from
207
          </xs:documentation>
208
        </xs:annotation>
209
      </xs:attribute>
210
211
      <xs:attribute name="external" type="xs:string" use="optional" default="">
212
        <xs:annotation>
213
          <xs:documentation>
214
            Specifies the instance name of the external process definition that is
215
            being linked to. The latest version of the external process definition
216
            will be used. If this is not specified, it is assumed that we are linking
217
            to a node in the surrounding process definition.
218
          </xs:documentation>
219
        </xs:annotation>
220
      </xs:attribute>
221
222
      <xs:attribute name="to" type="xs:string" use="required" >
223
        <xs:annotation>
224
          <xs:documentation>
225
            Name of the node in the specified external process
226
            definition that this arc will connect to
227
          </xs:documentation>
228
        </xs:annotation>
229
      </xs:attribute>
230
231
      <xs:attribute name="name" type="xs:string" use="optional" default="" >
232
        <xs:annotation>
233
          <xs:documentation>
234
            The arc name. Does not need to be unique. Arcs with the same name
235
            are considered to be part of a set.
236
          </xs:documentation>
237
        </xs:annotation>
238
      </xs:attribute>
239
240
    </xs:complexType>
241
242
    <xs:simpleType name="JoinType">
243
      <xs:restriction base="xs:string">
244
        <xs:enumeration value="or"/>
245
        <xs:enumeration value="and"/>
246
        <xs:enumeration value="labelAnd"/>
247
        <xs:enumeration value="tokenSet"/>
248
        <xs:enumeration value="tokenSetOr"/>
249
        <xs:enumeration value="class"/>
250
        <xs:enumeration value="first"/>
251
        <xs:enumeration value="joinlang"/>
252
      </xs:restriction>
253
    </xs:simpleType>
254
255
</xs:schema>