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

Commit 89f4c71

Browse files
committed
added new files from merge
1 parent 6071ff9 commit 89f4c71

17 files changed

+450
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
check.project.nature=false
2+
connection.timeout=1000
3+
do.core.validation=true
4+
eclipse.preferences.version=1
5+
is.expanded=ALWAYS_TRUE
6+
is.horizontal=DEFAULT_TRUE
7+
is.marker.visible=DEFAULT_TRUE
8+
is.message.visible=ALWAYS_TRUE
9+
popup.config.dialog=0
10+
popup.config.dialog.for.activities=false
11+
popup.config.dialog.for.containers=false
12+
popup.config.dialog.for.data.defs=false
13+
popup.config.dialog.for.event.defs=false
14+
popup.config.dialog.for.events=false
15+
popup.config.dialog.for.gateways=false
16+
popup.detail.dialog=false
17+
show.advanced.properties=false
18+
show.descriptions=true
19+
show.id.attribute=false
20+
simplify.lists=true
21+
target.runtime=org.jboss.runtime.jbpm5
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- origin at X=0.0 Y=0.0 -->
3+
<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:ext="http://org.eclipse.bpmn2/ext" xmlns:xs="http://www.w3.org/2001/XMLSchema" id="Definitions_1" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.1.3.201503241414" targetNamespace="http://marklogic.com/workflow">
4+
<bpmn2:itemDefinition id="ItemDefinition_1" isCollection="false" structureRef="xs:string"/>
5+
<bpmn2:message id="Message_1" itemRef="ItemDefinition_1" name="BlankMessage">
6+
<bpmn2:extensionElements>
7+
<ext:style/>
8+
</bpmn2:extensionElements>
9+
</bpmn2:message>
10+
<bpmn2:message id="Message_2" itemRef="ItemDefinition_1" name="TestEmail">
11+
<bpmn2:extensionElements>
12+
<ext:style/>
13+
</bpmn2:extensionElements>
14+
</bpmn2:message>
15+
<bpmn2:interface id="Interface_1" implementationRef="MarkLogicEmailInterface" name="EmailInterface">
16+
<bpmn2:operation id="_Operation_4" name="SendTestEmail">
17+
<bpmn2:inMessageRef>Message_1</bpmn2:inMessageRef>
18+
<bpmn2:outMessageRef>Message_2</bpmn2:outMessageRef>
19+
</bpmn2:operation>
20+
</bpmn2:interface>
21+
<bpmn2:process id="EmailTest" name="Default Process" isExecutable="false">
22+
<bpmn2:startEvent id="StartEvent_1" name="Start Event 1">
23+
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
24+
</bpmn2:startEvent>
25+
<bpmn2:sequenceFlow id="SequenceFlow_1" name="Sequence Flow 1" sourceRef="StartEvent_1" targetRef="SendTask_1"/>
26+
<bpmn2:endEvent id="EndEvent_1" name="End Event 1">
27+
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
28+
</bpmn2:endEvent>
29+
<bpmn2:sendTask id="SendTask_1" name="Send Task 1" implementation="##unspecified" messageRef="Message_2" operationRef="_Operation_4">
30+
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
31+
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
32+
<bpmn2:ioSpecification id="InputOutputSpecification_2">
33+
<bpmn2:dataInput id="DataInput_1" itemSubjectRef="ItemDefinition_1" name="input1"/>
34+
<bpmn2:inputSet id="InputSet_2">
35+
<bpmn2:dataInputRefs>DataInput_1</bpmn2:dataInputRefs>
36+
</bpmn2:inputSet>
37+
<bpmn2:outputSet id="OutputSet_2"/>
38+
</bpmn2:ioSpecification>
39+
</bpmn2:sendTask>
40+
<bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="SendTask_1" targetRef="EndEvent_1"/>
41+
</bpmn2:process>
42+
<bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Default Process Diagram">
43+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="EmailTest">
44+
<bpmndi:BPMNShape id="BPMNShape_1" bpmnElement="StartEvent_1">
45+
<dc:Bounds height="36.0" width="36.0" x="100.0" y="100.0"/>
46+
<bpmndi:BPMNLabel id="BPMNLabel_1" labelStyle="BPMNLabelStyle_1">
47+
<dc:Bounds height="10.0" width="55.0" x="91.0" y="136.0"/>
48+
</bpmndi:BPMNLabel>
49+
</bpmndi:BPMNShape>
50+
<bpmndi:BPMNShape id="BPMNShape_2" bpmnElement="EndEvent_1">
51+
<dc:Bounds height="36.0" width="36.0" x="530.0" y="100.0"/>
52+
<bpmndi:BPMNLabel id="BPMNLabel_2" labelStyle="BPMNLabelStyle_1">
53+
<dc:Bounds height="10.0" width="51.0" x="523.0" y="136.0"/>
54+
</bpmndi:BPMNLabel>
55+
</bpmndi:BPMNShape>
56+
<bpmndi:BPMNShape id="BPMNShape_SendTask_1" bpmnElement="SendTask_1">
57+
<dc:Bounds height="50.0" width="110.0" x="265.0" y="93.0"/>
58+
<bpmndi:BPMNLabel id="BPMNLabel_4" labelStyle="BPMNLabelStyle_1">
59+
<dc:Bounds height="10.0" width="52.0" x="294.0" y="113.0"/>
60+
</bpmndi:BPMNLabel>
61+
</bpmndi:BPMNShape>
62+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_1" targetElement="BPMNShape_SendTask_1">
63+
<di:waypoint xsi:type="dc:Point" x="136.0" y="118.0"/>
64+
<di:waypoint xsi:type="dc:Point" x="200.0" y="118.0"/>
65+
<di:waypoint xsi:type="dc:Point" x="265.0" y="118.0"/>
66+
<bpmndi:BPMNLabel id="BPMNLabel_3" labelStyle="BPMNLabelStyle_1">
67+
<dc:Bounds height="10.0" width="70.0" x="167.0" y="119.0"/>
68+
</bpmndi:BPMNLabel>
69+
</bpmndi:BPMNEdge>
70+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_SendTask_1" targetElement="BPMNShape_2">
71+
<di:waypoint xsi:type="dc:Point" x="375.0" y="118.0"/>
72+
<di:waypoint xsi:type="dc:Point" x="452.0" y="118.0"/>
73+
<di:waypoint xsi:type="dc:Point" x="530.0" y="118.0"/>
74+
<bpmndi:BPMNLabel id="BPMNLabel_5" labelStyle="BPMNLabelStyle_1"/>
75+
</bpmndi:BPMNEdge>
76+
</bpmndi:BPMNPlane>
77+
<bpmndi:BPMNLabelStyle id="BPMNLabelStyle_1">
78+
<dc:Font name="arial" size="9.0"/>
79+
</bpmndi:BPMNLabelStyle>
80+
</bpmndi:BPMNDiagram>
81+
</bpmn2:definitions>
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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:tns="http://www.jboss.org/drools" xmlns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd" id="Definition" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
3+
<bpmn2:process id="defaultPackage.jBPMExample" tns:version="1" tns:packageName="defaultPackage" tns:adHoc="false" name="jBPMExample" isExecutable="true" processType="Private">
4+
<bpmn2:startEvent id="StartEvent_1" name="StartProcess">
5+
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
6+
</bpmn2:startEvent>
7+
<bpmn2:task id="Task_1" name="Task B">
8+
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
9+
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
10+
</bpmn2:task>
11+
<bpmn2:task id="Task_2" name="Task C">
12+
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
13+
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
14+
</bpmn2:task>
15+
<bpmn2:task id="Task_3" name="Task D">
16+
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
17+
</bpmn2:task>
18+
<bpmn2:inclusiveGateway id="InclusiveGateway_1" name="" gatewayDirection="Diverging">
19+
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
20+
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
21+
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
22+
</bpmn2:inclusiveGateway>
23+
<bpmn2:inclusiveGateway id="InclusiveGateway_2" name="" gatewayDirection="Converging">
24+
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
25+
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
26+
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
27+
</bpmn2:inclusiveGateway>
28+
<bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" sourceRef="StartEvent_1" targetRef="InclusiveGateway_1"/>
29+
<bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" sourceRef="InclusiveGateway_1" targetRef="Task_1"/>
30+
<bpmn2:sequenceFlow id="SequenceFlow_3" tns:priority="1" sourceRef="InclusiveGateway_1" targetRef="Task_2"/>
31+
<bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" sourceRef="Task_1" targetRef="InclusiveGateway_2"/>
32+
<bpmn2:sequenceFlow id="SequenceFlow_5" tns:priority="1" sourceRef="Task_2" targetRef="InclusiveGateway_2"/>
33+
<bpmn2:sequenceFlow id="SequenceFlow_6" tns:priority="1" sourceRef="InclusiveGateway_2" targetRef="Task_3"/>
34+
<bpmn2:serviceTask id="ServiceTask_1" name="Service Task 1"/>
35+
<bpmn2:callActivity id="CallActivity_1" tns:waitForCompletion="true" tns:independent="false" name="Call Activity 1"/>
36+
<bpmn2:businessRuleTask id="BusinessRuleTask_1" tns:ruleFlowGroup="" name="Business Rule Task 1"/>
37+
</bpmn2:process>
38+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
39+
<bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="defaultPackage.jBPMExample">
40+
<bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
41+
<dc:Bounds height="36.0" width="36.0" x="80.0" y="200.0"/>
42+
</bpmndi:BPMNShape>
43+
<bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="Task_1">
44+
<dc:Bounds height="50.0" width="110.0" x="595.0" y="185.0"/>
45+
</bpmndi:BPMNShape>
46+
<bpmndi:BPMNShape id="BPMNShape_Task_2" bpmnElement="Task_2">
47+
<dc:Bounds height="50.0" width="110.0" x="595.0" y="385.0"/>
48+
</bpmndi:BPMNShape>
49+
<bpmndi:BPMNShape id="BPMNShape_Task_3" bpmnElement="Task_3">
50+
<dc:Bounds height="50.0" width="110.0" x="795.0" y="285.0"/>
51+
</bpmndi:BPMNShape>
52+
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_1" bpmnElement="InclusiveGateway_1">
53+
<dc:Bounds height="50.0" width="50.0" x="525.0" y="285.0"/>
54+
</bpmndi:BPMNShape>
55+
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_2" bpmnElement="InclusiveGateway_2">
56+
<dc:Bounds height="50.0" width="50.0" x="725.0" y="285.0"/>
57+
</bpmndi:BPMNShape>
58+
<bpmndi:BPMNShape id="BPMNShape_ServiceTask_1" bpmnElement="ServiceTask_1">
59+
<dc:Bounds height="50.0" width="110.0" x="595.0" y="85.0"/>
60+
</bpmndi:BPMNShape>
61+
<bpmndi:BPMNShape id="BPMNShape_CallActivity_1" bpmnElement="CallActivity_1" isExpanded="true">
62+
<dc:Bounds height="50.0" width="110.0" x="295.0" y="155.0"/>
63+
</bpmndi:BPMNShape>
64+
<bpmndi:BPMNShape id="BPMNShape_BusinessRuleTask_1" bpmnElement="BusinessRuleTask_1">
65+
<dc:Bounds height="50.0" width="110.0" x="415.0" y="95.0"/>
66+
</bpmndi:BPMNShape>
67+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_StartEvent_1" targetElement="BPMNShape_InclusiveGateway_1">
68+
<di:waypoint xsi:type="dc:Point" x="98.0" y="236.0"/>
69+
<di:waypoint xsi:type="dc:Point" x="98.0" y="310.0"/>
70+
<di:waypoint xsi:type="dc:Point" x="525.0" y="310.0"/>
71+
</bpmndi:BPMNEdge>
72+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_InclusiveGateway_1" targetElement="BPMNShape_Task_1">
73+
<di:waypoint xsi:type="dc:Point" x="550.0" y="285.0"/>
74+
<di:waypoint xsi:type="dc:Point" x="550.0" y="210.0"/>
75+
<di:waypoint xsi:type="dc:Point" x="595.0" y="210.0"/>
76+
</bpmndi:BPMNEdge>
77+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_InclusiveGateway_1" targetElement="BPMNShape_Task_2">
78+
<di:waypoint xsi:type="dc:Point" x="550.0" y="336.0"/>
79+
<di:waypoint xsi:type="dc:Point" x="550.0" y="410.0"/>
80+
<di:waypoint xsi:type="dc:Point" x="595.0" y="410.0"/>
81+
</bpmndi:BPMNEdge>
82+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_InclusiveGateway_2">
83+
<di:waypoint xsi:type="dc:Point" x="705.0" y="210.0"/>
84+
<di:waypoint xsi:type="dc:Point" x="750.0" y="210.0"/>
85+
<di:waypoint xsi:type="dc:Point" x="750.0" y="285.0"/>
86+
</bpmndi:BPMNEdge>
87+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_Task_2" targetElement="BPMNShape_InclusiveGateway_2">
88+
<di:waypoint xsi:type="dc:Point" x="705.0" y="410.0"/>
89+
<di:waypoint xsi:type="dc:Point" x="750.0" y="410.0"/>
90+
<di:waypoint xsi:type="dc:Point" x="750.0" y="336.0"/>
91+
</bpmndi:BPMNEdge>
92+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_InclusiveGateway_2" targetElement="BPMNShape_Task_3">
93+
<di:waypoint xsi:type="dc:Point" x="776.0" y="310.0"/>
94+
<di:waypoint xsi:type="dc:Point" x="784.0" y="310.0"/>
95+
<di:waypoint xsi:type="dc:Point" x="784.0" y="310.0"/>
96+
<di:waypoint xsi:type="dc:Point" x="795.0" y="310.0"/>
97+
</bpmndi:BPMNEdge>
98+
</bpmndi:BPMNPlane>
99+
</bpmndi:BPMNDiagram>
100+
</bpmn2:definitions>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<em:Message
2+
xmlns:em="URN:ietf:params:email-xml:"
3+
xmlns:rf="URN:ietf:params:rfc822:">
4+
<rf:subject>Document Rejected</rf:subject>
5+
<rf:from>
6+
<em:Address>
7+
<em:name>MarkLogic Admin</em:name>
8+
<em:adrs>[email protected]</em:adrs>
9+
</em:Address>
10+
</rf:from>
11+
<rf:to>
12+
<em:Address>
13+
<em:name>{$wf:process/wf:data/RecipientName/text()}</em:name>
14+
<em:adrs>{$wf:process/wf:data/RecipientEmail/text()}</em:adrs>
15+
</em:Address>
16+
</rf:to>
17+
<em:content>
18+
<html xmlns="http://www.w3.org/1999/xhtml">
19+
<head>
20+
<title>V2 sample rejection message</title>
21+
</head>
22+
<body>
23+
<h1>Document rejected</h1>
24+
<p>Your document {xs:string($wf:process/wf:attachments/wf:attachment[@name='Document']/@uri)} was rejected.</p>
25+
</body>
26+
</html>
27+
</em:content>
28+
</em:Message>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<em:Message
2+
xmlns:em="URN:ietf:params:email-xml:"
3+
xmlns:rf="URN:ietf:params:rfc822:">
4+
<rf:subject>Document Approved</rf:subject>
5+
<rf:from>
6+
<em:Address>
7+
<em:name>MarkLogic Admin</em:name>
8+
<em:adrs>[email protected]</em:adrs>
9+
</em:Address>
10+
</rf:from>
11+
<rf:to>
12+
<em:Address>
13+
<em:name>{$wf:process/wf:data/RecipientName/text()}</em:name>
14+
<em:adrs>{$wf:process/wf:data/RecipientEmail/text()}</em:adrs>
15+
</em:Address>
16+
</rf:to>
17+
<em:content>
18+
<html xmlns="http://www.w3.org/1999/xhtml">
19+
<head>
20+
<title>Sample approved message</title>
21+
</head>
22+
<body>
23+
<h1>Document approved</h1>
24+
<p>Your document {xs:string($wf:process/wf:attachments/wf:attachment[@name='Document']/@uri)} was approved.</p>
25+
</body>
26+
</html>
27+
</em:content>
28+
</em:Message>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<em:Message
2+
xmlns:em="URN:ietf:params:email-xml:"
3+
xmlns:rf="URN:ietf:params:rfc822:">
4+
<rf:subject>Document Rejected</rf:subject>
5+
<rf:from>
6+
<em:Address>
7+
<em:name>MarkLogic Admin</em:name>
8+
<em:adrs>[email protected]</em:adrs>
9+
</em:Address>
10+
</rf:from>
11+
<rf:to>
12+
<em:Address>
13+
<em:name>{$wf:process/wf:data/RecipientName/text()}</em:name>
14+
<em:adrs>{$wf:process/wf:data/RecipientEmail/text()}</em:adrs>
15+
</em:Address>
16+
</rf:to>
17+
<em:content>
18+
<html xmlns="http://www.w3.org/1999/xhtml">
19+
<head>
20+
<title>V1 sample rejection message</title>
21+
</head>
22+
<body>
23+
<h1>Document rejected</h1>
24+
<p>Your document was rejected.</p>
25+
</body>
26+
</html>
27+
</em:content>
28+
</em:Message>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<em:Message
2+
xmlns:em="URN:ietf:params:email-xml:"
3+
xmlns:rf="URN:ietf:params:rfc822:">
4+
<rf:subject>Test Email</rf:subject>
5+
<rf:from>
6+
<em:Address>
7+
<em:name>MarkLogic Admin</em:name>
8+
<em:adrs>[email protected]</em:adrs>
9+
</em:Address>
10+
</rf:from>
11+
<rf:to>
12+
<em:Address>
13+
<em:name>Admin</em:name>
14+
<em:adrs>[email protected]</em:adrs>
15+
</em:Address>
16+
</rf:to>
17+
<em:content>
18+
<html xmlns="http://www.w3.org/1999/xhtml">
19+
<head>
20+
<title>Test email message</title>
21+
</head>
22+
<body>
23+
<h1>Email message</h1>
24+
<p>Your document {xs:string($wf:process/wf:attachments/wf:attachment[1]/@uri)} was attached.</p>
25+
</body>
26+
</html>
27+
</em:content>
28+
</em:Message>

