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

Commit 5f3e6c5

Browse files
authored
Merge pull request #135 from marklogic-community/feature-133
Included search for wf:user on Inbox
2 parents 3020dbb + 8cbf544 commit 5f3e6c5

File tree

10 files changed

+92
-63
lines changed

10 files changed

+92
-63
lines changed

src/test/suites/e2e-rest-process-json/015-processmodel-json.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ return (
123123
return (
124124
test:assert-equal('done', xs:string($properties/processingStatus)),
125125
test:assert-equal('user', xs:string($properties/currentStep/type)),
126-
test:assert-equal('admin', xs:string($properties/currentStep/assignee)),
126+
test:assert-equal('admin', xs:string($properties/currentStep/user)),
127127
test:assert-equal('userTask', xs:string($properties/currentStep/stepType)),
128128
test:assert-equal('ENTERED', xs:string($properties/currentStep/stepStatus))
129129
)

src/test/suites/e2e-rest-process-xml/015-processmodel-xml.xqy

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ declare namespace http = "xdmp:http";
1010

1111
let $process := wrt:processmodel-create ($const:xml-options, "015-restapi-tests.bpmn")
1212
let $_testlog := xdmp:log("E2E XML TEST: 01-processmodel-create")
13-
return (
13+
return (
1414
test:assert-equal('200', xs:string($process[1]/http:code)),
1515
test:assert-equal('SUCCESS', xs:string($process[2]/ext:createResponse/ext:outcome)),
16-
test:assert-equal('015-restapi-tests__1__0', xs:string($process[2]/ext:createResponse/ext:modelId))
16+
test:assert-equal('015-restapi-tests__1__0', xs:string($process[2]/ext:createResponse/ext:modelId))
1717
);
1818
(:
1919
<ext:createResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel">
@@ -46,10 +46,10 @@ declare namespace http = "xdmp:http";
4646

4747
let $result := wrt:test-03-processmodel-update($const:xml-options)
4848
let $_testlog := xdmp:log("E2E XML TEST: 03-processmodel-update")
49-
return (
49+
return (
5050
test:assert-equal('200', xs:string($result[1]/http:code)),
5151
test:assert-equal('SUCCESS', xs:string($result[2]/ext:createResponse/ext:outcome)),
52-
test:assert-equal('015-restapi-tests__1__2', xs:string($result[2]/ext:createResponse/ext:modelId))
52+
test:assert-equal('015-restapi-tests__1__2', xs:string($result[2]/ext:createResponse/ext:modelId))
5353
);
5454
(:
5555
<ext:createResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel">
@@ -68,10 +68,10 @@ declare namespace http = "xdmp:http";
6868
let $_testlog := xdmp:log("E2E XML TEST: 04-processmodel-publish")
6969
(: not working with XML ? :)
7070
let $result := wrt:processmodel-publish($const:xml-options, "015-restapi-tests__1__2")
71-
return (
71+
return (
7272
test:assert-equal('200', xs:string($result[1]/http:code)),
7373
test:assert-equal('SUCCESS', xs:string($result[2]/ext:updateResponse/ext:outcome)),
74-
test:assert-exists(xs:string($result[2]/ext:updateResponse/ext:domainId))
74+
test:assert-exists(xs:string($result[2]/ext:updateResponse/ext:domainId))
7575
);
7676
(:
7777
<ext:updateResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel">
@@ -153,7 +153,7 @@ return (
153153
return (
154154
test:assert-equal('done', xs:string($properties/cpf:processing-status)),
155155
test:assert-equal('user', xs:string($properties/wf:currentStep/wf:type)),
156-
test:assert-equal('admin', xs:string($properties/wf:currentStep/wf:assignee)),
156+
test:assert-equal('admin', xs:string($properties/wf:currentStep/wf:user)),
157157
test:assert-equal('userTask', xs:string($properties/wf:currentStep/wf:step-type)),
158158
test:assert-equal('ENTERED', xs:string($properties/wf:currentStep/wf:step-status))
159159
)

src/test/suites/inclusive-gateway/inclusive-gateway-01.xqy

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(:
2-
This test checks that for an inclusive gateway with two downstream routes, only one of which is activated,
2+
This test checks that for an inclusive gateway with two downstream routes, only one of which is activated,
33
rendezvousing is conditional only on the activated task being completed.
4-
:)
4+
:)
55
(:
66
Create process model for Inclusive Gateway Test 01, and check it has been created correctly
77
:)
@@ -23,7 +23,7 @@ return
2323
(
2424
test:assert-equal(xs:string($model-response/model:createResponse/model:outcome/text()),"SUCCESS"),
2525
test:assert-equal(xs:string($model-response/model:createResponse/model:modelId/text()),test-constants:expected-model-id($test-constants:TEST-01-MODEL-NAME))
26-
)
26+
)
2727
;
2828
(:
2929
Create process for Inclusive Gateway Test 01. Check success. Check pid exists and save.
@@ -37,7 +37,7 @@ declare namespace ext = "http://marklogic.com/rest-api/resource/process";
3737

3838
declare variable $PROCESS-MODEL-NAME := test-constants:expected-model-id($test-constants:TEST-01-MODEL-NAME);
3939

40-
let $payload := element ext:createRequest{element ext:processName{$PROCESS-MODEL-NAME},element ext:data{element value{"A"}},element ext:attachments{}}
40+
let $payload := element ext:createRequest{element ext:processName{$PROCESS-MODEL-NAME},element ext:data{element value{"A"}, element assignTo{"admin"}},element ext:attachments{}}
4141
let $process-response := wrt:process-create($const:xml-options, $payload)[2]
4242
let $pid := $process-response/ext:createResponse/ext:processId/text()
4343
return
@@ -48,7 +48,7 @@ return
4848
)
4949
;
5050
(: Need to sleep to ensure asynchronous behaviour has completed :)
51-
xdmp:sleep(2000)
51+
xdmp:sleep(5000)
5252
;
5353
(:
5454
Check process has entered the first gateway ( and effectively stopped there )
@@ -66,10 +66,51 @@ let $process-state := wrt:process-read($const:xml-options,$test-pid)[2]/ext:read
6666
let $current-state := ($process-state/ext:document/wf:process/wf:audit-trail/wf:audit)[fn:last()]/wf:state/text()
6767
return
6868
(
69-
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
70-
test:assert-equal("InclusiveGateway_1",fn:tokenize($current-state,"/")[fn:last()])
69+
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
70+
test:assert-equal("InclusiveGateway_1",fn:tokenize($current-state,"/")[fn:last()])
7171
)
7272
;
73+
(: Need to sleep to ensure asynchronous behaviour has completed :)
74+
xdmp:sleep(10000)
75+
;
76+
77+
(: test inbox lists wf:user processinbox-read :)
78+
import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "/test/suites/inclusive-gateway/lib/constants.xqy";
79+
import module namespace const="http://marklogic.com/roxy/workflow-constants" at "/test/workflow-constants.xqy";
80+
import module namespace wrt="http://marklogic.com/workflow/rest-tests" at "/test/workflow-rest-tests.xqy";
81+
import module namespace test="http://marklogic.com/roxy/test-helper" at "/test/test-helper.xqy";
82+
declare namespace cpf = "http://marklogic.com/cpf";
83+
declare namespace ext = "http://marklogic.com/rest-api/resource/processinbox";
84+
declare namespace http = "xdmp:http";
85+
declare namespace prop = "http://marklogic.com/xdmp/property";
86+
declare namespace wf="http://marklogic.com/workflow";
87+
88+
let $test-pid := fn:doc(test-constants:test-pid-uri($test-constants:TEST-01-MODEL-NAME))/test-constants:pid/text()
89+
let $test-pid := fn:substring-before($test-pid, "+") (: some platforms not handling timezone well :)
90+
let $child-pid := /wf:process[fn:matches(wf:parent,$test-pid)]/@id/fn:string()
91+
let $result := wrt:test-08-processinbox-read($const:xml-options)
92+
return (
93+
test:assert-equal('200', xs:string($result[1]/http:code)),
94+
test:assert-equal('SUCCESS', xs:string($result[2]/ext:readResponse/ext:outcome)),
95+
test:assert-exists($result[2]/ext:readResponse/wf:inbox/wf:task[@processid=$child-pid]),
96+
let $task := $result[2]/ext:readResponse/wf:inbox/wf:task[@processid=$child-pid]
97+
return (
98+
test:assert-exists($task/wf:process-data/wf:process/wf:data),
99+
test:assert-exists($task/wf:process-data/wf:process/wf:attachments),
100+
test:assert-exists($task/wf:process-data/wf:process/wf:audit-trail),
101+
test:assert-exists($task/wf:process-data/wf:process/wf:metrics),
102+
test:assert-exists($task/wf:process-data/wf:process/wf:process-definition-name),
103+
let $properties := $task/wf:process-properties/prop:properties
104+
return (
105+
test:assert-equal('done', xs:string($properties/cpf:processing-status)),
106+
test:assert-equal('dynamicUser', xs:string($properties/wf:currentStep/wf:type)),
107+
test:assert-equal('admin', xs:string($properties/wf:currentStep/wf:user)),
108+
test:assert-equal('userTask', xs:string($properties/wf:currentStep/wf:step-type)),
109+
test:assert-equal('ENTERED', xs:string($properties/wf:currentStep/wf:step-status))
110+
)
111+
)
112+
);
113+
73114
(:
74115
Fork has not rendezvoused because there is a user task requiring completion. We therefore complete it
75116
:)
@@ -82,14 +123,16 @@ declare namespace wf = "http://marklogic.com/workflow";
82123
declare namespace ext = "http://marklogic.com/rest-api/resource/process";
83124

84125
let $test-pid := fn:doc(test-constants:test-pid-uri($test-constants:TEST-01-MODEL-NAME))/test-constants:pid/text()
126+
let $test-pid := fn:substring-before($test-pid, "+") (: some platforms not handling timezone well :)
85127
let $child-pid := /wf:process[fn:matches(wf:parent,$test-pid)]/@id/fn:string()
86128
let $update-response := wrt:call-complete-on-pid($const:xml-options,$child-pid)/ext:updateResponse
87129
return
88-
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
130+
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
89131
;
90132
(: Need to sleep to ensure asynchronous behaviour has completed :)
91133
xdmp:sleep(2000)
92134
;
135+
93136
(:
94137
Check process has rendezvoused and completed
95138
:)

src/test/suites/inclusive-gateway/inclusive-gateway-02.xqy

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ return
2222
(
2323
test:assert-equal(xs:string($model-response/model:createResponse/model:outcome/text()),"SUCCESS"),
2424
test:assert-equal(xs:string($model-response/model:createResponse/model:modelId/text()),test-constants:expected-model-id($test-constants:TEST-02-MODEL-NAME))
25-
)
25+
)
2626
;
2727
(:
2828
Create process for Inclusive Gateway Test 02. Check success. Check pid exists and save.
@@ -47,9 +47,7 @@ return
4747
)
4848
;
4949
(: Need to sleep to ensure asynchronous behaviour has completed :)
50-
import module namespace test-config = "http://marklogic.com/roxy/test-config" at "/test/test-config.xqy";
51-
52-
test-config:test-sleep()
50+
xdmp:sleep(10000)
5351
;
5452
(:
5553
Check process has entered the first gateway ( and effectively stopped there )
@@ -67,10 +65,9 @@ let $process-state := wrt:process-read($const:xml-options,$test-pid)[2]/ext:read
6765
let $current-state := ($process-state/ext:document/wf:process/wf:audit-trail/wf:audit)[fn:last()]/wf:state/text()
6866
return
6967
(
70-
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
71-
test:assert-equal("InclusiveGateway_1",fn:tokenize($current-state,"/")[fn:last()])
72-
)
73-
;
68+
test:assert-equal("SUCCESS", xs:string($process-state/ext:outcome/text())),
69+
test:assert-equal("InclusiveGateway_1", fn:tokenize($current-state,"/")[fn:last()])
70+
);
7471
(:
7572
Fork has not rendezvoused because there are user tasks requiring completion. We complete the first one.
7673
:)
@@ -83,10 +80,11 @@ declare namespace wf = "http://marklogic.com/workflow";
8380
declare namespace ext = "http://marklogic.com/rest-api/resource/process";
8481

8582
let $test-pid := fn:doc(test-constants:test-pid-uri($test-constants:TEST-02-MODEL-NAME))/test-constants:pid/text()
83+
let $test-pid := fn:substring-before($test-pid, "+") (: some platforms not handling timezone well :)
8684
let $child-pid := (/wf:process[fn:matches(wf:parent,$test-pid)]/@id/fn:string())[1]
8785
let $update-response := wrt:call-complete-on-pid($const:xml-options,$child-pid)/ext:updateResponse
8886
return
89-
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
87+
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
9088
;
9189
(: Need to sleep to ensure asynchronous behaviour has completed :)
9290
import module namespace test-config = "http://marklogic.com/roxy/test-config" at "/test/test-config.xqy";
@@ -110,8 +108,8 @@ let $penultimate-state := ($process-state/ext:document/wf:process/wf:audit-trail
110108
let $current-state := ($process-state/ext:document/wf:process/wf:audit-trail/wf:audit)[fn:last()]/wf:state/text()
111109
return
112110
(
113-
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
114-
test:assert-equal("InclusiveGateway_1",fn:tokenize($current-state,"/")[fn:last()])
111+
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
112+
test:assert-equal("InclusiveGateway_1",fn:tokenize($current-state,"/")[fn:last()])
115113
)
116114
;
117115
(:
@@ -126,10 +124,11 @@ declare namespace wf = "http://marklogic.com/workflow";
126124
declare namespace ext = "http://marklogic.com/rest-api/resource/process";
127125

128126
let $test-pid := fn:doc(test-constants:test-pid-uri($test-constants:TEST-02-MODEL-NAME))/test-constants:pid/text()
127+
let $test-pid := fn:substring-before($test-pid, "+") (: some platforms not handling timezone well :)
129128
let $child-pid := (/wf:process[fn:matches(wf:parent,$test-pid)]/@id/fn:string())[2]
130129
let $update-response := wrt:call-complete-on-pid($const:xml-options,$child-pid)/ext:updateResponse
131130
return
132-
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
131+
test:assert-equal(xs:string($update-response/ext:outcome/text()),"SUCCESS")
133132
;
134133
(: Need to sleep to ensure asynchronous behaviour has completed :)
135134
import module namespace test-config = "http://marklogic.com/roxy/test-config" at "/test/test-config.xqy";
@@ -153,8 +152,8 @@ let $penultimate-state := ($process-state/ext:document/wf:process/wf:audit-trail
153152
let $current-state := ($process-state/ext:document/wf:process/wf:audit-trail/wf:audit)[fn:last()]/wf:state/text()
154153
return
155154
(
156-
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
157-
test:assert-equal("EndEvent_1",fn:tokenize($current-state,"/")[fn:last()]),
158-
test:assert-equal("InclusiveGateway_1__rv",fn:tokenize($penultimate-state,"/")[fn:last()])
155+
test:assert-equal(xs:string($process-state/ext:outcome/text()),"SUCCESS"),
156+
test:assert-equal("EndEvent_1",fn:tokenize($current-state,"/")[fn:last()]),
157+
test:assert-equal("InclusiveGateway_1__rv",fn:tokenize($penultimate-state,"/")[fn:last()])
159158
)
160159
;

src/test/suites/inclusive-gateway/lib/constants.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ declare function test-pid-uri($model-name as xs:string) as xs:string{
2323
declare function save-pid($pid,$model-name){
2424
let $pid-content := element test-constants:pid{$pid}
2525
return
26-
xdmp:document-insert(test-pid-uri($model-name),$pid-content)
26+
xdmp:document-insert(test-pid-uri($model-name),$pid-content)
2727
};
2828

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
1-
import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "/test/suites/inclusive-gateway/lib/constants.xqy";
2-
import module namespace const="http://marklogic.com/roxy/workflow-constants" at "/test/workflow-constants.xqy";
3-
import module namespace wrt="http://marklogic.com/workflow/rest-tests" at "/test/workflow-rest-tests.xqy";
4-
import module namespace test = "http://marklogic.com/roxy/test-helper" at "/test/test-helper.xqy";
5-
6-
declare namespace ext = "http://marklogic.com/rest-api/resource/process";
7-
declare namespace wf = "http://marklogic.com/workflow";
8-
declare namespace p = "http://marklogic.com/cpf/pipelines";
9-
10-
11-
for $process-model-name in $test-constants:TEST-MODEL-NAMES
12-
return
1+
xquery version "1.0-ml";
132
(
14-
(: Delete processes generated by these tests :)
15-
/wf:process[wf:process-definition-name = $process-model-name] ! xdmp:document-delete(fn:base-uri(.)),
16-
(: Remove children of these processes :)
17-
let $test-pid := fn:doc(test-constants:test-pid-uri($process-model-name))/test-constants:pid/text()
18-
return
19-
/wf:process[fn:matches(wf:process-definition-name,$process-model-name)] ! xdmp:document-delete(fn:base-uri(.)),
20-
(: Delete test pid document :)
21-
xdmp:document-delete(test-constants:test-pid-uri($process-model-name)),
22-
(: Delete model files :)
23-
cts:uris()[fn:matches(.,test-constants:file-name-for-model($process-model-name))] ! xdmp:document-delete(.),
24-
(: Delete associated pipelines :)
25-
//p:pipeline-name[fn:matches(.,$process-model-name)] ! xdmp:document-delete(fn:base-uri(.))
26-
)
3+
xdmp:directory-delete("/"),
4+
xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5+
)

src/test/suites/inclusive-gateway/test-data/InclusiveGatewayTest-01.bpmn

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!-- origin at X=0.0 Y=0.0 -->
33
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="_GqqWIBraEeiDzsBG-Hp4NA" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.4.2.Final-v20171109-1930-B1">
44
<bpmn2:itemDefinition id="ItemDefinition_18" isCollection="false" structureRef="xs:boolean"/>
5+
<bpmn2:itemDefinition id="ItemDefinition_922" isCollection="false" structureRef="xs:string"/>
6+
<bpmn2:resource id="Resource_1" name="DynamicUser"/>
57
<bpmn2:process id="Process_1" name="Process 1" isExecutable="false">
68
<bpmn2:startEvent id="StartEvent_1" name="Start">
79
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
@@ -22,6 +24,12 @@
2224
<bpmn2:userTask id="UserTask_1" name="TaskA">
2325
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
2426
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
27+
<bpmn2:humanPerformer id="HumanPerformer_1" name="Actor">
28+
<bpmn2:resourceRef>Resource_1</bpmn2:resourceRef>
29+
<bpmn2:resourceAssignmentExpression id="ResourceAssignmentExpression_1">
30+
<bpmn2:formalExpression id="FormalExpression_3" evaluatesToTypeRef="ItemDefinition_922" language="http://www.w3.org/1999/XPath">$wf:process/wf:data//assignTo/text()</bpmn2:formalExpression>
31+
</bpmn2:resourceAssignmentExpression>
32+
</bpmn2:humanPerformer>
2533
</bpmn2:userTask>
2634
<bpmn2:userTask id="UserTask_2" name="TaskB">
2735
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
@@ -55,13 +63,13 @@
5563
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_1" bpmnElement="InclusiveGateway_1" isMarkerVisible="true">
5664
<dc:Bounds height="50.0" width="50.0" x="350.0" y="248.0"/>
5765
<bpmndi:BPMNLabel id="BPMNLabel_3" labelStyle="BPMNLabelStyle_1">
58-
<dc:Bounds height="48.0" width="58.0" x="346.0" y="298.0"/>
66+
<dc:Bounds height="22.0" width="76.0" x="337.0" y="298.0"/>
5967
</bpmndi:BPMNLabel>
6068
</bpmndi:BPMNShape>
6169
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_2" bpmnElement="InclusiveGateway_2" isMarkerVisible="true">
6270
<dc:Bounds height="50.0" width="50.0" x="600.0" y="248.0"/>
6371
<bpmndi:BPMNLabel id="BPMNLabel_4" labelStyle="BPMNLabelStyle_1">
64-
<dc:Bounds height="48.0" width="69.0" x="591.0" y="298.0"/>
72+
<dc:Bounds height="22.0" width="76.0" x="587.0" y="298.0"/>
6573
</bpmndi:BPMNLabel>
6674
</bpmndi:BPMNShape>
6775
<bpmndi:BPMNShape id="BPMNShape_UserTask_1" bpmnElement="UserTask_1" isExpanded="true">

src/test/test-config.xqy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ declare variable $LOCAL-TEST-DATA-DIR := "/raw/bpmn/";
2626
declare variable $SLEEP-FOR-ASYNC := 5; (: Sleep period required, in seconds, for async tasks :)
2727

2828
declare function local-uri-for-test-file($test-file-name as xs:string){
29-
$LOCAL-TEST-DATA-DIR||$test-file-name
29+
$LOCAL-TEST-DATA-DIR||$test-file-name
3030
};
3131

3232
declare function test-sleep(){
3333
xdmp:sleep($SLEEP-FOR-ASYNC * 1000)
34-
};
34+
};

src/workflowengine/models/workflow-import.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ declare function m:b2userTask($rootName as xs:string,$parentStep as xs:string?,$
10701070
<p:options xmlns:p="http:marklogic.com/cpf/pipelines">
10711071
<wf:type>{$type}</wf:type>
10721072
{
1073-
if (fn:not(fn:empty($user))) then <wf:assignee>{$user}</wf:assignee> else ()
1073+
if (fn:not(fn:empty($user))) then <wf:user>{$user}</wf:user> else ()
10741074
}
10751075
{
10761076
if (fn:not(fn:empty($queue))) then <wf:queue>{$queue}</wf:queue> else ()

src/workflowengine/models/workflow-util.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ declare function m:inbox($username as xs:string?) as element(wf:inbox) {
203203
(: TODO add cpf-active check, wf:status running check, wf:locked-user blank :)
204204
cts:properties-query(
205205
cts:element-query(xs:QName("wf:currentStep"),
206-
cts:element-value-query(xs:QName("wf:assignee"),($username,xdmp:get-current-user())[1])
206+
cts:element-value-query( ( xs:QName("wf:user"), xs:QName("wf:assignee")),($username,xdmp:get-current-user())[1])
207207
)
208208
)
209209
),("unfiltered") (: TODO ordering, prioritisation support, and so on :)

0 commit comments

Comments
 (0)