source: cats/ISOcat/trunk/mod-ISOcat-access-data/access/cr_dcs.acc @ 2686

Last change on this file since 2686 was 2686, checked in by mwindhouwer, 11 years ago

Fixed the throtteling:

  • all SQL request go through the ISOcat.database throttle (settings in the ISOcat config), also the indirect DBX ones
  • big (more then 100 DCs) DCS to DCIF go through the big-dcif throttle (hardcoded settings)
File size: 3.2 KB
Line 
1<accessor debug="false" trace="false" deadlock="true">
2        <name>ISOcat.access.data.cr.dcs</name>
3        <descr>Get extended DCS of a CR.</descr>
4        <param mandatory="true">
5                <name>cr</name>
6                <descr>the CR of this decision group</descr>
7                <type canonical="true">string</type>
8        </param>
9        <param mandatory="true">
10                <name>dcs</name>
11                <descr>the DCS key</descr>
12                <type canonical="true">string</type>
13        </param>
14        <param mandatory="true">
15                <name>user</name>
16                <descr>the user</descr>
17                <type canonical="true">string</type>
18        </param>
19        <idoc>
20                <!-- get the user id -->
21                <instr>
22                        <type>ISOcat.manage.user.id</type>
23                        <user>var:user</user>
24                        <target>var:user</target>
25                </instr>
26                <!-- get the DCS content -->
27                <accessor-trace name="DCS">
28                        <instr>
29                                <type>ISOcat.access.data.dcs</type>
30                                <dcs>var:dcs</dcs>
31                                <target>var:cr_dcs</target>
32                        </instr>                       
33                </accessor-trace>
34                <accessor-debug>
35                        <instr>
36                                <type>copy</type>
37                                <operand>var:cr_dcs</operand>
38                                <target>ffcpl:/trace/cr_dcs.dcs.xml</target>
39                        </instr>
40                </accessor-debug>
41                <!-- get the CR votes -->
42                <accessor-trace name="DBX">
43                        <instr>
44                                <type>isocat.sloot.dbx</type>
45                                <cr>var:cr</cr>
46                                <user>var:user</user>
47                                <operator>ffcpl:/dbx/CR-votes.xml</operator>
48                                <debug>var:accessor-debug</debug>
49                                <trace>var:accessor-trace</trace>
50                                <target>var:votes</target>
51                        </instr>
52                </accessor-trace>
53                <accessor-debug>
54                        <instr>
55                                <type>copy</type>
56                                <operand>var:dcs</operand>
57                                <target>ffcpl:/trace/cr_dcs.votes.xml</target>
58                        </instr>
59                </accessor-debug>
60                <!-- integrate the votes into the DCS -->
61                <instr>
62                        <type>xslt2</type>
63                        <operand>var:cr_dcs</operand>
64                        <operator>
65                                <xsl:stylesheet
66                                        version="2.0"
67                                        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
68                                >
69                                        <xsl:param name="votes"/>
70                                        <!-- identity copy -->
71                                        <xsl:template match="@*|node()">
72                                                <xsl:copy>
73                                                        <xsl:apply-templates select="@*|node()"/>
74                                                </xsl:copy>
75                                        </xsl:template>
76                                        <!-- add vote information -->
77                                        <xsl:template match="dc">
78                                                <xsl:copy>
79                                                        <xsl:apply-templates select="@*|node()"/>
80                                                        <xsl:variable name="vote" select="$votes//vote[@dc=current()/@ref]"/>
81                                                        <xsl:if test="exists($vote)">
82                                                                <vote>
83                                                                        <xsl:value-of select="$vote"/>
84                                                                </vote>
85                                                                <votes>
86                                                                        <xsl:value-of select="$vote/@accept-votes"/>
87                                                                        <xsl:text> out of </xsl:text>
88                                                                        <xsl:value-of select="$vote/@votes"/>
89                                                                </votes>
90                                                        </xsl:if>
91                                                </xsl:copy>
92                                        </xsl:template>
93                                </xsl:stylesheet>
94                        </operator>
95                        <votes>var:votes</votes>
96                        <target>this:response</target>
97                </instr>
98                <!-- attach the golden thread of this CR DCS -->
99                <instr>
100                        <type>sloot.xquery</type>
101                        <operator>
102                                <string>goldenthread:/cr/{string($cr)}/dcs/{string($dcs)}</string>
103                        </operator>
104                        <cr>var:cr</cr>
105                        <dcs>var:dcs</dcs>
106                        <target>var:thread</target>
107                </instr>
108                <instr>
109                        <type>sloot.attachGoldenThread</type>
110                        <operand>this:response</operand>
111                        <param>var:thread</param>
112                        <target>this:response</target>
113                </instr>
114        </idoc>
115        <exception>
116                <debug/>
117                <trace>ffcpl:/trace/cr_dcs.exception.xml</trace>
118                <throw/>
119        </exception>
120        <response>
121                <debug>ffcpl:/trace/cr_dcs.response.xml</debug>
122                <mime>application/xml</mime>
123        </response>
124</accessor>
125
Note: See TracBrowser for help on using the repository browser.