Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 7f89779

Browse files
authored
Merge pull request #116 from marklogic-community/feature-111
Feature 111
2 parents 041ef2c + 574b0db commit 7f89779

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4489
-12
lines changed

rest-api/ext/process.xqy

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,23 @@ function ext:post(
150150
$params as map:map,
151151
$input as document-node()*
152152
) as document-node()* {
153+
let $_ := xdmp:log(fn:concat("REST EXT params=", xdmp:quote($params)), "debug")
154+
let $preftype := if ("application/xml" = map:get($context,"accept-types")) then "application/xml" else "application/json"
155+
let $_ := xdmp:log(fn:concat("REST EXT preftype: " , $preftype), "debug")
156+
157+
let $part := (map:get($params,"part"),"document")[1]
158+
let $_ := xdmp:log(fn:concat("REST EXT part: ", $part), "debug")
153159

154-
let $preftype := if ("application/xml" = map:get($context,"accept-types")) then "application/xml" else "application/json"
160+
let $_ := xdmp:log(fn:concat("REST EXT input: ", $input), "debug")
161+
let $pid := map:get($params,"processid") (: this is stripping the '+' symbol if sent unencoded :)
162+
(:let $proc := wfu:get($pid):)
163+
let $_ := xdmp:log(fn:concat("REST EXT ProcessId: ", $pid), "debug")
164+
let $props := wfu:getProperties($pid)
155165

156-
let $part := (map:get($params,"part"),"document")[1]
166+
let $_ := xdmp:log("CURRENT STEP INFO", "debug")
167+
let $_ := xdmp:log($props (: /wf:currentStep :) , "debug")
157168

158-
let $_ := xdmp:log($input)
159-
let $pid := map:get($params,"processid")
160-
(:let $proc := wfu:get($pid):)
161-
let $_ := xdmp:log("REST EXT ProcessId: " || $pid)
162-
let $props := wfu:getProperties($pid)
163-
(:
164-
let $_ := xdmp:log("CURRENT STEP INFO")
165-
let $_ := xdmp:log($props/wf:currentStep)
166-
:)
167-
let $res :=
169+
let $res :=
168170
if ("true" = map:get($params,"complete")) then
169171
(: sanity check that the specified process' status is on a user task :)
170172
if ("userTask" = $props/wf:currentStep/wf:step-type) then
@@ -187,6 +189,7 @@ function ext:post(
187189

188190
if ("true" = map:get($params,"lock")) then
189191
(: Lock the work item, and return its details as if get had been called. If already locked, instead return an error :)
192+
let $_ := xdmp:log("REST EXT call to lock work item", "debug")
190193
let $feedback := wfu:lock($pid)
191194
let $update :=
192195
if (fn:empty($feedback)) then

src/app/models/workflow-util.xqy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ declare function m:lock($processId as xs:string) as xs:string? {
281281
(: when it works, should return empty-sequence() :)
282282
(: Check that this is a human queue task or user task :)
283283
let $props := m:getProperties($processId)
284+
let $_ := xdmp:log(fn:concat("WF Utils lock pid=", $processId), "debug")
285+
let $_ := xdmp:log(fn:concat("WF Utils props=", xdmp:quote($props)), "debug")
284286
return
285287
if ($props/wf:currentStep/wf:step-type = "userTask" and $props/wf:currentStep/wf:step-status = "ENTERED") then
286288
if ($props/wf:currentStep/wf:type = "user" or $props/wf:currentStep/wf:type = "queue" or $props/wf:currentStep/wf:type = "role") then

src/test/css/jquery.gritter.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/* the norm */
2+
#gritter-notice-wrapper {
3+
position:fixed;
4+
top:20px;
5+
right:20px;
6+
width:301px;
7+
z-index:9999;
8+
}
9+
#gritter-notice-wrapper.top-left {
10+
left: 20px;
11+
right: auto;
12+
}
13+
#gritter-notice-wrapper.bottom-right {
14+
top: auto;
15+
left: auto;
16+
bottom: 20px;
17+
right: 20px;
18+
}
19+
#gritter-notice-wrapper.bottom-left {
20+
top: auto;
21+
right: auto;
22+
bottom: 20px;
23+
left: 20px;
24+
}
25+
.gritter-item-wrapper {
26+
position:relative;
27+
margin:0 0 10px 0;
28+
background:url('../img/ie-spacer.gif'); /* ie7/8 fix */
29+
}
30+
.gritter-top {
31+
background:url(../img/gritter.png) no-repeat left -30px;
32+
height:10px;
33+
}
34+
.hover .gritter-top {
35+
background-position:right -30px;
36+
}
37+
.gritter-bottom {
38+
background:url(../img/gritter.png) no-repeat left bottom;
39+
height:8px;
40+
margin:0;
41+
}
42+
.hover .gritter-bottom {
43+
background-position: bottom right;
44+
}
45+
.gritter-item {
46+
display:block;
47+
background:url(../img/gritter.png) no-repeat left -40px;
48+
color:#eee;
49+
padding:2px 11px 8px 11px;
50+
font-size: 11px;
51+
font-family:verdana;
52+
}
53+
.hover .gritter-item {
54+
background-position:right -40px;
55+
}
56+
.gritter-item p {
57+
padding:0;
58+
margin:0;
59+
}
60+
.gritter-close {
61+
display:none;
62+
position:absolute;
63+
top:5px;
64+
left:3px;
65+
background:url(../img/gritter.png) no-repeat left top;
66+
cursor:pointer;
67+
width:30px;
68+
height:30px;
69+
}
70+
.gritter-title {
71+
font-size:14px;
72+
font-weight:bold;
73+
padding:0 0 7px 0;
74+
display:block;
75+
text-shadow:1px 1px #000; /* Not supported by IE :( */
76+
}
77+
.gritter-image {
78+
width:48px;
79+
height:48px;
80+
float:left;
81+
}
82+
.gritter-with-image,
83+
.gritter-without-image {
84+
padding:0 0 5px 0;
85+
}
86+
.gritter-with-image {
87+
width:220px;
88+
float:right;
89+
}

0 commit comments

Comments
 (0)