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

Commit 351e930

Browse files
committed
Merge pull request #78 from adamfowleruk/feature-4
Feature 4 complete and tested
2 parents 6b5604d + 21b6927 commit 351e930

File tree

58 files changed

+2184
-541
lines changed

Some content is hidden

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

58 files changed

+2184
-541
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
mljsadmin.log
33
eclipse/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5
44
.DS_Store
5-
5+
shtests/*-out.txt
6+
shtests/output.log

README.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
1-
A way to import and execute basic process models using MarkLogic's CPF feature.
1+
A way to import and execute BPMN2 process models using MarkLogic's CPF feature.
22

3-
## Why? Just... Why!?!
3+
## What is MarkLogic Workflow?
44

5-
This project aims to provide a new useful way to define CPF Pipelines. This means providing a way to model CPF pipelines
6-
and then take those models to generate a pipeline. Rather than create a custom modelling tool just for CPF, it is easier
7-
to use one of the many process model formats and existing tools, and provide a palette of MarkLogic specific actions for
8-
these tools.
5+
This project aims to provide a way to use the dominant BPMN2 process modelling standard in order to provide a way to
6+
build workflows that can be executed within MarkLogic's Content Processing Framework (CPF) feature.
97

10-
This functionality can also be used by MarkLogic customers to implement extended workflow functionality. BPMN2 model
11-
import and standard activity types are supported, allowing implementation of Content-Centric Workflow.
8+
Many customers of MarkLogic desire simple content and human centric workflows rather than complex ESB/JMS system-to-system integration. A full-fledged separate BPM suite therefore forces them to install a great deal more infrastructure
9+
and has a higher learning curve than is necessary to support these workflows.
10+
11+
MarkLogic Workflow uses the MarkLogic Enterprise NoSQL Database and it's document state processing functionality - CPF -
12+
in order to provide a single integrated platform for MarkLogic-document and human user centric workflow modelling and
13+
processing.
14+
15+
This provides customers with an easy entry point in to content-centric BPM for long-lived processes that use MarkLogic
16+
stored content. It does this at minumum cost, with no extra working
17+
parts (other than a modelling tool), and uses open standards and open source software to minimise vendor lock in.
18+
19+
Example processes that can be implemented:-
20+
21+
- Content review/approval workflows
22+
- Content change request workflows
23+
- Content creation request workflows
24+
- Case management workflows using content about a person/event/customer/place as context for a human user's decision making
25+
- Long term content review and disposition (policy driven deletion) workflows
26+
27+
## Why use MarkLogic Workflow?
28+
29+
Good question. A few quick reasons:-
30+
31+
- No additional cost for existing MarkLogic customers
32+
- Extends CPF to allow parallel execution of sub-processes and inclusion of multiple documents, or none, in a single process
33+
- Uses MarkLogic Alerting to precisely identify which documents affect which processes, at a more granular level that CPF Domains
34+
- Introduces the concept of human steps, and work queues, which CPF does not support
35+
- Implemented using CPF - which means long running processes have ZERO PROCESSING COST when not active - this is UNIQUE in the BPM space
36+
- Uses the dominant BPMN2 standard and provides a MarkLogic view in the Eclipse BPMN2 modeler, a leading open source BPM modelling application, used by jBPM also, avoiding vendor lock-in
37+
38+
MarkLogic workflow does not aim to be a full fledge BPM Suite providing round trip business process re-engineering. It is
39+
also not aimed at system to system integration, although will be able to invoke and be invoked by web services in a future
40+
release. MarkLogic workflow can, therefore, act as part of an overall SOA architecture that also includes system to system
41+
BPM environments like IBM WebSphere Process Server or TIBCO ActiveMatrix BPM.
1242

1343
## Information on MarkLogic Workflow
1444
- Overview

config/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {"host":"192.168.123.225","port":"6061","database":"workflow-content",
1+
module.exports = {"host":"192.168.123.4","port":"6061","database":"workflow-content",
22
"username":"admin","password":"admin","auth":"digest","defaultuser":"nobody","webport":5001,
33
"alertport":5002,"apppath":"./app","defaultpath":"/workplace.html5","modulesport":6060,
44
"modulesdatabase":"workflow-modules","ssl":false,"adminport":8002,"triggersdatabase":"Triggers"}

config/webserver-settings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# CREATED BY YEOMAN generator-mljsworkplace!
44

5-
RESTHOST=192.168.123.225
5+
RESTHOST=192.168.123.4
66
RESTPORT=6061
77
DATABASE=workflow-content
88
MLADMINUSER=admin
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
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:ns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://marklogic.com/workflow" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI-XMI http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI-XMI" id="Definition" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.1.4.201509111742" 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 xsi:type="ns:anyType"/>
8+
</bpmn2:extensionElements>
9+
</bpmn2:message>
10+
<bpmn2:message id="Message_2" itemRef="ItemDefinition_1" name="TestEmail">
11+
<bpmn2:extensionElements>
12+
<ext:style xsi:type="ns:anyType"/>
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="fork-conditional" name="fork-conditional" isExecutable="true" processType="Public">
22+
<bpmn2:startEvent id="StartEvent_1" name="StartEvent_1">
23+
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
24+
</bpmn2:startEvent>
25+
<bpmn2:endEvent id="EndEvent_1" name="End Event 1">
26+
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
27+
</bpmn2:endEvent>
28+
<bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="InclusiveGateway_1"/>
29+
<bpmn2:inclusiveGateway id="InclusiveGateway_1" name="ForkStep" gatewayDirection="Diverging" default="SequenceFlow_5">
30+
<bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
31+
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
32+
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
33+
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
34+
</bpmn2:inclusiveGateway>
35+
<bpmn2:inclusiveGateway id="InclusiveGateway_2" name="RendezvousStep" gatewayDirection="Converging">
36+
<bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
37+
<bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
38+
<bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
39+
<bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
40+
</bpmn2:inclusiveGateway>
41+
<bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="InclusiveGateway_2" targetRef="EndEvent_1"/>
42+
<bpmn2:task id="Task_1" name="ExecutedTask">
43+
<bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
44+
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
45+
</bpmn2:task>
46+
<bpmn2:task id="Task_2" name="SkippedTask">
47+
<bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
48+
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
49+
</bpmn2:task>
50+
<bpmn2:task id="Task_3" name="DefaultTask">
51+
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
52+
<bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
53+
</bpmn2:task>
54+
<bpmn2:sequenceFlow id="SequenceFlow_3" name="True Condition" sourceRef="InclusiveGateway_1" targetRef="Task_1">
55+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_1" evaluatesToTypeRef="ItemDefinition_1" language="http://www.w3.org/1999/XPath">fn:true()</bpmn2:conditionExpression>
56+
</bpmn2:sequenceFlow>
57+
<bpmn2:sequenceFlow id="SequenceFlow_4" name="False Condition" sourceRef="InclusiveGateway_1" targetRef="Task_2">
58+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_2" evaluatesToTypeRef="ItemDefinition_1" language="http://www.w3.org/1999/XPath">fn:false()</bpmn2:conditionExpression>
59+
</bpmn2:sequenceFlow>
60+
<bpmn2:sequenceFlow id="SequenceFlow_5" name="Default Flow" sourceRef="InclusiveGateway_1" targetRef="Task_3"/>
61+
<bpmn2:sequenceFlow id="SequenceFlow_6" sourceRef="Task_1" targetRef="InclusiveGateway_2"/>
62+
<bpmn2:sequenceFlow id="SequenceFlow_7" sourceRef="Task_2" targetRef="InclusiveGateway_2"/>
63+
<bpmn2:sequenceFlow id="SequenceFlow_8" sourceRef="Task_3" targetRef="InclusiveGateway_2"/>
64+
</bpmn2:process>
65+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
66+
<bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="fork-conditional">
67+
<bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
68+
<dc:Bounds height="36.0" width="36.0" x="45.0" y="152.0"/>
69+
<bpmndi:BPMNLabel id="BPMNLabel_1">
70+
<dc:Bounds height="10.0" width="54.0" x="36.0" y="188.0"/>
71+
</bpmndi:BPMNLabel>
72+
</bpmndi:BPMNShape>
73+
<bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_1">
74+
<dc:Bounds height="36.0" width="36.0" x="602.0" y="152.0"/>
75+
<bpmndi:BPMNLabel id="BPMNLabel_2">
76+
<dc:Bounds height="10.0" width="51.0" x="595.0" y="188.0"/>
77+
</bpmndi:BPMNLabel>
78+
</bpmndi:BPMNShape>
79+
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_1" bpmnElement="InclusiveGateway_1" isMarkerVisible="true">
80+
<dc:Bounds height="50.0" width="50.0" x="155.0" y="145.0"/>
81+
<bpmndi:BPMNLabel id="BPMNLabel_4">
82+
<dc:Bounds height="10.0" width="37.0" x="161.0" y="195.0"/>
83+
</bpmndi:BPMNLabel>
84+
</bpmndi:BPMNShape>
85+
<bpmndi:BPMNShape id="BPMNShape_InclusiveGateway_2" bpmnElement="InclusiveGateway_2" isMarkerVisible="true">
86+
<dc:Bounds height="50.0" width="50.0" x="456.0" y="145.0"/>
87+
<bpmndi:BPMNLabel id="BPMNLabel_5">
88+
<dc:Bounds height="10.0" width="70.0" x="446.0" y="195.0"/>
89+
</bpmndi:BPMNLabel>
90+
</bpmndi:BPMNShape>
91+
<bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="Task_1">
92+
<dc:Bounds height="50.0" width="110.0" x="306.0" y="80.0"/>
93+
<bpmndi:BPMNLabel id="BPMNLabel_7">
94+
<dc:Bounds height="10.0" width="59.0" x="331.0" y="100.0"/>
95+
</bpmndi:BPMNLabel>
96+
</bpmndi:BPMNShape>
97+
<bpmndi:BPMNShape id="BPMNShape_Task_2" bpmnElement="Task_2">
98+
<dc:Bounds height="50.0" width="110.0" x="306.0" y="145.0"/>
99+
<bpmndi:BPMNLabel id="BPMNLabel_8">
100+
<dc:Bounds height="10.0" width="53.0" x="334.0" y="165.0"/>
101+
</bpmndi:BPMNLabel>
102+
</bpmndi:BPMNShape>
103+
<bpmndi:BPMNShape id="BPMNShape_Task_3" bpmnElement="Task_3">
104+
<dc:Bounds height="50.0" width="110.0" x="306.0" y="210.0"/>
105+
<bpmndi:BPMNLabel id="BPMNLabel_9">
106+
<dc:Bounds height="10.0" width="49.0" x="336.0" y="230.0"/>
107+
</bpmndi:BPMNLabel>
108+
</bpmndi:BPMNShape>
109+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_StartEvent_1" targetElement="BPMNShape_InclusiveGateway_1">
110+
<di:waypoint xsi:type="dc:Point" x="81.0" y="170.0"/>
111+
<di:waypoint xsi:type="dc:Point" x="145.0" y="170.0"/>
112+
<di:waypoint xsi:type="dc:Point" x="155.0" y="170.0"/>
113+
<bpmndi:BPMNLabel id="BPMNLabel_3"/>
114+
</bpmndi:BPMNEdge>
115+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_InclusiveGateway_2" targetElement="BPMNShape_EndEvent_1">
116+
<di:waypoint xsi:type="dc:Point" x="506.0" y="170.0"/>
117+
<di:waypoint xsi:type="dc:Point" x="553.0" y="170.0"/>
118+
<di:waypoint xsi:type="dc:Point" x="553.0" y="170.0"/>
119+
<di:waypoint xsi:type="dc:Point" x="602.0" y="170.0"/>
120+
<bpmndi:BPMNLabel id="BPMNLabel_6"/>
121+
</bpmndi:BPMNEdge>
122+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_InclusiveGateway_1" targetElement="BPMNShape_Task_1">
123+
<di:waypoint xsi:type="dc:Point" x="180.0" y="145.0"/>
124+
<di:waypoint xsi:type="dc:Point" x="180.0" y="105.0"/>
125+
<di:waypoint xsi:type="dc:Point" x="306.0" y="105.0"/>
126+
<bpmndi:BPMNLabel id="BPMNLabel_10">
127+
<dc:Bounds height="10.0" width="59.0" x="179.0" y="106.0"/>
128+
</bpmndi:BPMNLabel>
129+
</bpmndi:BPMNEdge>
130+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_InclusiveGateway_1" targetElement="BPMNShape_Task_2">
131+
<di:waypoint xsi:type="dc:Point" x="205.0" y="170.0"/>
132+
<di:waypoint xsi:type="dc:Point" x="240.0" y="170.0"/>
133+
<di:waypoint xsi:type="dc:Point" x="306.0" y="170.0"/>
134+
<bpmndi:BPMNLabel id="BPMNLabel_11">
135+
<dc:Bounds height="10.0" width="63.0" x="210.0" y="171.0"/>
136+
</bpmndi:BPMNLabel>
137+
</bpmndi:BPMNEdge>
138+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_InclusiveGateway_1" targetElement="BPMNShape_Task_3">
139+
<di:waypoint xsi:type="dc:Point" x="180.0" y="195.0"/>
140+
<di:waypoint xsi:type="dc:Point" x="180.0" y="235.0"/>
141+
<di:waypoint xsi:type="dc:Point" x="306.0" y="235.0"/>
142+
<bpmndi:BPMNLabel id="BPMNLabel_12">
143+
<dc:Bounds height="10.0" width="50.0" x="184.0" y="236.0"/>
144+
</bpmndi:BPMNLabel>
145+
</bpmndi:BPMNEdge>
146+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_InclusiveGateway_2">
147+
<di:waypoint xsi:type="dc:Point" x="416.0" y="105.0"/>
148+
<di:waypoint xsi:type="dc:Point" x="481.0" y="105.0"/>
149+
<di:waypoint xsi:type="dc:Point" x="481.0" y="145.0"/>
150+
<bpmndi:BPMNLabel id="BPMNLabel_13"/>
151+
</bpmndi:BPMNEdge>
152+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_7" sourceElement="BPMNShape_Task_2" targetElement="BPMNShape_InclusiveGateway_2">
153+
<di:waypoint xsi:type="dc:Point" x="416.0" y="170.0"/>
154+
<di:waypoint xsi:type="dc:Point" x="426.0" y="170.0"/>
155+
<di:waypoint xsi:type="dc:Point" x="426.0" y="170.0"/>
156+
<di:waypoint xsi:type="dc:Point" x="456.0" y="170.0"/>
157+
<bpmndi:BPMNLabel id="BPMNLabel_14"/>
158+
</bpmndi:BPMNEdge>
159+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="BPMNShape_Task_3" targetElement="BPMNShape_InclusiveGateway_2">
160+
<di:waypoint xsi:type="dc:Point" x="416.0" y="235.0"/>
161+
<di:waypoint xsi:type="dc:Point" x="481.0" y="235.0"/>
162+
<di:waypoint xsi:type="dc:Point" x="481.0" y="195.0"/>
163+
<bpmndi:BPMNLabel id="BPMNLabel_15"/>
164+
</bpmndi:BPMNEdge>
165+
</bpmndi:BPMNPlane>
166+
</bpmndi:BPMNDiagram>
167+
</bpmn2:definitions>

0 commit comments

Comments
 (0)