rest-api/ext/processasset.xqy

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
xquery version "1.0-ml";
2+
3+
module namespace ext = "http://marklogic.com/rest-api/resource/processmodel";
4+
5+
import module namespace wfi="http://marklogic.com/workflow-import" at "/app/models/workflow-import.xqy";
6+
import module namespace wfu="http://marklogic.com/workflow-util" at "/app/models/workflow-util.xqy";
7+
8+
declare namespace wf="http://marklogic.com/workflow";
9+
10+
declare namespace roxy = "http://marklogic.com/roxy";
11+
12+
13+
(:
14+
: Get the process asset by exact name and version. Will return top level default is no versioned asset exists.
15+
: ?asset=name&model=name[&major=numeric[&minor=numeric]]
16+
: E.g. ?asset=RejectedEmail.txt&model=021-initiating-attachment&majorversion=1&minorversion=0
17+
: TODO if no asset name specific, list assets for process model
18+
:)
19+
declare
20+
%roxy:params("")
21+
function ext:get(
22+
$context as map:map,
23+
$params as map:map
24+
) as document-node()*
25+
{
26+
(
27+
xdmp:set-response-code(200, "OK"),
28+
29+
document {
30+
31+
32+
}
33+
)
34+
};
35+
36+
37+
(:
38+
: Update the process asset
39+
: ?asset=name&model=name[&major=numeric[&minor=numeric]]
40+
:)
41+
declare
42+
%roxy:params("")
43+
function ext:put(
44+
$context as map:map,
45+
$params as map:map,
46+
$input as document-node()*
47+
) as document-node()?
48+
{
49+
(
50+
xdmp:set-response-code(200, "OK"),
51+
document {
52+
}
53+
)
54+
};
55+
56+
(: TODO delete asset :)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ext:createResponse xmlns:ext="http://marklogic.com/rest-api/resource/processmodel"><ext:outcome>SUCCESS</ext:outcome><ext:modelId>022-email-test__1__0</ext:modelId></ext:createResponse>

shtests/21-processmodel-create.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
. ../config/webserver-settings.sh
4+
5+
echo "starting 21-processmodel-create.sh"
6+
7+
curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8+
-d@"../data/examples/bpmn2/022-email-test.bpmn" \
9+
-H "Content-type: application/xml" -H "Accept: application/xml" \
10+
"http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=022-email-test.bpmn&enable=true" > 21-processmodel-create-out.txt
11+
12+
echo "21-processmodel-create.sh complete"

0 commit comments

Comments
 (0)