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

Commit f674a0c

Browse files
committed
#129 - missing CPF configs; remaining tests migrated:
e2e-rest-fork e2e-rest-process-json e2e-rest-process-xml inclusive-gateway process
1 parent a2d33f3 commit f674a0c

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

+426
-1309
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"domain-name": "Workflow Init Domain",
3+
"restart-user-name": "admin",
4+
"eval-module": "%%MODULES_DATABASE%%",
5+
"eval-root": "/",
6+
"conversion-enabled": false,
7+
"permission": [
8+
{
9+
"role-name": "rest-reader",
10+
"capability": "read"
11+
},
12+
{
13+
"role-name": "rest-writer",
14+
"capability": "update"
15+
}
16+
]
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"domain-name": "Workflow Init Domain",
3+
"description": "This domain is awesome!!!",
4+
"scope": "directory",
5+
"uri": "/something/that/will/never/exist/",
6+
"depth": "infinity",
7+
"eval-module": "%%MODULES_DATABASE%%",
8+
"eval-root": "/",
9+
"pipeline": ["Status Change Handling"]
10+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<pipeline-properties xmlns="http://marklogic.com/manage/pipeline/properties">
2+
<pipeline-name>Status Change Handling</pipeline-name>
3+
<pipeline-description>Out-of-the-box document status handling.</pipeline-description>
4+
<success-action>
5+
<module>/MarkLogic/cpf/actions/success-action.xqy</module>
6+
</success-action>
7+
<failure-action>
8+
<module>/MarkLogic/cpf/actions/failure-action.xqy</module>
9+
</failure-action>
10+
<status-transition>
11+
<annotation>
12+
New document entering the system: kick it into the appropriate initial state. If is has an initial state, go to that
13+
state. If it doesn't, go to the standard initial state and set the initial timestamp.
14+
</annotation>
15+
<status>created</status>
16+
<on-success>http://marklogic.com/states/initial</on-success>
17+
<priority>100</priority>
18+
<default-action>
19+
<module>/MarkLogic/cpf/actions/set-updated-action.xqy</module>
20+
</default-action>
21+
<execute>
22+
<condition>
23+
<module>/MarkLogic/cpf/actions/changed-type-condition.xqy</module>
24+
</condition>
25+
<action>
26+
<module>/MarkLogic/cpf/actions/success-action.xqy</module>
27+
</action>
28+
</execute>
29+
<execute>
30+
<condition>
31+
<module>/MarkLogic/cpf/actions/renamed-links-condition.xqy</module>
32+
</condition>
33+
<action>
34+
<module>/MarkLogic/cpf/actions/link-rename-action.xqy</module>
35+
</action>
36+
</execute>
37+
<execute>
38+
<condition>
39+
<module>/MarkLogic/cpf/actions/existing-state-condition.xqy</module>
40+
</condition>
41+
<action>
42+
<module>/MarkLogic/cpf/actions/touch-state-action.xqy</module>
43+
</action>
44+
</execute>
45+
</status-transition>
46+
<status-transition>
47+
<annotation>
48+
Clean up dangling links and dependent documents from deleted documents.
49+
</annotation>
50+
<status>deleted</status>
51+
<priority>100</priority>
52+
<default-action>
53+
<module>/MarkLogic/cpf/actions/link-coherency-action.xqy</module>
54+
</default-action>
55+
</status-transition>
56+
<status-transition>
57+
<annotation>
58+
Update the document time stamp and shift to the updated state.
59+
</annotation>
60+
<status>updated</status>
61+
<on-success>http://marklogic.com/states/updated</on-success>
62+
<priority>100</priority>
63+
<default-action>
64+
<module>/MarkLogic/cpf/actions/set-updated-action.xqy</module>
65+
</default-action>
66+
</status-transition>
67+
<status-transition>
68+
<annotation>
69+
Update the document time stamp and shift to the updated state.
70+
</annotation>
71+
<status>property-updated</status>
72+
<on-success>http://marklogic.com/states/property-updated</on-success>
73+
<priority>100</priority>
74+
<default-action>
75+
<module>/MarkLogic/cpf/actions/set-property-updated-action.xqy</module>
76+
</default-action>
77+
</status-transition>
78+
</pipeline-properties>

gradle/src/main/ml-config/security/roles/workflow-role-unit-test.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

roxy/src/test/suites/e2e-rest-fork/32-fork-simple.xqy renamed to gradle/src/test/ml-modules/root/test/suites/e2e-rest-fork/32-fork-simple.xqy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ return (
7070
xdmp:log(fn:concat("processId:", xdmp:quote($result[2])))
7171
);
7272

73+
xdmp:sleep(10000);
74+
75+
import module namespace test="http://marklogic.com/roxy/test-helper" at "/test/test-helper.xqy";
76+
test:assert-equal(3, (fn:count(cts:uri-match("/workflow/processes/fork-simple__1__0/*"))))
77+
;
78+
79+
80+
(: TODO: check the simple fork step 3 state here against the old ML forests :)
81+
7382
(: 4 - check parent process :)
7483
import module namespace const="http://marklogic.com/roxy/workflow-constants" at "/test/workflow-constants.xqy";
7584
import module namespace wrt="http://marklogic.com/workflow/rest-tests" at "/test/workflow-rest-tests.xqy";
@@ -80,7 +89,6 @@ declare namespace http = "xdmp:http";
8089
declare namespace prop = "http://marklogic.com/xdmp/property";
8190
declare namespace wf="http://marklogic.com/workflow";
8291

83-
let $_pause := xdmp:sleep(10000)
8492
let $pid := xs:string(doc("/test/processId.xml")/test/processId)
8593
let $result := wrt:process-read-all($const:xml-options, $pid)
8694
return (

0 commit comments

Comments
 (0)