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

Commit 1420eab

Browse files
committed
Fixes #21 properly
1 parent cbbf2d9 commit 1420eab

12 files changed

+13
-13
lines changed

modules/app/models/lib-search-subscribe.xqy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ declare function ss:do-create-action($alert-name as xs:string,$alert-module as x
312312
)
313313
};
314314

315-
declare function ss:check-remove-config($alert-name as xs:string) {
315+
declare function ss:check-remove-config($shortname as xs:string) {
316+
let $alert-name := "/config/alerts/" || $shortname
316317
let $config := alert:config-get($alert-name)
317318
return
318319
if (fn:not(fn:empty($config))) then
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ext:updateResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel"><ext:outcome>SUCCESS</ext:outcome><ext:domainId>7627142764385306115</ext:domainId></ext:updateResponse>
2+
<ext:updateResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel"><ext:outcome>SUCCESS</ext:outcome><ext:domainId>17176921750546592334</ext:domainId></ext:updateResponse>

shtests/06-process-create-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aa6d057b-b0a3-4184-b0b5-5d803e66410c-2015-04-15T10:54:55.878819-07:00
1+
3fbb53f7-71ef-4771-bc30-970ba71c70ac-2015-04-18T07:06:26.733912-07:00

shtests/07-process-read-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="aa6d057b-b0a3-4184-b0b5-5d803e66410c-2015-04-15T10:54:55.878819-07:00" xmlns:wf="http://marklogic.com/workflow"><wf:data><choiceA>B</choiceA><choiceB>C</choiceB></wf:data><wf:attachments><wf:attachment name="Menace" uri="/some/squid.xml"/><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail/><wf:metrics/></wf:process></ext:document></ext:readResponse>
2+
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="3fbb53f7-71ef-4771-bc30-970ba71c70ac-2015-04-18T07:06:26.733912-07:00" xmlns:wf="http://marklogic.com/workflow"><wf:data><choiceA>B</choiceA><choiceB>C</choiceB></wf:data><wf:attachments><wf:attachment name="Menace" uri="/some/squid.xml"/><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail/><wf:metrics/></wf:process></ext:document></ext:readResponse>

shtests/12-process-read-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="aa6d057b-b0a3-4184-b0b5-5d803e66410c-2015-04-15T10:54:55.878819-07:00" title="015-restapi-tests__1__2" name="015-restapi-tests" major="1" minor="2" xmlns:wf="http://marklogic.com/workflow"><wf:data><choiceA>B</choiceA><choiceB>C</choiceB></wf:data><wf:attachments><wf:attachment name="Menace" uri="/some/squid.xml"/><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail><wf:audit><wf:when>2015-04-15T10:55:07.595766-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/StartEvent_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:18.78701-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1</wf:state><wf:description>Marking as Complete</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:22.611128-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1__complete</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:39.670919-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2</wf:state><wf:description>Marking as Complete</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:41.511149-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2__complete</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.539397-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.741386-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.74693-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.773259-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.777909-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_3</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-15T10:55:42.979888-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/EndEvent_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit></wf:audit-trail><wf:metrics><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/StartEvent_1</wf:state><wf:start>2015-04-15T10:55:07.595766-07:00</wf:start><wf:finish>2015-04-15T10:55:07.595766-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1__complete</wf:state><wf:start>2015-04-15T10:55:22.611128-07:00</wf:start><wf:finish>2015-04-15T10:55:22.611128-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2__complete</wf:state><wf:start>2015-04-15T10:55:41.511149-07:00</wf:start><wf:finish>2015-04-15T10:55:41.511149-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_1</wf:state><wf:start>2015-04-15T10:55:42.539397-07:00</wf:start><wf:finish>2015-04-15T10:55:42.539397-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_1</wf:state><wf:start>2015-04-15T10:55:42.741386-07:00</wf:start><wf:finish>2015-04-15T10:55:42.741386-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_2</wf:state><wf:start>2015-04-15T10:55:42.74693-07:00</wf:start><wf:finish>2015-04-15T10:55:42.74693-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_2</wf:state><wf:start>2015-04-15T10:55:42.773259-07:00</wf:start><wf:finish>2015-04-15T10:55:42.773259-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_3</wf:state><wf:start>2015-04-15T10:55:42.777909-07:00</wf:start><wf:finish>2015-04-15T10:55:42.777909-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/EndEvent_2</wf:state><wf:start>2015-04-15T10:55:42.979888-07:00</wf:start><wf:finish>2015-04-15T10:55:42.979888-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric></wf:metrics></wf:process></ext:document></ext:readResponse>
2+
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="3fbb53f7-71ef-4771-bc30-970ba71c70ac-2015-04-18T07:06:26.733912-07:00" title="015-restapi-tests__1__2" name="015-restapi-tests" major="1" minor="2" xmlns:wf="http://marklogic.com/workflow"><wf:data><choiceA>B</choiceA><choiceB>C</choiceB></wf:data><wf:attachments><wf:attachment name="Menace" uri="/some/squid.xml"/><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail><wf:audit><wf:when>2015-04-18T07:06:29.301594-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/StartEvent_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:06:43.445368-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1</wf:state><wf:description>Marking as Complete</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:06:45.326723-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1__complete</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:00.790077-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2</wf:state><wf:description>Marking as Complete</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:00.939487-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2__complete</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:02.345098-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:02.574893-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_1</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:03.05891-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:03.200404-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:03.413516-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_3</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit><wf:audit><wf:when>2015-04-18T07:07:04.242741-07:00</wf:when><wf:category>ProcessEngine</wf:category><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/EndEvent_2</wf:state><wf:description>Completed step</wf:description><wf:detail/></wf:audit></wf:audit-trail><wf:metrics><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/StartEvent_1</wf:state><wf:start>2015-04-18T07:06:29.301594-07:00</wf:start><wf:finish>2015-04-18T07:06:29.301594-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_1__complete</wf:state><wf:start>2015-04-18T07:06:45.326723-07:00</wf:start><wf:finish>2015-04-18T07:06:45.326723-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/UserTask_2__complete</wf:state><wf:start>2015-04-18T07:07:00.939487-07:00</wf:start><wf:finish>2015-04-18T07:07:00.939487-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_1</wf:state><wf:start>2015-04-18T07:07:02.345098-07:00</wf:start><wf:finish>2015-04-18T07:07:02.345098-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_1</wf:state><wf:start>2015-04-18T07:07:02.574893-07:00</wf:start><wf:finish>2015-04-18T07:07:02.574893-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_2</wf:state><wf:start>2015-04-18T07:07:03.05891-07:00</wf:start><wf:finish>2015-04-18T07:07:03.05891-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/Task_2</wf:state><wf:start>2015-04-18T07:07:03.200404-07:00</wf:start><wf:finish>2015-04-18T07:07:03.200404-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/ExclusiveGateway_3</wf:state><wf:start>2015-04-18T07:07:03.413516-07:00</wf:start><wf:finish>2015-04-18T07:07:03.413516-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric><wf:metric><wf:state>http://marklogic.com/states/015-restapi-tests__1__2/EndEvent_2</wf:state><wf:start>2015-04-18T07:07:04.242741-07:00</wf:start><wf:finish>2015-04-18T07:07:04.242741-07:00</wf:finish><wf:duration>PT0S</wf:duration><wf:success>true</wf:success></wf:metric></wf:metrics></wf:process></ext:document></ext:readResponse>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ext:updateResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel"><ext:outcome>SUCCESS</ext:outcome><ext:domainId>7281889579827880308</ext:domainId></ext:updateResponse>
2+
<ext:updateResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel"><ext:outcome>SUCCESS</ext:outcome><ext:domainId>7940345650071217206</ext:domainId></ext:updateResponse>

shtests/23-process-create-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
700171dd-1ef1-4680-8e05-659d75e8faa7-2015-04-14T15:03:14.487177-07:00
1+
cb10919d-0172-45a0-8460-82f940c337e0-2015-04-18T07:07:21.043652-07:00

shtests/24-process-read-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="464f1768-9454-4814-b7fd-199e4543b7a1-2015-04-14T13:02:14.738891-07:00" xmlns:wf="http://marklogic.com/workflow"><wf:data/><wf:attachments><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail/><wf:metrics/></wf:process></ext:document></ext:readResponse>
2+
<ext:readResponse xmlns:ext="http://marklogic.com/rest-api/resource/process"><ext:outcome>SUCCESS</ext:outcome><ext:document><wf:process id="cb10919d-0172-45a0-8460-82f940c337e0-2015-04-18T07:07:21.043652-07:00" xmlns:wf="http://marklogic.com/workflow"><wf:data/><wf:attachments><wf:attachment name="Document" uri="/initial/sampledoc.xml"/></wf:attachments><wf:audit-trail/><wf:metrics/></wf:process></ext:document></ext:readResponse>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
<rapi:error xmlns:rapi="http://marklogic.com/rest-api"><rapi:status-code>500</rapi:status-code><rapi:status>INTERNAL ERROR</rapi:status><rapi:message-code>ALERT-EXISTCONFIG</rapi:message-code><rapi:message>ALERT-EXISTCONFIG: (err:FOER0000) Attempting to overwrite existing configuration: attempted to overwrite existing config. See the MarkLogic server error log for further detail.</rapi:message></rapi:error>

shtests/26-processsubscription-read-out.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<alert:config-description>/config/alerts/email-sub-test configuration</alert:config-description>
77
<alert:triggers/>
88
<alert:cpf-domains>
9-
<alert:cpf-domain id="16808049877955538729">Some folder alerting domain</alert:cpf-domain>
9+
<alert:cpf-domain id="8432039648806138724">Some folder alerting domain</alert:cpf-domain>
1010
</alert:cpf-domains>
1111
<alert:options/>
1212
</alert:config></ext:subscription></ext:readResponse>

0 commit comments

Comments
 (0)