policyOk.xml 1.6 KB
Newer Older
Raj Shah's avatar
Raj Shah committed
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
<policy id="urn:policy:test:foo" name="foo" description="basic policy for the tests" xmlns="http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage"
	xmlns:tns="http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage" xmlns:parameter="http://www.iese.fraunhofer.de/ind2uce/3.2.46/parameter" xmlns:pip="http://www.iese.fraunhofer.de/ind2uce/3.2.46/pip"
	xmlns:function="http://www.iese.fraunhofer.de/ind2uce/3.2.46/function" xmlns:event="http://www.iese.fraunhofer.de/ind2uce/3.2.46/event" xmlns:constant="http://www.iese.fraunhofer.de/ind2uce/3.2.46/constant"
	xmlns:variable="http://www.iese.fraunhofer.de/ind2uce/3.2.46/variable"
	xmlns:variableDeclaration="http://www.iese.fraunhofer.de/ind2uce/3.2.46/variableDeclaration" 
	 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<variableDeclaration:string name="role">
		<pip:string method="urn:info:test:checkRole" default="">
			<parameter:number name="loggedUser">
				<event:number eventParameter="userId" default="1" />
			</parameter:number>
		</pip:string>
	</variableDeclaration:string>

  <variableDeclaration:number name="temperature">
    <pip:number method="urn:info:wheather:getTemperature" default="0">
      <parameter:number name="zip">
        <event:number eventParameter="zip" default="1" />
      </parameter:number>
    </pip:number>
  </variableDeclaration:number>

	<mechanism event="urn:action:test:get-foobar">
		<if>
			<valueChanged to="true">
				<equals>
					<variable:string reference="role" />
					<constant:string value="ALLOW" />
				</equals>
			</valueChanged>
			<then>
				<allow />
			</then>
		</if>
	</mechanism>
</policy>