├── .editorconfig
├── .gitignore
├── .project
├── .settings
└── org.eclipse.bpmn2.modeler.core.prefs
├── CHANGELOG.mdown
├── CONTRIBUTING.md
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── Releases.mdown
├── build.gradle
├── data
├── .initial.json
├── definitions
│ └── BPMNTestProcessData.xsd
├── examples
│ ├── .load.json
│ ├── bpmn2
│ │ ├── 001_two_sample_transitions.bpmn
│ │ ├── 002_data_basic.bpmn
│ │ ├── 011_gateways_test.bpmn
│ │ ├── 015-restapi-tests.bpmn
│ │ ├── 021-initiating-attachment.bpmn
│ │ ├── 022-email-test.bpmn
│ │ ├── 051_domain.bpmn
│ │ ├── 052_referenced_document_content.bpmn
│ │ ├── 053_referenced_document_properties.bpmn
│ │ ├── 060-attachments.bpmn2
│ │ ├── InclusiveGatewayTest-01.bpmn2
│ │ ├── InclusiveGatewayTest-02.bpmn
│ │ ├── fork-conditional.bpmn2
│ │ ├── fork-simple.bpmn2
│ │ ├── fork-within-fork.bpmn2
│ │ ├── jBPMExample.bpmn2
│ │ └── np1.bpmn2
│ ├── bpmn2omg
│ │ ├── advanced
│ │ │ ├── Collapsed SubProcess.bpmn
│ │ │ ├── CorrelationExampleSeller.bpmn
│ │ │ ├── Email Voting 2.bpmn
│ │ │ ├── Expanded SubProcess.bpmn
│ │ │ ├── Laneset.bpmn
│ │ │ ├── Pool.bpmn
│ │ │ ├── Process.bpmn
│ │ │ ├── Procurement Processes with Error Handling - Stencil Trisotech 3 pages.bpmn
│ │ │ ├── Tavel Booking.bpmn
│ │ │ ├── triso - Hardware Retailer v2.bpmn
│ │ │ └── triso - Order Process for Pizza V4.bpmn
│ │ ├── basic
│ │ │ ├── Incident Management level 1.bpmn
│ │ │ ├── Incident Management(Account Manager Only).bpmn
│ │ │ └── Incident Management(Process Engine Only).bpmn
│ │ └── extended
│ │ │ ├── Call Activity.bpmn
│ │ │ └── Nobel Prize Process.bpmn
│ ├── cpf
│ │ ├── add-cpf-actions.xqy
│ │ ├── pipeline-extended.xml
│ │ └── pipeline-simple.xml
│ └── scxml
│ │ ├── add-numbers.xml
│ │ ├── broken.xml
│ │ ├── two-sample-transitions-invalid.xml
│ │ └── two-sample-transitions.xml
├── initial
│ └── sampledoc.xml
├── qconsole
│ └── MarkLogicWorkflow.xml
└── restapi.json
├── documentation
├── CASE-DESIGN.md
├── CASE-RESTAPI.md
├── CASE.md
├── DESIGN.md
├── DEV-MODELER.md
├── DEV-NEWACTIVITY.md
├── DEV-STEPPROC.md
├── DEV-TESTING.md
├── DEVELOPER.md
├── INSTALL.md
├── MODELLING.md
├── OVERVIEW.md
├── RESTAPI.md
├── SPRINTS.md
├── STEPS.md
├── TECHINTRO.md
├── USING-SUBSCRIPTIONS.md
├── USING.md
├── WEEDS.md
├── bpmn2-spec.md
├── bpmn2omg
│ ├── 10-06-02.pdf
│ ├── BPMN2ModelerUserGuide-1.0.1.pdf
│ └── formal-11-01-03.pdf
├── cpf-ootb.md
├── features
│ └── feature-4-fork-rendezvous.md
└── marklogicworkflow.xsd
├── eclipse
├── MarkLogicWorkflowFeature
│ ├── .project
│ ├── build.properties
│ └── feature.xml
├── MarkLogicWorkflowUpdateSite
│ ├── .project
│ ├── artifacts.jar
│ ├── content.jar
│ ├── features
│ │ ├── MarkLogicWorkflow_1.0.0.201504170009.jar
│ │ ├── MarkLogicWorkflow_1.0.0.201504170037.jar
│ │ ├── MarkLogicWorkflow_1.1.0.0.jar
│ │ └── MarkLogicWorkflow_1.1.1.0.jar
│ ├── plugins
│ │ ├── org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170009.jar
│ │ ├── org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170037.jar
│ │ ├── org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.0.0.jar
│ │ └── org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.1.0.jar
│ └── site.xml
└── org.eclipse.bpmn2.modeler.runtime.marklogic
│ ├── .classpath
│ ├── .project
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── about.html
│ ├── bin
│ ├── .gitignore
│ └── org
│ │ └── eclipse
│ │ └── bpmn2
│ │ └── modeler
│ │ └── runtime
│ │ └── marklogic
│ │ └── workflow
│ │ ├── ImageProvider.class
│ │ ├── MarkLogicCPFRuntimeExtension.class
│ │ ├── MarkLogicWorkflowRuntimeExtension.class
│ │ ├── features
│ │ ├── CPFActionFeatureContainer.class
│ │ ├── CPFConditionFeatureContainer.class
│ │ ├── CPFDomainFeatureContainer.class
│ │ ├── CPFFinalFeatureContainer.class
│ │ ├── CPFInitialFeatureContainer.class
│ │ ├── CPFStateFeatureContainer.class
│ │ ├── CPFStatusFeatureContainer.class
│ │ └── MLAttachmentNodeReplace.class
│ │ ├── preferences
│ │ ├── Messages.class
│ │ ├── WorkflowPreferencePage.class
│ │ └── messages.properties
│ │ └── wizards
│ │ ├── Messages.class
│ │ ├── NewCPFProcessWizard$1.class
│ │ ├── NewCPFProcessWizard$2.class
│ │ ├── NewCPFProcessWizard.class
│ │ ├── NewCPFProcessWizardPage1$1.class
│ │ ├── NewCPFProcessWizardPage1$2.class
│ │ ├── NewCPFProcessWizardPage1$3.class
│ │ ├── NewCPFProcessWizardPage1$4.class
│ │ ├── NewCPFProcessWizardPage1$5.class
│ │ ├── NewCPFProcessWizardPage1$6.class
│ │ ├── NewCPFProcessWizardPage1$7.class
│ │ ├── NewCPFProcessWizardPage1.class
│ │ ├── NewWorkflowProcessWizard$1.class
│ │ ├── NewWorkflowProcessWizard$2.class
│ │ ├── NewWorkflowProcessWizard.class
│ │ ├── NewWorkflowProcessWizardPage1$1.class
│ │ ├── NewWorkflowProcessWizardPage1$2.class
│ │ ├── NewWorkflowProcessWizardPage1$3.class
│ │ ├── NewWorkflowProcessWizardPage1$4.class
│ │ ├── NewWorkflowProcessWizardPage1$5.class
│ │ ├── NewWorkflowProcessWizardPage1.class
│ │ └── messages.properties
│ ├── build.properties
│ ├── epl-v10.html
│ ├── icons
│ ├── small
│ │ ├── CancelEndEvent.png
│ │ ├── CompensationEndEvent.png
│ │ ├── CompensationStartEvent.png
│ │ ├── ConditionalCatchEvent.png
│ │ ├── ConditionalStartEvent.png
│ │ ├── EndEvent.png
│ │ ├── ErrorCatchEvent.png
│ │ ├── ErrorEndEvent.png
│ │ ├── ErrorStartEvent.png
│ │ ├── EscalationCatchEvent.png
│ │ ├── EscalationEndEvent.png
│ │ ├── EscalationStartEvent.png
│ │ ├── EscalationThrowEvent.png
│ │ ├── IntermediateEvent.png
│ │ ├── LinkCatchEvent.png
│ │ ├── LinkThrowEvent.png
│ │ ├── MessageCatchEvent.png
│ │ ├── MessageEndEvent.png
│ │ ├── MessageStartEvent.png
│ │ ├── MessageThrowEvent.png
│ │ ├── SignalCatchEvent.png
│ │ ├── SignalEndEvent.png
│ │ ├── SignalStartEvent.png
│ │ ├── SignalThrowEvent.png
│ │ ├── StartEvent.png
│ │ ├── TerminateEndEvent.png
│ │ ├── TimerCatchEvent.png
│ │ └── TimerStartEvent.png
│ └── wizard.gif
│ ├── license.html
│ ├── model
│ ├── README.txt
│ ├── bpsim.ecore
│ ├── drools.ecore
│ ├── drools.genmodel
│ └── latest
│ │ ├── bpmn2emfextmodel.genmodel
│ │ ├── bpmn2emfextmodel.xsd
│ │ ├── bpsim.ecore
│ │ ├── bpsim.genmodel
│ │ ├── bpsim.xsd
│ │ ├── drools.ecore
│ │ └── oursimchanges.xml
│ ├── plugin.properties
│ ├── plugin.xml
│ ├── pom.xml
│ └── src
│ └── org
│ └── eclipse
│ └── bpmn2
│ └── modeler
│ └── runtime
│ └── marklogic
│ └── workflow
│ ├── ImageProvider.java
│ ├── MarkLogicCPFRuntimeExtension.java
│ ├── MarkLogicWorkflowRuntimeExtension.java
│ ├── features
│ ├── CPFActionFeatureContainer.java
│ ├── CPFConditionFeatureContainer.java
│ ├── CPFDomainFeatureContainer.java
│ ├── CPFFinalFeatureContainer.java
│ ├── CPFInitialFeatureContainer.java
│ ├── CPFStateFeatureContainer.java
│ ├── CPFStatusFeatureContainer.java
│ └── MLAttachmentNodeReplace.java
│ ├── preferences
│ ├── Messages.java
│ ├── WorkflowPreferencePage.java
│ └── messages.properties
│ └── wizards
│ ├── Messages.java
│ ├── NewCPFProcessWizard.java
│ ├── NewCPFProcessWizardPage1.java
│ ├── NewWorkflowProcessWizard.java
│ ├── NewWorkflowProcessWizardPage1.java
│ └── messages.properties
├── examples
└── minimal-project
│ ├── build.gradle
│ └── gradle.properties
├── gradle-case.properties
├── gradle.properties
├── shtests
├── 01-processmodel-create.sh
├── 02-processmodel-read.sh
├── 03-processmodel-update.sh
├── 04-processmodel-publish.sh
├── 06-payload.xml
├── 06-process-create.sh
├── 07-process-read.sh
├── 08-processinbox-read.sh
├── 09-payload.xml
├── 09-process-update.sh
├── 10-processqueue-read.sh
├── 11-payload.xml
├── 11-process-update-lock.sh
├── 12-payload.xml
├── 12-process-update-lock-fail.sh
├── 13-payload.xml
├── 13-process-update-unlock.sh
├── 13-process-update.sh
├── 14-process-read.sh
├── 14-process-update-lock.sh
├── 15-payload.xml
├── 15-process-update.sh
├── 16-process-read.sh
├── 21-processmodel-create.sh
├── 22-processmodel-publish.sh
├── 23-payload.xml
├── 23-process-create.sh
├── 24-process-read.sh
├── 25-payload.xml
├── 25-processsubscription-create.sh
├── 26-processsubscription-read.sh
├── 27-document-create.sh
├── 27-payload.xml
├── 28-processsearch-read.sh
├── 29-processasset-create.sh
├── 30-processasset-read.sh
├── 31-processasset-delete.sh
├── 32-processmodel-create-fork-simple.sh
├── 33-processmodel-create-fork-conditional.sh
├── 34-processmodel-create-fork-within-fork.sh
├── 35-processmodel-publish-fork-simple.sh
├── 91-processengine-read.sh
├── 92-processengine-delete.sh
├── all.sh
├── webserver-settings.sh
└── x05-processmodel-delete.sh
├── src
├── casemgmt
│ ├── ml-config
│ │ ├── databases
│ │ │ └── content-database.json
│ │ └── security
│ │ │ └── roles
│ │ │ ├── case-administrator.json
│ │ │ ├── case-internal.json
│ │ │ └── case-user.json
│ └── ml-modules
│ │ ├── root
│ │ ├── casemanagement
│ │ │ └── models
│ │ │ │ ├── case-constants.xqy
│ │ │ │ ├── case-lib.xqy
│ │ │ │ ├── controller-helper.xqy
│ │ │ │ └── patch-lib.xqy
│ │ └── test
│ │ │ ├── casemgmt-rest-tests.xqy
│ │ │ └── suites
│ │ │ ├── case-tests
│ │ │ ├── case-lib-tests.xqy
│ │ │ ├── case-lib-update-tests.xqy
│ │ │ ├── controller-helper-tests.xqy
│ │ │ ├── patch-tests.xqy
│ │ │ ├── setup.xqy
│ │ │ ├── teardown.xqy
│ │ │ ├── test-data
│ │ │ │ ├── 1.xml
│ │ │ │ ├── 12345.xml
│ │ │ │ └── activity-payload.xml
│ │ │ └── validate.xqy
│ │ │ ├── e2e-case-management
│ │ │ ├── case-create-rollback.xqy
│ │ │ ├── case-failures.xqy
│ │ │ ├── case-management.xqy
│ │ │ ├── caseactivity-patch.xqy
│ │ │ ├── caseactivity.xqy
│ │ │ ├── setup.xqy
│ │ │ ├── suite-setup.xqy
│ │ │ ├── suite-teardown.xqy
│ │ │ ├── teardown.xqy
│ │ │ └── test-data
│ │ │ │ ├── 22345.xml
│ │ │ │ ├── 32345.xml
│ │ │ │ ├── activity-payload.xml
│ │ │ │ ├── case-post-payload.xml
│ │ │ │ └── case-put-payload.xml
│ │ │ └── workflow-util
│ │ │ └── utilities.xqy
│ │ └── services
│ │ ├── case.xqy
│ │ └── caseactivity.xqy
├── main
│ ├── ml-config
│ │ ├── cpf
│ │ │ ├── cpf-configs
│ │ │ │ └── wf-init-cpf-config.json
│ │ │ ├── domains
│ │ │ │ └── wf-init-domain.json
│ │ │ └── pipelines
│ │ │ │ └── status-change-handling.xml
│ │ ├── databases
│ │ │ ├── content-database.json
│ │ │ ├── modules-database.json
│ │ │ └── triggers-database.json
│ │ ├── mimetypes
│ │ │ └── xml.json
│ │ ├── security
│ │ │ ├── roles
│ │ │ │ ├── 1-workflow-role.json
│ │ │ │ └── 2-workflow-role.json
│ │ │ └── users
│ │ │ │ └── workflow-user.json
│ │ └── servers
│ │ │ ├── workflow-xcc.json
│ │ │ └── workflow.json
│ └── ml-modules
│ │ ├── rest-properties.xml
│ │ ├── root
│ │ ├── Default
│ │ │ └── workflow
│ │ │ │ └── rest-api
│ │ │ │ └── properties.xml
│ │ ├── copyright
│ │ │ ├── add-copyright.xqy
│ │ │ └── add-last-updated.xqy
│ │ ├── lib
│ │ │ ├── http-codes.xqy
│ │ │ ├── http-util.xqy
│ │ │ ├── mime-types.xqy
│ │ │ ├── string-util.xqy
│ │ │ └── workflow-constants.xqy
│ │ └── workflowengine
│ │ │ ├── actions
│ │ │ ├── endEvent.xqy
│ │ │ ├── exclusiveGateway.xqy
│ │ │ ├── fork.xqy
│ │ │ ├── genericComplete.xqy
│ │ │ ├── mlNodeReplace.xqy
│ │ │ ├── recheckState.xqy
│ │ │ ├── restart.xqy
│ │ │ ├── scriptTask.xqy
│ │ │ ├── sendTask.xqy
│ │ │ ├── startEvent.xqy
│ │ │ ├── task.xqy
│ │ │ ├── userTask.xqy
│ │ │ └── workflowInitialSelection.xqy
│ │ │ ├── assets
│ │ │ ├── 021-initiating-attachment
│ │ │ │ ├── 1
│ │ │ │ │ └── 2
│ │ │ │ │ │ └── RejectedEmail.txt
│ │ │ │ ├── ApprovedEmail.txt
│ │ │ │ └── RejectedEmail.txt
│ │ │ └── 022-email-test
│ │ │ │ └── TestEmail.txt
│ │ │ ├── conditions
│ │ │ ├── hasEntered.xqy
│ │ │ ├── hasRendezvoused.xqy
│ │ │ └── isComplete.xqy
│ │ │ └── models
│ │ │ ├── alert-action-process.xqy
│ │ │ ├── lib-alerts.xqy
│ │ │ ├── lib-search-subscribe.xqy
│ │ │ ├── lib-stack.xqy
│ │ │ ├── workflow-actions.xqy
│ │ │ ├── workflow-admin.xqy
│ │ │ ├── workflow-import.xqy
│ │ │ └── workflow-util.xqy
│ │ └── services
│ │ ├── process.xqy
│ │ ├── processasset.xqy
│ │ ├── processengine.xqy
│ │ ├── processinbox.xqy
│ │ ├── processmodel.xqy
│ │ ├── processqueue.xqy
│ │ ├── processroleinbox.xqy
│ │ ├── processsearch.xqy
│ │ ├── processsubscription.xqy
│ │ ├── version.xqy
│ │ └── versionjs.sjs
└── test
│ ├── java
│ └── example
│ │ └── ParameterizedTest.java
│ ├── ml-config
│ ├── databases
│ │ └── workflow-content-test.json
│ ├── security
│ │ └── roles
│ │ │ └── workflow-role-unit-test.json
│ └── servers
│ │ └── workflow-test.json
│ └── ml-modules
│ ├── rest-properties.xml
│ └── root
│ └── test
│ ├── suites
│ ├── e2e-rest-email
│ │ ├── 21-processmodel-create.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── 022-email-test.bpmn
│ │ │ ├── 23-payload.xml
│ │ │ ├── 25-payload.xml
│ │ │ ├── 27-payload.xml
│ │ │ └── RejectedEmail.txt
│ ├── e2e-rest-fork-conditional
│ │ ├── 33-fork-conditional.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── fork-conditional.bpmn2
│ │ │ └── payload.xml
│ ├── e2e-rest-fork-within-fork
│ │ ├── 34-fork-within-fork.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── fork-within-fork.bpmn2
│ │ │ └── payload.xml
│ ├── e2e-rest-fork
│ │ ├── 32-fork-simple.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── fork-simple.bpmn2
│ │ │ └── payload.xml
│ ├── e2e-rest-process-json
│ │ ├── 015-processmodel-json.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── 015-restapi-tests.bpmn
│ │ │ ├── 06-payload.xml
│ │ │ ├── 09-payload.xml
│ │ │ ├── 11-payload.xml
│ │ │ ├── 12-payload.xml
│ │ │ ├── 13-payload.xml
│ │ │ ├── 14-payload.xml
│ │ │ └── 15-payload.xml
│ ├── e2e-rest-process-xml
│ │ ├── 015-processmodel-xml.xqy
│ │ ├── suite-setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── 015-restapi-tests.bpmn
│ │ │ ├── 06-payload.xml
│ │ │ ├── 09-payload.xml
│ │ │ ├── 11-payload.xml
│ │ │ ├── 12-payload.xml
│ │ │ ├── 13-payload.xml
│ │ │ └── 15-payload.xml
│ ├── inclusive-gateway
│ │ ├── 1-route-gateway.xqy
│ │ ├── 2-routes-gateway.xqy
│ │ ├── lib
│ │ │ └── constants.xqy
│ │ ├── setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ │ ├── InclusiveGatewayTest-01.bpmn
│ │ │ └── InclusiveGatewayTest-02.bpmn
│ ├── process-subscription
│ │ ├── 01-delete-test.xqy
│ │ ├── lib
│ │ │ └── constants.xqy
│ │ ├── suite-setup.xqy
│ │ ├── suite-teardown.xqy
│ │ └── test-data
│ │ │ └── InclusiveGatewayTest-02.bpmn
│ ├── process
│ │ ├── 01-delete-test.xqy
│ │ ├── lib
│ │ │ └── constants.xqy
│ │ ├── suite-setup.xqy
│ │ ├── suite-teardown.xqy
│ │ └── test-data
│ │ │ └── InclusiveGatewayTest-02.bpmn
│ └── workflow-util
│ │ ├── fork-subprocess.xqy
│ │ ├── forking.xqy
│ │ ├── setup.xqy
│ │ ├── teardown.xqy
│ │ └── test-data
│ │ ├── pipeline-1.xml
│ │ ├── pipeline-2.xml
│ │ ├── pipeline-3.xml
│ │ ├── process-main-2.xml
│ │ ├── process-main.xml
│ │ ├── process-properties-2.xml
│ │ └── process-properties.xml
│ ├── test-config.xqy
│ ├── workflow-constants.xqy
│ ├── workflow-deploy-rest-resources.xqy
│ ├── workflow-rest-tests.xqy
│ ├── workflow-setup-help.xqy
│ └── workflow-users-test-helper.xqy
└── version.txt
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
15 | [*.mdown]
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | mljsadmin.log
3 | eclipse/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5
4 | .DS_Store
5 | deploy/dev.properties
6 | shtests/*-out.txt
7 | shtests/output.log
8 | .idea/*
9 | ..iml
10 | .gradle
11 | build
12 | gradle-local.properties
13 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MarkLogic Workflow
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.bpmn2.modeler.core.bpmn2Builder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.validation.validationbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.bpmn2.modeler.core.bpmn2Nature
21 |
22 |
23 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.bpmn2.modeler.core.prefs:
--------------------------------------------------------------------------------
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.eclipse.bpmn2.modeler.runtime.marklogic.workflow
22 |
--------------------------------------------------------------------------------
/data/.initial.json:
--------------------------------------------------------------------------------
1 | {
2 | "prefix": "/initial", "collections": ["initialcontent","testdata"], "folder": "initial"
3 | }
4 |
--------------------------------------------------------------------------------
/data/definitions/BPMNTestProcessData.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/data/examples/.load.json:
--------------------------------------------------------------------------------
1 | {
2 | "prefix": "/workflow/models", "collections": ["http://marklogic.com/workflow/models"]
3 | }
4 |
--------------------------------------------------------------------------------
/data/examples/bpmn2/002_data_basic.bpmn:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | SequenceFlow_1
8 |
9 |
10 |
11 | SequenceFlow_1
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/data/examples/bpmn2/052_referenced_document_content.bpmn:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SequenceFlow_1
6 |
7 |
8 |
9 | SequenceFlow_1
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/data/examples/bpmn2/053_referenced_document_properties.bpmn:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SequenceFlow_1
6 |
7 |
8 |
9 | SequenceFlow_1
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/data/examples/cpf/add-cpf-actions.xqy:
--------------------------------------------------------------------------------
1 |
(: the below is superseded by the modules being under /modules/copyright anyway. Use mljsadmin --update=modules to deploy. :)
xquery version "1.0-ml";
xdmp:document-load("C:\copyright\add-copyright.xqy",
/copyright/add-copyright.xqy ),
xdmp:document-load("C:\copyright\add-last-updated.xqy",
/copyright/add-last-updated.xqy )
--------------------------------------------------------------------------------
/data/examples/cpf/pipeline-extended.xml:
--------------------------------------------------------------------------------
1 |
Extended Copyright Pipeline
Pipeline to test CPF
/MarkLogic/cpf/actions/success-action.xqy
/MarkLogic/cpf/actions/failure-action.xqy
When a document containing ‘book’ as a root element is created,
add a ‘copyright’ statement.
http://marklogic.com/states/initial
http://marklogic.com/states/done
http://marklogic.com/states/error
/MarkLogic/cpf/actions/namespace-condition.xqy
book
add-copyright.xqy
When a document containing ‘book’ as a root element is updated, add a ‘copyright’ element. When done, set the state to ‘copyright’.
http://marklogic.com/states/updated http://marklogic.com/states/copyright http://marklogic.com/states/error
/MarkLogic/cpf/actions/namespace-condition.xqy
book
add-copyright.xqy
When the state is set to ‘copyright’, add a ‘last-updated’
element.
http://marklogic.com/states/copyright http://marklogic.com/states/done http://marklogic.com/states/error
/MarkLogic/cpf/actions/namespace-condition.xqy
book
add-last-updated.xqy
--------------------------------------------------------------------------------
/data/examples/cpf/pipeline-simple.xml:
--------------------------------------------------------------------------------
1 |
Copyright Pipeline
Pipeline to test CPF
/MarkLogic/cpf/actions/success-action.xqy
/MarkLogic/cpf/actions/failure-action.xqy
When a document containing ‘book’ as a root element is created,
add a ‘copyright’ statement.
http://marklogic.com/states/initial
http://marklogic.com/states/done
http://marklogic.com/states/error
/MarkLogic/cpf/actions/namespace-condition.xqy
book
add-copyright.xqy
When a document containing ‘book’ as a root element is updated,
add a ‘last-updated’ element
http://marklogic.com/states/updated
http://marklogic.com/states/done
http://marklogic.com/states/error
/MarkLogic/cpf/actions/namespace-condition.xqy
book
add-last-updated.xqy
--------------------------------------------------------------------------------
/data/examples/scxml/add-numbers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/data/examples/scxml/broken.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/data/examples/scxml/two-sample-transitions-invalid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/data/examples/scxml/two-sample-transitions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/data/initial/sampledoc.xml:
--------------------------------------------------------------------------------
1 |
2 | wibble
3 | C
4 |
5 |
--------------------------------------------------------------------------------
/data/restapi.json:
--------------------------------------------------------------------------------
1 | {
2 | "extensions": [
3 | {"name": "version", "methods": ["GET"]},
4 | {"name": "workplace", "methods": ["GET","POST"]},
5 | {"name": "process", "methods": ["GET","POST","PUT"]},
6 | {"name": "processinbox", "methods": ["GET"]},
7 | {"name": "processqueue", "methods": ["GET"]},
8 | {"name": "processmodel", "methods": ["GET","POST","PUT"]},
9 | {"name": "processsubscription", "methods": ["PUT"]},
10 | {"name": "processsearch", "methods": ["PUT"]}
11 | ],
12 | "transforms": [],
13 | "triggers": [
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/documentation/CASE.md:
--------------------------------------------------------------------------------
1 | # MarkLogic Case
2 |
3 | MarkLogic Case management is...
4 |
5 | ## Terminology
6 |
7 | - Case (or Case Folder)
8 | - Case ID
9 | - Case Owner (optional)
10 | - Phase (Latest)
11 | - Activity (Latest)
12 | - Task (Latest) (Out of scope for now - leave to activity level custom fields)
13 | - Attachment
14 | - Status
15 | - Case Audit Trail
16 | - Current Process ID/URI (for primary managing process)
17 |
18 | ## Standalone Case Management
19 |
20 | ## Case Management with MarkLogic Workflow
21 |
--------------------------------------------------------------------------------
/documentation/DEV-STEPPROC.md:
--------------------------------------------------------------------------------
1 | Implementing a custom step processor
2 |
3 | ## A what?
4 |
5 | A Step Processor is a user interface that allows a human to interact with, save, view and complete a human workflow step.
6 |
7 | Examples could include:-
8 |
9 | - Simple HTML form allowing information to be entered, with a complete button on the page
10 | - E-form with fields mapped to process fields, or process attachments (and multiple of these)
11 | - Third party GUI or external case management tool with handoff/reachback in to this step
12 |
13 | ## How?
14 |
15 | Simply use the Workflow REST API. You must perform the following in order:-
16 |
17 | - GET the process data instance AND its properties using it's URI. Do not allow it to be opened if it has a wf:locked-by property
18 | - POST to the process instance referring to it's URI in order to 'lock' this process for your step processor's user
19 | - (optional) POST to the process instance, updating some data, (also optionally releasing the lock), but NOT completing the step - i.e. the user will come back later
20 | - POST to update process data, attachments, and complete the step (thus releasing the lock)
21 |
22 | All pretty straight forward.
23 |
24 | I recommend that you store any settings for providing your step processor for a particular process' step external to
25 | the process model. This keeps your UI separate from your workflow model. E.g. an Eform step processor for a 'file report'
26 | step in a 'incident reporting' process may look for a file in the database that specified which Eform instance and version
27 | to use for this particular step.
28 |
29 | WARNING: When reading a process step be aware of it's exact process name including major and minor version numbers.
30 | Your step processor may be used to open processes that are long lived, so its configuration also needs to be aware of
31 | changing process model versions. E.g. if two process fields are added, the form version in use must also have those fields mapped.
32 | This also allows historical forms to be opened with the correct form definition version.
33 |
--------------------------------------------------------------------------------
/documentation/DEV-TESTING.md:
--------------------------------------------------------------------------------
1 | ## Testing
2 |
3 | When installed via gradle, MarkLogic Workflow will also install the [ML Unit test harness](https://marklogic-community.github.io/marklogic-unit-test/)
4 |
5 | Note that due to the asynchronous nature of the Content Processing Framework, some slower machines may report test failures as steps have taken time to complete. Running tests individually or increasing the `xdmp:sleep` period may resolve failures.
6 |
--------------------------------------------------------------------------------
/documentation/DEVELOPER.md:
--------------------------------------------------------------------------------
1 | Here is the developer documentation
2 |
3 | - [Adding a new Activity type](DEV-NEWACTIVITY.md)
4 | - [Creating a custom step processor](DEV-STEPPROC.md)
5 | - [Integrating your app to MarkLogic Workflow](RESTAPI.md)
6 | - [Running tests](DEV-TESTING.md)
7 |
8 | Any issues contact Ed Outhwaite at ed.outhwaite@marklogic.com
9 |
--------------------------------------------------------------------------------
/documentation/USING.md:
--------------------------------------------------------------------------------
1 | This document acts as a placeholder for anyone wanting to use MarkLogic Workflow. For example by creating a new process,
2 | or setting up a Process Subscription.
3 |
4 | ## Using MarkLogic Workflow
5 |
6 | This section of the documentation is very much a work in progress. See the [REST API document](RESTAPI.md) file for
7 | details right now.
8 |
9 | - [Creating a Process Subscription](USING-SUBSCRIPTIONS.md)
10 | - Starting a process without a content document - see the above link, last paragraph
11 |
--------------------------------------------------------------------------------
/documentation/bpmn2omg/10-06-02.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/documentation/bpmn2omg/10-06-02.pdf
--------------------------------------------------------------------------------
/documentation/bpmn2omg/BPMN2ModelerUserGuide-1.0.1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/documentation/bpmn2omg/BPMN2ModelerUserGuide-1.0.1.pdf
--------------------------------------------------------------------------------
/documentation/bpmn2omg/formal-11-01-03.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/documentation/bpmn2omg/formal-11-01-03.pdf
--------------------------------------------------------------------------------
/documentation/cpf-ootb.md:
--------------------------------------------------------------------------------
1 | This page describes OOTB functionality with CPF
2 |
3 | Actions:-
4 |
5 | link-rename-action.xqy
6 | success-action.xqy
7 | set-property-updated-action.xqy
8 | touch-state-action.xqy
9 | failure-action.xqy
10 | set-updated-action.xqy
11 | validate-action.xqy
12 | link-coherency-action.xqy
13 | state-setting-action.xqy
14 |
15 | TODO also list the sample actions for entity extraction
16 |
17 | Conditions:-
18 |
19 | changed-type-condition.xqy
20 | renamed-links-condition.xqy
21 | existing-state-condition.xqy
22 | mimetype-condition.xqy
23 | namespace-condition.xqy
24 | format-condition.xqy
25 | node-type-condition.xqy
26 | source-mimetype-condition.xqy
27 | relationship-condition.xqy
28 |
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowFeature/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MarkLogicWorkflow
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.FeatureBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.FeatureNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowFeature/build.properties:
--------------------------------------------------------------------------------
1 | bin.includes = feature.xml
2 |
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | MarkLogicWorkflowUpdateSite
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.pde.UpdateSiteBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.pde.UpdateSiteNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/artifacts.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/artifacts.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/content.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/content.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.0.0.201504170009.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.0.0.201504170009.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.0.0.201504170037.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.0.0.201504170037.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.1.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.1.0.0.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.1.1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/features/MarkLogicWorkflow_1.1.1.0.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170009.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170009.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170037.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_0.0.1.201504170037.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.0.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.0.0.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/MarkLogicWorkflowUpdateSite/plugins/org.eclipse.bpmn2.modeler.runtime.marklogic.workflow_1.1.1.0.jar
--------------------------------------------------------------------------------
/eclipse/MarkLogicWorkflowUpdateSite/site.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MarkLogic Workflow Eclipse BPMN2 Modeler extension plug in. See http://github.com/adamfowleruk/marklogicworkflow for details.
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.eclipse.bpmn2.modeler.runtime.marklogic.workflow
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.pde.ManifestBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.pde.SchemaBuilder
20 |
21 |
22 |
23 |
24 |
25 | org.eclipse.pde.PluginNature
26 | org.eclipse.jdt.core.javanature
27 |
28 |
29 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Bundle-ManifestVersion: 2
3 | Bundle-Name: %pluginName
4 | Bundle-SymbolicName: org.eclipse.bpmn2.modeler.runtime.marklogic.workflow;singleton:=true
5 | Bundle-Version: 1.1.1.0
6 | Bundle-Vendor: %providerName
7 | Bundle-Localization: plugin
8 | Require-Bundle: org.eclipse.ui.ide,
9 | org.eclipse.bpmn2.modeler.core,
10 | org.eclipse.emf.transaction,
11 | org.eclipse.ui.views.properties.tabbed,
12 | org.eclipse.gef,
13 | org.eclipse.bpmn2.edit,
14 | org.eclipse.bpmn2.editor,
15 | org.eclipse.jface.databinding,
16 | org.eclipse.emf.databinding,
17 | org.eclipse.emf.edit.ui,
18 | org.apache.xerces,
19 | org.eclipse.bpmn2.modeler.ui,
20 | org.eclipse.core.resources,
21 | org.eclipse.ui,
22 | org.eclipse.core.runtime,
23 | org.eclipse.jdt.core,
24 | org.eclipse.graphiti;bundle-version="0.11.2",
25 | org.eclipse.graphiti.ui;bundle-version="0.11.2"
26 | Bundle-RequiredExecutionEnvironment: JavaSE-1.6
27 | Bundle-ActivationPolicy: lazy
28 | Export-Package: org.eclipse.bpmn2.modeler.runtime.marklogic.workflow,
29 | org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.features,
30 | org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.preferences,
31 | org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.wizards
32 | Import-Package: org.eclipse.bpmn2.modeler.help,
33 | org.eclipse.bpmn2.modeler.ui,
34 | org.eclipse.bpmn2.modeler.ui.editor,
35 | org.eclipse.bpmn2.modeler.ui.features.activity.task,
36 | org.eclipse.bpmn2.modeler.ui.property,
37 | org.eclipse.bpmn2.modeler.ui.property.providers
38 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | About
5 |
6 |
7 | About This Content
8 |
9 | June 5, 2006
10 | License
11 |
12 | The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
13 | indicated below, the Content is provided to you under the terms and conditions of the
14 | Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
15 | at http://www.eclipse.org/legal/epl-v10.html.
16 | For purposes of the EPL, "Program" will mean the Content.
17 |
18 | If you did not receive this Content directly from the Eclipse Foundation, the Content is
19 | being redistributed by another party ("Redistributor") and different terms and conditions may
20 | apply to your use of any object code in the Content. Check the Redistributor's license that was
21 | provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
22 | indicated below, the terms and conditions of the EPL still apply to any source code in the Content
23 | and such source code may be obtained at http://www.eclipse.org.
24 |
25 |
26 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/.gitignore:
--------------------------------------------------------------------------------
1 | /org/
2 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/ImageProvider.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/ImageProvider.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/MarkLogicCPFRuntimeExtension.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/MarkLogicCPFRuntimeExtension.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/MarkLogicWorkflowRuntimeExtension.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/MarkLogicWorkflowRuntimeExtension.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFActionFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFActionFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFConditionFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFConditionFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFDomainFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFDomainFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFFinalFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFFinalFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFInitialFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFInitialFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFStateFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFStateFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFStatusFeatureContainer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/CPFStatusFeatureContainer.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/MLAttachmentNodeReplace.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/MLAttachmentNodeReplace.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/Messages.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/Messages.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/WorkflowPreferencePage.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/WorkflowPreferencePage.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/messages.properties:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Copyright (c) 2012 MarkLogic, Inc.
3 | # All rights reserved.
4 | # This program is made available under the terms of the
5 | # Eclipse Public License v1.0 which accompanies this distribution,
6 | # and is available at http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # MarkLogic, Inc. - initial API and implementation
10 | #-------------------------------------------------------------------------------
11 | JbpmPreferencePage_Workflow_Settings=MarkLogic Workflow Runtime-specific Settings
12 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/Messages.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/Messages.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard$1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard$2.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizard.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$2.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$3.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$4.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$5.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$6.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$6.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$7.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1$7.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewCPFProcessWizardPage1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard$1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard$2.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizard.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$2.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$3.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$3.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$4.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$4.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$5.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1$5.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/bin/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/wizards/NewWorkflowProcessWizardPage1.class
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/build.properties:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Copyright (c) 2012 MarkLogic, Inc.
3 | # All rights reserved.
4 | # This program is made available under the terms of the
5 | # Eclipse Public License v1.0 which accompanies this distribution,
6 | # and is available at http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # MarkLogic, Inc. - initial API and implementation
10 | ###############################################################################
11 | source.. = src/
12 | output.. = bin/
13 | bin.includes = META-INF/,\
14 | .,\
15 | plugin.xml,\
16 | model/,\
17 | icons/,\
18 | about.html,\
19 | plugin.properties
20 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CancelEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CancelEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CompensationEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CompensationEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CompensationStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/CompensationStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ConditionalCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ConditionalCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ConditionalStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ConditionalStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/ErrorStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationThrowEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/EscalationThrowEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/IntermediateEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/IntermediateEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/LinkCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/LinkCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/LinkThrowEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/LinkThrowEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageThrowEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/MessageThrowEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalThrowEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/SignalThrowEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/StartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/StartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TerminateEndEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TerminateEndEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TimerCatchEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TimerCatchEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TimerStartEvent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/small/TimerStartEvent.png
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/wizard.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/icons/wizard.gif
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/model/README.txt:
--------------------------------------------------------------------------------
1 | drools.ecore and bpsim.ecore were originally copied from here:
2 |
3 | https://github.com/droolsjbpm/jbpm/tree/master/jbpm-bpmn2-emfextmodel/src/main/resources/model
4 |
5 | The following changes are required for the BPMN2 Modeler:
6 | 1. DocumentRoot subclasses the DocumentRoot in bpmn2 model, so need to remove
7 | mixed, xMLNSPrefixMap and xSISchemaLocation
8 | 2. The name of the "import" container in DocumentRoot had to be changed to "importType" because bpmn2.DocumentRoot
9 | already defines an "import" container.
10 | 3. Added BPSimDataType to drools DocumentRoot. This is used to enable/disable the simulation property tab
11 | from Project Preferences->Tool Enablement
12 | 4. GlobalType needs to subclass ItemAwareElement so that it can be used in the same context as BPMN2 Property elements.
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/pom.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 | 4.0.0
13 |
14 |
15 | org.eclipse.bpmn2.modeler.plugins
16 | org.eclipse.bpmn2.modeler.plugins.parent
17 | 1.2.0-SNAPSHOT
18 | ../pom.xml
19 |
20 |
21 | org.eclipse.bpmn2.modeler.plugins
22 | org.eclipse.bpmn2.modeler.runtime.marklogic.workflow
23 | 1.2.1-SNAPSHOT
24 | eclipse-plugin
25 | BPMN2 Modeler Plugins: MarkLogic Workflow Runtime
26 | BPMN2 Modeler Runtime Specialization for MarkLogic Workflow
27 |
28 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/src/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/ImageProvider.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2012 MarkLogic, Inc.
3 | * All rights reserved.
4 | * This program is made available under the terms of the
5 | * Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * MarkLogic, Inc. - initial API and implementation
10 | *******************************************************************************/
11 | package org.eclipse.bpmn2.modeler.runtime.marklogic.workflow;
12 |
13 | import org.eclipse.graphiti.ui.platform.AbstractImageProvider;
14 |
15 | public class ImageProvider extends AbstractImageProvider {
16 |
17 | @Override
18 | protected void addAvailableImages() {
19 | // does nothing - we do it at load time
20 | }
21 |
22 | /* This method publishes needed protected method 'addImageFilePath' */
23 | public void addImageFilePathLazy(String imageId, String imageFilePath){
24 | /** Check if its not already registered **/
25 | if(getImageFilePath( imageId ) == null){
26 | addImageFilePath( imageId, imageFilePath );
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/src/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/features/MLAttachmentNodeReplace.java:
--------------------------------------------------------------------------------
1 | package org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.features;
2 |
3 | import org.eclipse.bpmn2.modeler.core.features.CustomShapeFeatureContainer;
4 | import org.eclipse.bpmn2.modeler.core.features.ShowPropertiesFeature;
5 | import org.eclipse.bpmn2.modeler.core.model.ModelDecorator;
6 | import org.eclipse.emf.ecore.EObject;
7 | import org.eclipse.emf.ecore.EStructuralFeature;
8 | import org.eclipse.graphiti.features.IFeatureProvider;
9 | import org.eclipse.graphiti.features.custom.ICustomFeature;
10 |
11 |
12 | public class MLAttachmentNodeReplace extends CustomShapeFeatureContainer {
13 |
14 |
15 | // these values must match what's in the plugin.xml
16 | private final static String TYPE_VALUE = "MLAttachmentNodeReplace";
17 | private final static String CUSTOM_TASK_ID = "MLAttachmentNodeReplace.customTask";
18 |
19 | public MLAttachmentNodeReplace() {
20 | }
21 |
22 | @Override
23 | public String getId(EObject object) {
24 | // This is where we inspect the object to determine what its custom task ID should be.
25 | // In this case, the "type" attribute will have a value of "MyTask".
26 | // If found, return the CUSTOM_TASK_ID string.
27 | //
28 | // Note that the object inspection can be arbitrarily complex and may include several
29 | // object features. This simple case just demonstrates what needs to happen here.
30 | EStructuralFeature f = ModelDecorator.getAnyAttribute(object, "type");
31 | if (null != f) {
32 | Object id = object.eGet(f);
33 | if (TYPE_VALUE.equals(id)) {
34 | return CUSTOM_TASK_ID;
35 | }
36 | }
37 |
38 | return null;
39 | }
40 |
41 |
42 | @Override
43 | public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) {
44 | return new ICustomFeature[] {
45 | new ShowPropertiesFeature(fp)
46 | };
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/src/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/Messages.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2012 MarkLogic, Inc.
3 | * All rights reserved.
4 | * This program is made available under the terms of the
5 | * Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * MarkLogic, Inc. - initial API and implementation
10 | ******************************************************************************/
11 | package org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.preferences;
12 |
13 | import org.eclipse.osgi.util.NLS;
14 |
15 | public class Messages extends NLS {
16 | private static final String BUNDLE_NAME = "org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.preferences.messages"; //$NON-NLS-1$
17 | public static String WorkflowPreferencePage_Workflow_Settings;
18 | static {
19 | // initialize resource bundle
20 | NLS.initializeMessages(BUNDLE_NAME, Messages.class);
21 | }
22 |
23 | private Messages() {
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/src/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/WorkflowPreferencePage.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (c) 2012 MarkLogic, Inc.
3 | * All rights reserved.
4 | * This program is made available under the terms of the
5 | * Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | *
8 | * Contributors:
9 | * MarkLogic, Inc. - initial API and implementation
10 | ******************************************************************************/
11 | package org.eclipse.bpmn2.modeler.runtime.marklogic.workflow.preferences;
12 |
13 | import org.eclipse.bpmn2.modeler.core.Activator;
14 | import org.eclipse.bpmn2.modeler.core.preferences.Bpmn2Preferences;
15 | import org.eclipse.jface.preference.BooleanFieldEditor;
16 | import org.eclipse.jface.preference.FieldEditorPreferencePage;
17 | import org.eclipse.ui.IWorkbench;
18 | import org.eclipse.ui.IWorkbenchPreferencePage;
19 |
20 | public class WorkflowPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
21 |
22 | public WorkflowPreferencePage() {
23 | super(GRID);
24 | Bpmn2Preferences.getInstance();
25 | setPreferenceStore(Activator.getDefault().getPreferenceStore());
26 | setDescription(Messages.WorkflowPreferencePage_Workflow_Settings);
27 | }
28 |
29 | @Override
30 | public void init(IWorkbench workbench) {
31 | }
32 |
33 | @Override
34 | protected void createFieldEditors() {
35 |
36 | BooleanFieldEditor doCoreValidation = new BooleanFieldEditor(
37 | Bpmn2Preferences.PREF_DO_CORE_VALIDATION,
38 | Bpmn2Preferences.PREF_DO_CORE_VALIDATION_LABEL,
39 | getFieldEditorParent());
40 | addField(doCoreValidation);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/eclipse/org.eclipse.bpmn2.modeler.runtime.marklogic/src/org/eclipse/bpmn2/modeler/runtime/marklogic/workflow/preferences/messages.properties:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------------------------------------
2 | # Copyright (c) 2012 MarkLogic, Inc.
3 | # All rights reserved.
4 | # This program is made available under the terms of the
5 | # Eclipse Public License v1.0 which accompanies this distribution,
6 | # and is available at http://www.eclipse.org/legal/epl-v10.html
7 | #
8 | # Contributors:
9 | # MarkLogic, Inc. - initial API and implementation
10 | #-------------------------------------------------------------------------------
11 | JbpmPreferencePage_Workflow_Settings=MarkLogic Workflow Runtime-specific Settings
12 |
--------------------------------------------------------------------------------
/examples/minimal-project/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "net.saliman.properties" version "1.4.6"
3 | id "com.marklogic.ml-gradle" version "3.9.0"
4 | }
5 |
6 | apply plugin: "java"
7 | apply plugin: "com.marklogic.ml-gradle"
8 |
9 | repositories {
10 | jcenter()
11 | maven {
12 | url "https://dl.bintray.com/marklogic-community/Maven"
13 | credentials {
14 | username bintray_user
15 | password bintray_key
16 | }
17 | }
18 | }
19 |
20 | dependencies {
21 | mlRestApi "marklogic-community:marklogic-bpmn2-workflow:0.0.1"
22 | }
23 |
24 | task initConfig(type: Copy) {
25 | from 'build/mlRestApi/marklogic-bpmn2-workflow/ml-config'
26 | into 'src/main/ml-config'
27 |
28 | includeEmptyDirs = false
29 | }
30 |
31 | initConfig.dependsOn mlPrepareRestApiDependencies
32 |
--------------------------------------------------------------------------------
/examples/minimal-project/gradle.properties:
--------------------------------------------------------------------------------
1 | mlAppName=workflow
2 | mlHost=localhost
3 | mlUsername=admin
4 | mlPassword=admin
5 | mlRestAdminPassword=admin
6 | mlRestPort=8040
7 | mlRestAuthentication=digest
8 | mlContentDatabaseName=workflow-content
9 | mlContentForestsPerHost=1
10 | mlModulesDatabaseName=workflow-modules
11 | mlTriggersDatabaseName=workflow-triggers
12 | mlGroupName=Default
13 |
14 | mlReplaceTokensInModules=true
15 |
16 | # Added automatically by ml-gradle under the assumption that a Roxy application defines all of the app servers that it needs
17 | # and thus doesn't need ml-gradle to automatically create a REST API server for it.
18 | mlNoRestServer=true
19 |
20 | # Test modules could be kept under src/main/ml-modules, but it's recommend to keep them in a separate directory so that
21 | # the directory can be easily excluded by overriding this property
22 | mlConfigPaths=src/main/ml-config
23 | mlModulePaths=src/main/ml-modules
24 |
25 | bintray_user=
26 | bintray_key=
27 |
--------------------------------------------------------------------------------
/gradle-case.properties:
--------------------------------------------------------------------------------
1 | # copied from ml-unit-test
2 | mlGradleVersion=3.9.0
3 | mlUnitTestVersion=0.12.0
4 |
5 | # Roxy properties that were mapped to ml-gradle properties
6 | mlAppName=workflow
7 | mlHost=localhost
8 | mlUsername=admin
9 | mlPassword=admin
10 | mlRestAdminPassword=admin
11 | mlRestPort=8040
12 | mlRestAuthentication=digest
13 | mlContentDatabaseName=workflow-content
14 | mlContentForestsPerHost=1
15 | mlModulesDatabaseName=workflow-modules
16 | mlTriggersDatabaseName=workflow-triggers
17 | mlTestRestPort=8042
18 | mlGroupName=Default
19 |
20 | mlReplaceTokensInModules=true
21 |
22 | # Added automatically by ml-gradle under the assumption that a Roxy application defines all of the app servers that it needs
23 | # and thus doesn't need ml-gradle to automatically create a REST API server for it.
24 | mlNoRestServer=true
25 |
26 | # Test modules could be kept under src/main/ml-modules, but it's recommend to keep them in a separate directory so that
27 | # the directory can be easily excluded by overriding this property
28 | mlConfigPaths=src/main/ml-config,src/casemgmt/ml-config,src/test/ml-config
29 | mlModulePaths=src/main/ml-modules,src/casemgmt/ml-modules,src/test/ml-modules
30 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # copied from ml-unit-test
2 | mlGradleVersion=3.16.0
3 | mlUnitTestVersion=1.0.beta
4 |
5 | # Roxy properties that were mapped to ml-gradle properties
6 | mlAppName=workflow
7 | mlHost=localhost
8 | mlUsername=admin
9 | mlPassword=admin
10 | mlRestAdminPassword=admin
11 | mlRestPort=8040
12 | mlRestAuthentication=digest
13 | mlContentDatabaseName=workflow-content
14 | mlContentForestsPerHost=1
15 | mlModulesDatabaseName=workflow-modules
16 | mlTriggersDatabaseName=workflow-triggers
17 | mlTestRestPort=8042
18 | mlGroupName=Default
19 |
20 | mlReplaceTokensInModules=true
21 |
22 | # Added automatically by ml-gradle under the assumption that a Roxy application defines all of the app servers that it needs
23 | # and thus doesn't need ml-gradle to automatically create a REST API server for it.
24 | mlNoRestServer=true
25 |
26 | # Test modules could be kept under src/main/ml-modules, but it's recommend to keep them in a separate directory so that
27 | # the directory can be easily excluded by overriding this property
28 | mlConfigPaths=src/main/ml-config,src/test/ml-config
29 | mlModulePaths=src/main/ml-modules,src/test/ml-modules
30 |
31 | group=marklogic-community
32 | version=0.0.1
33 |
34 | # Override these in your gradle-local.properties file if you want to publish a
35 | # version of marklogic-bpmn2-workflow.
36 | bintray_user=
37 | bintray_key=
38 |
--------------------------------------------------------------------------------
/shtests/01-processmodel-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 01-processmodel-create.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"../data/examples/bpmn2/015-restapi-tests.bpmn" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=015-restapi-tests.bpmn&rs:enable=true" > 01-processmodel-create-out.txt
11 |
12 | echo "01-processmodel-create.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/02-processmodel-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 02-processmodel-read.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
8 | -H "Content-type: application/xml" -H "Accept: application/xml" \
9 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:publishedId=015-restapi-tests__1__0" > 02-processmodel-read-out.txt
10 |
11 | echo "02-processmodel-read.sh complete"
12 |
--------------------------------------------------------------------------------
/shtests/03-processmodel-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 03-processmodel-update.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"../data/examples/bpmn2/015-restapi-tests.bpmn" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=015-restapi-tests.bpmn&rs:major=1&rs:minor=2" > 03-processmodel-update-out.txt
11 |
12 | echo "03-processmodel-update.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/04-processmodel-publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 04-processmodel-publish.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
8 | -d "" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:publishedId=015-restapi-tests__1__2" > 04-processmodel-publish-out.txt
11 |
12 | echo "04-processmodel-publish.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/06-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 015-restapi-tests__1__2
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/shtests/06-process-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 06-process-create.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"./06-payload.xml" \
9 | -H "Content-type: application/xml" -H "Accept: text/plain" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/process" > 06-process-create-out.txt
11 |
12 | echo "06-process-create.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/07-process-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 07-process-read.sh"
6 |
7 | # TODO parse this using awk or similar from the -out document of the previous call
8 | #STEXT = `cat 06-process-create-out.txt`
9 |
10 | #infile='06-process-create-out.txt'
11 |
12 | #while read line ; do
13 | # if [[ $line =~ ^(.*)([a-z0-9\-])(.*)$ ]] ; then
14 | # echo "${BASH_REMATCH[0]},${BASH_REMATCH[1]}"
15 | # else
16 | # echo "$line"
17 | # fi
18 | #done < "$infile"
19 |
20 | #THEPID= `[[ $STEXT =~ ^.*processId\>(.*)\<\/ext.* ]] && echo ${BASH_REMATCH[1]}`
21 | #PID="ad8f7cbf-48e6-4256-bb23-2b4737d07919-2015-03-09T09:15:02.295983-07:00"
22 | PID=`cat 06-process-create-out.txt`
23 | #echo " THEPID: $THEPID PID: $PID"
24 |
25 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
26 | -H "Accept: application/xml" \
27 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID" > 07-process-read-out.txt
28 |
29 | echo "07-process-read.sh complete"
30 |
--------------------------------------------------------------------------------
/shtests/08-processinbox-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 08-processinbox-read.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
8 | -H "Accept: application/xml" \
9 | "http://$RESTHOST:$RESTPORT/v1/resources/processinbox" > 08-processinbox-read-out.txt
10 |
11 | echo "08-processinbox-read.sh complete"
12 |
--------------------------------------------------------------------------------
/shtests/09-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shtests/09-process-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 09-process-update.sh"
6 |
7 | PID=`cat 06-process-create-out.txt`
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
10 | -d@"./09-payload.xml" \
11 | -H "Content-type: application/xml" -H "Accept: application/xml" \
12 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:complete=true" > 09-process-update-out.txt
13 |
14 | echo "09-process-update.sh complete"
15 |
--------------------------------------------------------------------------------
/shtests/10-processqueue-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 10-processqueue-read.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
8 | -H "Accept: application/xml" \
9 | "http://$RESTHOST:$RESTPORT/v1/resources/processqueue?rs:queue=Editors" > 10-processqueue-read-out.txt
10 |
11 | echo "10-processqueue-read.sh complete"
12 |
--------------------------------------------------------------------------------
/shtests/11-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shtests/11-process-update-lock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | sleep 5
6 |
7 | echo "starting 11-process-update-lock.sh"
8 |
9 | PID=`cat 06-process-create-out.txt`
10 |
11 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
12 | -d@"./11-payload.xml" \
13 | -H "Content-type: application/xml" -H "Accept: application/xml" \
14 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:lock=true" > 11-process-update-lock-out.txt
15 |
16 | echo "11-process-update-lock.sh complete"
17 |
--------------------------------------------------------------------------------
/shtests/12-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/shtests/12-process-update-lock-fail.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | sleep 5
6 |
7 | echo "starting 12-process-update-lock-fail.sh"
8 |
9 | PID=`cat 06-process-create-out.txt`
10 |
11 | curl -v --anyauth --user workflow-manager:workflow-manager -X POST \
12 | -d@"./12-payload.xml" \
13 | -H "Content-type: application/xml" -H "Accept: application/xml" \
14 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:lock=true" > 12-process-update-lock-fail-out.txt
15 |
16 | echo "12-process-update-lock-fail.sh complete"
17 |
--------------------------------------------------------------------------------
/shtests/13-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data created on request to unlock
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/shtests/13-process-update-unlock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | sleep 5
6 |
7 | echo "starting 13-process-update-unlock.sh"
8 |
9 | PID=`cat 06-process-create-out.txt`
10 |
11 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
12 | -d@"./13-payload.xml" \
13 | -H "Content-type: application/xml" -H "Accept: application/xml" \
14 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:unlock=true" > 13-process-update-unlock-out.txt
15 |
16 | echo "13-process-update-unlock.sh complete"
17 |
--------------------------------------------------------------------------------
/shtests/13-process-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 13-process-update.sh"
6 |
7 | PID=`cat 06-process-create-out.txt`
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
10 | -d@"./11-payload.xml" \
11 | -H "Content-type: application/xml" -H "Accept: application/xml" \
12 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:complete=true" > 13-process-update-out.txt
13 |
14 | echo "13-process-update.sh complete"
15 |
--------------------------------------------------------------------------------
/shtests/14-process-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # pause to ensure process is complete (so we can read audit data)
4 |
5 | sleep 10
6 |
7 | . ../config/webserver-settings.sh
8 |
9 | echo "starting 14-process-read.sh"
10 |
11 | PID=`cat 06-process-create-out.txt`
12 |
13 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
14 | -H "Accept: application/xml" \
15 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID" > 14-process-read-out.txt
16 |
17 | echo "14-process-read.sh complete"
18 |
--------------------------------------------------------------------------------
/shtests/14-process-update-lock.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | sleep 5
6 |
7 | echo "starting 14-process-update-lock.sh"
8 |
9 | PID=`cat 06-process-create-out.txt`
10 |
11 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
12 | -d@"./14-payload.xml" \
13 | -H "Content-type: application/xml" -H "Accept: application/xml" \
14 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:lock=true" > 14-process-update-lock-out.txt
15 |
16 | echo "14-process-update-lock.sh complete"
17 |
--------------------------------------------------------------------------------
/shtests/15-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data added by complete action
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/shtests/15-process-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | sleep 5
6 |
7 | echo "starting 15-process-update.sh"
8 |
9 | PID=`cat 06-process-create-out.txt`
10 |
11 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
12 | -d@"./15-payload.xml" \
13 | -H "Content-type: application/xml" -H "Accept: application/xml" \
14 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID&rs:complete=true" > 15-process-update-out.txt
15 |
16 | echo "15-process-update.sh complete"
17 |
--------------------------------------------------------------------------------
/shtests/16-process-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # pause to ensure process is complete (so we can read audit data)
4 |
5 | sleep 10
6 |
7 | . ../config/webserver-settings.sh
8 |
9 | echo "starting 16-process-read.sh"
10 |
11 | PID=`cat 06-process-create-out.txt`
12 |
13 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
14 | -H "Accept: application/xml" \
15 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID" > 16-process-read-out.txt
16 |
17 | echo "16-process-read.sh complete"
18 |
--------------------------------------------------------------------------------
/shtests/21-processmodel-create.sh:
--------------------------------------------------------------------------------
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&rs:enable=true" > 21-processmodel-create-out.txt
11 |
12 | echo "21-processmodel-create.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/22-processmodel-publish.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 22-processmodel-publish.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
8 | -d "" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:publishedId=022-email-test__1__0" > 22-processmodel-publish-out.txt
11 |
12 | echo "22-processmodel-publish.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/23-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 022-email-test__1__0
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/shtests/23-process-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 23-process-create.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"./23-payload.xml" \
9 | -H "Content-type: application/xml" -H "Accept: text/plain" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/process" > 23-process-create-out.txt
11 |
12 | echo "23-process-create.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/24-process-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 24-process-read.sh"
6 |
7 | # TODO parse this using awk or similar from the -out document of the previous call
8 | #STEXT = `cat 06-process-create-out.txt`
9 |
10 | #infile='06-process-create-out.txt'
11 |
12 | #while read line ; do
13 | # if [[ $line =~ ^(.*)([a-z0-9\-])(.*)$ ]] ; then
14 | # echo "${BASH_REMATCH[0]},${BASH_REMATCH[1]}"
15 | # else
16 | # echo "$line"
17 | # fi
18 | #done < "$infile"
19 |
20 | #THEPID= `[[ $STEXT =~ ^.*processId\>(.*)\<\/ext.* ]] && echo ${BASH_REMATCH[1]}`
21 | #PID="ad8f7cbf-48e6-4256-bb23-2b4737d07919-2015-03-09T09:15:02.295983-07:00"
22 | PID=`cat 23-process-create-out.txt`
23 | #echo " THEPID: $THEPID PID: $PID"
24 |
25 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
26 | -H "Accept: application/xml" \
27 | "http://$RESTHOST:$RESTPORT/v1/resources/process?rs:processid=$PID" > 24-process-read-out.txt
28 |
29 | echo "24-process-read.sh complete"
30 |
--------------------------------------------------------------------------------
/shtests/25-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 022-email-test__1__0
3 | email-sub-test
4 |
5 | Some folder alerting domain
6 | directory
7 | /some/
8 | 0
9 |
10 |
11 | /test/email/sub
12 |
13 |
14 |
--------------------------------------------------------------------------------
/shtests/25-processsubscription-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Create a process subscription (alert configuration)
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 25-processsubscription-create.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
10 | -d@"./25-payload.xml" \
11 | -H "Content-type: application/xml" -H "Accept: application/xml" \
12 | "http://$RESTHOST:$RESTPORT/v1/resources/processsubscription" > 25-processsubscription-create-out.txt
13 |
14 | echo "25-processsubscription-create.sh complete"
15 |
--------------------------------------------------------------------------------
/shtests/26-processsubscription-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Fetch the saved and activated process subscription (alert) configuration
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 26-processsubscription-read.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
10 | -H "Accept: application/xml" \
11 | "http://$RESTHOST:$RESTPORT/v1/resources/processsubscription?rs:name=email-sub-test" > 26-processsubscription-read-out.txt
12 |
13 | echo "26-processsubscription-read.sh complete"
14 |
--------------------------------------------------------------------------------
/shtests/27-document-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Create a document that should fire an alert
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 27-document-create.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
10 | -d@"./27-payload.xml" \
11 | -H "Content-type: application/xml" -H "Accept: application/xml" \
12 | "http://$RESTHOST:$RESTPORT/v1/documents?uri=/some/doc.xml&collection=/test/email/sub" > 27-document-create-out.txt
13 |
14 | echo "27-document-create.sh complete"
15 |
--------------------------------------------------------------------------------
/shtests/27-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | B
3 | C
4 |
5 |
--------------------------------------------------------------------------------
/shtests/28-processsearch-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Fetch the current list of process documents (see if the count is correct - 2 at this point for this process type)
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 28-processsearch-read.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
10 | -H "Accept: application/xml" \
11 | "http://$RESTHOST:$RESTPORT/v1/resources/processsearch?rs:processname=022-email-test__1__0" > 28-processsearch-read-out.txt
12 |
13 | echo "28-processsearch-read.sh complete"
14 |
--------------------------------------------------------------------------------
/shtests/29-processasset-create.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Create a process asset
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 29-processasset-create.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
10 | -d@"./modules/workflowengine/assets/021-initiating-attachment/1/2/RejectedEmail.txt" \
11 | -H "Content-type: text/plain" -H "Accept: application/xml" \
12 | "http://$RESTHOST:$RESTPORT/v1/resources/processasset?rs:model=021-initiating-attachment&rs:major=1&rs:minor=3&rs:asset=RejectedEmail.txt" > 29-processasset-create-out.txt
13 |
14 | echo "29-processasset-create.sh complete"
15 |
--------------------------------------------------------------------------------
/shtests/30-processasset-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 30-processasset-read.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
8 | -H "Accept: application/xml;*" \
9 | "http://$RESTHOST:$RESTPORT/v1/resources/processasset?rs:model=021-initiating-attachment&rs:major=1&rs:minor=3&rs:asset=RejectedEmail.txt" > 30-processasset-read-out.txt
10 |
11 | echo "30-processasset-read.sh complete"
12 |
--------------------------------------------------------------------------------
/shtests/31-processasset-delete.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 31-processasset-delete.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X DELETE \
8 | -H "Accept: application/xml;*" \
9 | "http://$RESTHOST:$RESTPORT/v1/resources/processasset?rs:model=021-initiating-attachment&rs:major=1&rs:minor=3&rs:asset=RejectedEmail.txt" > 31-processasset-delete-out.txt
10 |
11 | echo "31-processasset-delete.sh complete"
12 |
--------------------------------------------------------------------------------
/shtests/32-processmodel-create-fork-simple.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 32-processmodel-create-fork-simple.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"../data/examples/bpmn2/fork-simple.bpmn2" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=fork-simple.bpmn2&rs:enable=true" > 32-processmodel-create-fork-simple-out.txt
11 |
12 | echo "32-processmodel-create-fork-simple.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/33-processmodel-create-fork-conditional.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 33-processmodel-create-fork-conditional.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"../data/examples/bpmn2/fork-conditional.bpmn2" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=fork-conditional.bpmn2&rs:enable=true" > 33-processmodel-create-fork-conditional-out.txt
11 |
12 | echo "33-processmodel-create-fork-conditional.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/34-processmodel-create-fork-within-fork.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 34-processmodel-create-fork-within-fork.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X PUT \
8 | -d@"../data/examples/bpmn2/fork-within-fork.bpmn2" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:name=fork-within-fork.bpmn2&rs:enable=true" > 34-processmodel-create-fork-within-fork-out.txt
11 |
12 | echo "34-processmodel-create-fork-within-fork.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/35-processmodel-publish-fork-simple.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ../config/webserver-settings.sh
4 |
5 | echo "starting 35-processmodel-publish-fork-simple.sh"
6 |
7 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X POST \
8 | -d "" \
9 | -H "Content-type: application/xml" -H "Accept: application/xml" \
10 | "http://$RESTHOST:$RESTPORT/v1/resources/processmodel?rs:publishedId=fork-simple__1__0" > 35-processmodel-publish-fork-simple-out.txt
11 |
12 | echo "35-processmodel-publish-fork-simple.sh complete"
13 |
--------------------------------------------------------------------------------
/shtests/91-processengine-read.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Fetch the current list of running processes only (not dead or errored ones)
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 91-processengine-read.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X GET \
10 | -H "Accept: application/xml" \
11 | "http://$RESTHOST:$RESTPORT/v1/resources/processengine" > 91-processengine-read-out.txt
12 |
13 | echo "91-processengine-read.sh complete"
14 |
--------------------------------------------------------------------------------
/shtests/92-processengine-delete.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Fetch the current list of running processes only (not dead or errored ones)
4 |
5 | . ../config/webserver-settings.sh
6 |
7 | echo "starting 92-processengine-delete.sh"
8 |
9 | curl -v --anyauth --user $MLADMINUSER:$MLADMINPASS -X DELETE \
10 | -H "Accept: application/xml" \
11 | "http://$RESTHOST:$RESTPORT/v1/resources/processengine" > 92-processengine-delete-out.txt
12 |
13 | echo "92-processengine-delete.sh complete"
14 |
--------------------------------------------------------------------------------
/shtests/all.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Testing the MarkLogic Workflow REST API..."
4 |
5 | . ./01-processmodel-create.sh
6 | . ./02-processmodel-read.sh
7 | . ./03-processmodel-update.sh
8 | . ./04-processmodel-publish.sh
9 |
10 | . ./06-process-create.sh
11 | . ./07-process-read.sh
12 |
13 | . ./08-processinbox-read.sh
14 |
15 | sleep 15
16 |
17 | . ./09-process-update.sh
18 | . ./10-processqueue-read.sh
19 |
20 | sleep 15
21 |
22 | . ./11-process-update-lock.sh
23 | . ./12-process-update-lock-fail.sh
24 | . ./13-process-update-unlock.sh
25 | . ./14-process-update-lock.sh
26 | . ./15-process-update.sh
27 | . ./16-process-read.sh
28 |
29 | sleep 15
30 |
31 | . ./13-process-update.sh
32 | . ./14-process-read.sh
33 |
34 | sleep 5
35 |
36 | . ./21-processmodel-create.sh
37 | . ./22-processmodel-publish.sh
38 | . ./23-process-create.sh
39 | . ./24-process-read.sh
40 | . ./25-processsubscription-create.sh
41 | . ./26-processsubscription-read.sh
42 | . ./27-document-create.sh
43 | # Search needs to be immediately after - it executes too quick otherwise!!! (A blank result may mean processes already finished, not just haven't started)
44 | . ./28-processsearch-read.sh
45 |
46 | sleep 5
47 |
48 | . ./29-processasset-create.sh
49 | . ./30-processasset-read.sh
50 | . ./31-processasset-delete.sh
51 |
52 | sleep 5
53 |
54 | . ./32-processmodel-create-fork-simple.sh
55 | . ./33-processmodel-create-fork-conditional.sh
56 | . ./34-processmodel-create-fork-within-fork.sh
57 |
58 |
59 |
60 |
61 |
62 | sleep 5
63 | # All the below are final tests, to be executed at the end of all tests only
64 |
65 | . ./91-processengine-read.sh
66 |
67 |
68 | # . ./x05-processmodel-delete.sh
69 |
70 | echo "Completed all tests for MarkLogic Workflow"
71 |
72 | exit 0
73 |
--------------------------------------------------------------------------------
/shtests/webserver-settings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # CREATED BY YEOMAN generator-mljsworkplace!
4 |
5 | RESTHOST=localhost
6 | RESTPORT=8040
7 | DATABASE=workplacetest-content
8 | MLADMINUSER=admin
9 | MLADMINPASS=admin
10 | MLAUTH=digest
11 | MLDEFAULTUSER=nobody
12 | WEBPORT=5001
13 | ALERTPORT=5002
14 | APPPATH=./app
15 | DEFAULTPATH=/workplace.html5
16 | MLCP=
17 |
--------------------------------------------------------------------------------
/shtests/x05-processmodel-delete.sh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marklogic-community/marklogicworkflow/03f9b1b050c9c9121f4c68ec12ab499bac936112/shtests/x05-processmodel-delete.sh
--------------------------------------------------------------------------------
/src/casemgmt/ml-config/databases/content-database.json:
--------------------------------------------------------------------------------
1 | {
2 | "database-name" : "workflow-content",
3 | "range-element-attribute-index" : [{
4 | "scalar-type" : "string",
5 | "parent-namespace-uri" : "http://marklogic.com/workflow/case",
6 | "parent-localname" : "activity",
7 | "namespace-uri" : "",
8 | "localname" : "id",
9 | "collation" : "http://marklogic.com/collation/",
10 | "range-value-positions" : false,
11 | "invalid-values" : "ignore"
12 | } ]
13 | }
14 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-config/security/roles/case-administrator.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "case-administrator",
3 | "description" : "A role for administrators of the case management application",
4 | "role" : [ "case-user", "workflow-role", "rest-admin", "rest-extension-user" ],
5 | "permission" : [ {
6 | "role-name" : "case-administrator",
7 | "capability" : "read"
8 | }, {
9 | "role-name" : "case-administrator",
10 | "capability" : "insert"
11 | }, {
12 | "role-name" : "case-administrator",
13 | "capability" : "update"
14 | }, {
15 | "role-name" : "case-administrator",
16 | "capability" : "execute"
17 | }, {
18 | "role-name" : "case-user",
19 | "capability" : "read"
20 | }, {
21 | "role-name" : "case-user",
22 | "capability" : "insert"
23 | }, {
24 | "role-name" : "case-user",
25 | "capability" : "update"
26 | }, {
27 | "role-name" : "case-user",
28 | "capability" : "execute"
29 | } ],
30 | "privilege" : [ {
31 | "privilege-name" : "xdmp:unprotected-collections",
32 | "action" : "http://marklogic.com/xdmp/privileges/unprotected-collections",
33 | "kind" : "execute"
34 | }, {
35 | "privilege-name" : "xdmp:unprotect-collection",
36 | "action" : "http://marklogic.com/xdmp/privileges/unprotect-collection",
37 | "kind" : "execute"
38 | }, {
39 | "privilege-name" : "xdmp:any-uri",
40 | "action" : "http://marklogic.com/xdmp/privileges/any-uri",
41 | "kind" : "execute"
42 | } ],
43 | "collection" : [
44 | "http://marklogic.com/casemanagement/cases"
45 | ]
46 | }
47 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-config/security/roles/case-internal.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "case-internal",
3 | "description" : "An internal role for users of the case management application",
4 | "permission" : [ {
5 | "role-name" : "case-internal",
6 | "capability" : "read"
7 | }, {
8 | "role-name" : "case-internal",
9 | "capability" : "insert"
10 | }, {
11 | "role-name" : "case-internal",
12 | "capability" : "update"
13 | }, {
14 | "role-name" : "case-internal",
15 | "capability" : "execute"
16 | } ],
17 | "privilege" : [ ],
18 | "collection" : [
19 | "http://marklogic.com/casemanagement/cases"
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-config/security/roles/case-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "case-user",
3 | "description" : "A role for users of the case management application",
4 | "role" : [ "case-user", "workflow-role", "rest-reader", "rest-writer" ],
5 | "permission" : [ {
6 | "role-name" : "case-user",
7 | "capability" : "read"
8 | }, {
9 | "role-name" : "case-user",
10 | "capability" : "insert"
11 | }, {
12 | "role-name" : "case-user",
13 | "capability" : "update"
14 | }, {
15 | "role-name" : "case-user",
16 | "capability" : "execute"
17 | } ],
18 | "privilege" : [ {
19 | "privilege-name" : "xdmp:unprotected-collections",
20 | "action" : "http://marklogic.com/xdmp/privileges/unprotected-collections",
21 | "kind" : "execute"
22 | }, {
23 | "privilege-name" : "xdmp:unprotect-collection",
24 | "action" : "http://marklogic.com/xdmp/privileges/unprotect-collection",
25 | "kind" : "execute"
26 | }, {
27 | "privilege-name" : "xdmp:any-uri",
28 | "action" : "http://marklogic.com/xdmp/privileges/any-uri",
29 | "kind" : "execute"
30 | } ],
31 | "collection" : [
32 | "http://marklogic.com/casemanagement/cases"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/casemanagement/models/case-constants.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace const = "http://marklogic.com/casemanagement/case-constants";
4 |
5 | declare variable $const:case-dir := "/casemanagement/cases/";
6 | declare variable $const:case-collection := "http://marklogic.com/casemanagement/cases";
7 | declare variable $const:case-permissions := (
8 | xdmp:permission("case-internal",("read","update")),
9 | xdmp:permission("case-administrator",("read","update"))
10 | );
11 | declare variable $const:validation :=
12 |
13 |
14 |
15 | false
16 |
17 |
18 | true
19 |
20 |
21 | true
22 |
23 |
24 |
25 |
26 | true
27 |
28 |
29 |
30 |
31 | true
32 |
33 |
34 | true
35 |
36 |
37 | false
38 |
39 |
40 |
41 |
42 | true
43 |
44 |
45 | false
46 |
47 |
48 | true
49 |
50 |
51 |
52 |
53 | true
54 |
55 |
56 |
57 |
58 | true
59 |
60 |
61 | true
62 |
63 |
64 |
65 |
66 | true
67 |
68 |
69 | true
70 | true
71 |
72 |
73 | ;
74 |
75 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/case-lib-tests.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | (: 01 - new case ids :)
4 | import module namespace clib="http://marklogic.com/casemanagement/case-lib" at "/casemanagement/models/case-lib.xqy";
5 | import module namespace test="http://marklogic.com/test" at "/test/test-helper.xqy";
6 | declare namespace c="http://marklogic.com/workflow/case";
7 | for $source in (
8 | ,
9 | ,
10 |
11 | )
12 | let $caseid := clib:get-new-id($source)
13 | return (
14 | test:assert-equal("12345", $caseid)
15 | );
16 |
17 | import module namespace clib="http://marklogic.com/casemanagement/case-lib" at "/casemanagement/models/case-lib.xqy";
18 | import module namespace test="http://marklogic.com/test" at "/test/test-helper.xqy";
19 | let $caseid := clib:get-new-id(())
20 | return (
21 | test:assert-meets-minimum-threshold(58, fn:string-length($caseid))
22 | );
23 |
24 | import module namespace clib="http://marklogic.com/casemanagement/case-lib" at "/casemanagement/models/case-lib.xqy";
25 | import module namespace test="http://marklogic.com/test" at "/test/test-helper.xqy";
26 | declare namespace sec="http://marklogic.com/xdmp/security";
27 | let $strings:= (
28 | "case-user:read",
29 | "case-user:update"
30 | )
31 | let $role := xdmp:role("case-user")
32 | let $perms := clib:decode-permissions(($strings), "true")
33 | return (
34 | test:assert-equal(2, fn:count($perms[/sec:role-id=$role]))
35 | );
36 |
37 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | let $_load := (
9 | test:load-test-file("12345.xml", xdmp:database(), "/casemanagement/cases/notemplate/12345.xml"),
10 | test:load-test-file("1.xml", xdmp:database(), "/casemanagement/cases/notemplate/1.xml")
11 | )
12 |
13 | return (
14 | xdmp:document-set-collections("/casemanagement/cases/notemplate/12345.xml", "http://marklogic.com/casemanagement/cases"),
15 | xdmp:document-set-collections("/casemanagement/cases/notemplate/1.xml", "http://marklogic.com/casemanagement/cases")
16 | )
17 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | xdmp:directory-delete("/")
4 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/test-data/1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Updated Case Example
13 |
14 |
15 |
16 |
17 | Contact Customer
18 | Contact Customer
19 | 11-05-2017
20 | 10-06-2017
21 | 15-05-2017
22 | 14-06-2017
23 |
24 | NotActive
25 | string
26 | string
27 |
28 |
29 | attachment
30 |
31 | string
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | string
45 |
46 | NotActive
47 | 567892
48 |
49 |
50 | Test User 1
51 | 2018-02-09T16:19:35.238332Z
52 | Lifecycle
53 | Created
54 | Case Created
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/test-data/12345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Initial Case Example
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | string
24 |
25 | NotActive
26 |
27 |
28 |
29 | Test User 1
30 | 2018-02-09T16:19:35.238332Z
31 | Lifecycle
32 | Created
33 | Case Created
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/case-tests/test-data/activity-payload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Contact Customer
5 | Contact Customer
6 | 11-05-2017
7 | 10-06-2017
8 | 15-05-2017
9 | 14-06-2017
10 |
11 | Active
12 | string
13 | string
14 |
15 |
16 | attachment
17 |
18 | string
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | return (
9 | test:load-test-file("case-post-payload.xml", xdmp:database(), "/raw/data/case-post-payload.xml"),
10 | test:load-test-file("case-put-payload.xml", xdmp:database(), "/raw/data/case-put-payload.xml"),
11 | test:load-test-file("activity-payload.xml", xdmp:database(), "/raw/data/activity-payload.xml"),
12 | test:load-test-file("22345.xml", xdmp:database(), "/raw/data/22345.xml"),
13 | test:load-test-file("22345.xml", xdmp:database(), "/casemanagement/cases/notemplate/22345.xml"),
14 | test:load-test-file("32345.xml", xdmp:database(), "/casemanagement/cases/notemplate/32345.xml")
15 | );
16 |
17 | (
18 | xdmp:document-set-collections(
19 | "/casemanagement/cases/notemplate/22345.xml",
20 | "http://marklogic.com/casemanagement/cases"
21 | ),
22 | xdmp:document-set-permissions(
23 | "/casemanagement/cases/notemplate/22345.xml",
24 | (
25 | xdmp:permission("test-case-role-one", "read"),
26 | xdmp:permission("test-case-role-one", "insert"),
27 | xdmp:permission("test-case-role-one", "update")
28 | )
29 | )
30 | );
31 |
32 | (
33 | xdmp:document-set-collections(
34 | "/casemanagement/cases/notemplate/32345.xml",
35 | "http://marklogic.com/casemanagement/cases"
36 | ),
37 | xdmp:document-set-permissions(
38 | "/casemanagement/cases/notemplate/32345.xml",
39 | (
40 | xdmp:permission("test-case-role-one", "read"),
41 | xdmp:permission("test-case-role-one", "insert"),
42 | xdmp:permission("test-case-role-one", "update")
43 | )
44 | )
45 | );
46 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
4 |
5 | let $create-roles := (
6 | uh:create-role("test-case-role-one", ("workflow-role-unit-test", "case-user"), () ),
7 | uh:create-role("test-case-role-two", ("workflow-role-unit-test", "case-user"), () )
8 | )
9 | return (
10 | uh:create-user("test-case-user-one", "test-case-user-one",
11 | ("workflow-role-unit-test", "test-case-role-one") ),
12 | uh:create-user("test-case-user-two", "test-case-user-two",
13 | ("workflow-role-unit-test", "test-case-role-two") ),
14 | uh:create-user("test-case-administrator", "test-case-administrator",
15 | ("workflow-role-unit-test", "case-administrator") )
16 | )
17 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/suite-teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
3 |
4 | (
5 | uh:remove-user("test-case-user-one"),
6 | uh:remove-user("test-case-user-two"),
7 | uh:remove-user("test-case-administrator"),
8 | uh:remove-role("test-case-role-one"),
9 | uh:remove-role("test-case-role-two")
10 | )
11 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | xdmp:directory-delete("/")
4 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/test-data/22345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Initial Case Example
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | string
24 |
25 | NotActive
26 |
27 |
28 |
29 | Test User 1
30 | 2018-02-09T16:19:35.238332Z
31 | Lifecycle
32 | Created
33 | Case Created
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/test-data/32345.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Initial Case Example
13 |
14 |
15 |
16 |
17 | Contact Customer
18 | Contact Customer
19 | 11-05-2017
20 | 10-06-2017
21 | 15-05-2017
22 | 14-06-2017
23 |
24 | something to go
25 |
26 |
27 | NotActive
28 | string
29 | string
30 |
31 |
32 | attachment
33 |
34 | string
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | string
48 |
49 | NotActive
50 |
51 |
52 |
53 | Test User 1
54 | 2018-02-09T16:19:35.238332Z
55 | Lifecycle
56 | Created
57 | Case Created
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/test-data/activity-payload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Contact Customer
5 | Contact Customer
6 | 11-05-2017
7 | 10-06-2017
8 | 15-05-2017
9 | 14-06-2017
10 |
11 | Active
12 | string
13 | string
14 |
15 |
16 | attachment
17 |
18 | string
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/test-data/case-post-payload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Initial Case Example
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | string
24 |
25 | NotActive
26 |
27 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/e2e-case-management/test-data/case-put-payload.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0
5 | 12-04-2016
6 |
7 | phaseUid1
8 |
9 |
10 |
11 | Intial
12 | Updated Case Example
13 |
14 |
15 |
16 |
17 | Contact Customer
18 | Contact Customer
19 | 11-05-2017
20 | 10-06-2017
21 | 15-05-2017
22 | 14-06-2017
23 |
24 | NotActive
25 | string
26 | string
27 |
28 |
29 | attachment
30 |
31 | string
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | string
45 |
46 | NotActive
47 | 567892
48 |
--------------------------------------------------------------------------------
/src/casemgmt/ml-modules/root/test/suites/workflow-util/utilities.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
4 | import module namespace test="http://marklogic.com/test" at "/test/test-helper.xqy";
5 | let $workflow-id := wfu:new-workflow-id()
6 | return (
7 | test:assert-meets-minimum-threshold(58, fn:string-length($workflow-id))
8 | );
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/main/ml-config/cpf/cpf-configs/wf-init-cpf-config.json:
--------------------------------------------------------------------------------
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 | }
18 |
--------------------------------------------------------------------------------
/src/main/ml-config/cpf/domains/wf-init-domain.json:
--------------------------------------------------------------------------------
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 | }
11 |
--------------------------------------------------------------------------------
/src/main/ml-config/mimetypes/xml.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "application/xml",
3 | "extension": [
4 | "xml", "xsd", "xvs", "sch", "scxml", "bpmn"
5 | ],
6 | "format": "xml"
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/ml-config/security/roles/1-workflow-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "workflow-role",
3 | "description" : "A role for users of the workflow application",
4 | "privilege" : [ {
5 | "privilege-name" : "xdmp:set-server-field",
6 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-set-server-field",
7 | "kind" : "execute"
8 | }, {
9 | "privilege-name" : "xdmp:invoke",
10 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-invoke",
11 | "kind" : "execute"
12 | }, {
13 | "privilege-name" : "xdmp:get-server-field",
14 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-get-server-field",
15 | "kind" : "execute"
16 | }, {
17 | "privilege-name" : "xdmp:add-response-header",
18 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-add-response-header",
19 | "kind" : "execute"
20 | }, {
21 | "privilege-name" : "rest-reader",
22 | "action" : "http://marklogic.com/xdmp/privileges/rest-reader",
23 | "kind" : "execute"
24 | }, {
25 | "privilege-name" : "xdmp:with-namespaces",
26 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-with-namespaces",
27 | "kind" : "execute"
28 | }, {
29 | "privilege-name" : "xdmp:value",
30 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-value",
31 | "kind" : "execute"
32 | } ]
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/ml-config/security/roles/2-workflow-role.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "workflow-role",
3 | "permission" : [ {
4 | "role-name" : "workflow-role",
5 | "capability" : "read"
6 | }, {
7 | "role-name" : "workflow-role",
8 | "capability" : "insert"
9 | }, {
10 | "role-name" : "workflow-role",
11 | "capability" : "update"
12 | }, {
13 | "role-name" : "workflow-role",
14 | "capability" : "execute"
15 | } ]
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/ml-config/security/users/workflow-user.json:
--------------------------------------------------------------------------------
1 | {
2 | "user-name" : "workflow-user",
3 | "description" : "A user for the workflow application",
4 | "role" : [ "workflow-role" ],
5 | "password" : "CHANGEME"
6 | }
--------------------------------------------------------------------------------
/src/main/ml-config/servers/workflow-xcc.json:
--------------------------------------------------------------------------------
1 | {
2 | "server-name" : "workflow-xcc",
3 | "group-name" : "Default",
4 | "server-type" : "xdbc",
5 | "enabled" : true,
6 | "root" : "/",
7 | "port" : 8041,
8 | "display-last-login" : false,
9 | "address" : "0.0.0.0",
10 | "backlog" : 512,
11 | "threads" : 32,
12 | "request-timeout" : 30,
13 | "keep-alive-timeout" : 5,
14 | "session-timeout" : 3600,
15 | "max-time-limit" : 3600,
16 | "default-time-limit" : 600,
17 | "max-inference-size" : 500,
18 | "default-inference-size" : 100,
19 | "pre-commit-trigger-depth" : 1000,
20 | "pre-commit-trigger-limit" : 10000,
21 | "collation" : "http://marklogic.com/collation/",
22 | "coordinate-system" : "wgs84",
23 | "authentication" : "digest",
24 | "internal-security" : true,
25 | "concurrent-request-limit" : 0,
26 | "file-log-level" : "info",
27 | "log-errors" : true,
28 | "debug-allow" : true,
29 | "profile-allow" : true,
30 | "default-xquery-version" : "1.0-ml",
31 | "multi-version-concurrency-control" : "contemporaneous",
32 | "distribute-timestamps" : "fast",
33 | "output-sgml-character-entities" : "none",
34 | "output-encoding" : "UTF-8",
35 | "output-method" : "default",
36 | "output-byte-order-mark" : "default",
37 | "output-cdata-section-namespace-uri" : "",
38 | "output-cdata-section-localname" : null,
39 | "output-doctype-public" : "",
40 | "output-doctype-system" : "",
41 | "output-escape-uri-attributes" : "default",
42 | "output-include-content-type" : "default",
43 | "output-indent" : "default",
44 | "output-indent-untyped" : "default",
45 | "output-indent-tabs" : "default",
46 | "output-media-type" : "",
47 | "output-normalization-form" : "none",
48 | "output-omit-xml-declaration" : "default",
49 | "output-standalone" : "omit",
50 | "output-undeclare-prefixes" : "default",
51 | "output-version" : "",
52 | "output-include-default-attributes" : "default",
53 | "ssl-allow-sslv3" : true,
54 | "ssl-allow-tls" : true,
55 | "ssl-disable-sslv3" : false,
56 | "ssl-disable-tlsv1" : false,
57 | "ssl-disable-tlsv1-1" : false,
58 | "ssl-disable-tlsv1-2" : false,
59 | "ssl-hostname" : "",
60 | "ssl-ciphers" : "ALL:!LOW:@STRENGTH",
61 | "ssl-require-client-certificate" : true,
62 | "content-database" : "workflow-content",
63 | "modules-database" : "workflow-modules"
64 | }
--------------------------------------------------------------------------------
/src/main/ml-modules/rest-properties.xml:
--------------------------------------------------------------------------------
1 |
2 | none
3 | true
4 |
5 | false
6 |
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/Default/workflow/rest-api/properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | none
5 |
6 |
7 | true
8 |
9 |
10 |
11 |
12 |
13 | false
14 |
15 |
16 | true
17 |
18 |
19 | merge-metadata
20 |
21 |
22 | false
23 |
24 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/copyright/add-copyright.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
declare variable $cpf:document-uri as xs:string external; declare variable $cpf:transition as node() external;
if (cpf:check-transition($cpf:document-uri,$cpf:transition)) then try {
let $doc := fn:doc( $cpf:document-uri )
return
xdmp:node-insert-child(
$doc/book,
2010
The Publisher
),
xdmp:log( "add copyright ran OK" ),
cpf:success( $cpf:document-uri, $cpf:transition, () )
}
catch ($e) {
cpf:failure( $cpf:document-uri, $cpf:transition, $e, () ) }
else ()
--------------------------------------------------------------------------------
/src/main/ml-modules/root/copyright/add-last-updated.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
import module namespace cpf="http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
declare variable $cpf:document-uri as xs:string external; declare variable $cpf:transition as node() external;
if (cpf:check-transition($cpf:document-uri,$cpf:transition)) then try {
let $doc := fn:doc($cpf:document-uri)
return
xdmp:node-insert-child(
$doc/book, {fn:current-dateTime()}),
),
xdmp:log( "add last-updated ran OK" ), cpf:success($cpf:document-uri, $cpf:transition, ())
} catch ($e) {
cpf:failure($cpf:document-uri, $cpf:transition, $e, ())
}
else ()
--------------------------------------------------------------------------------
/src/main/ml-modules/root/lib/http-codes.xqy:
--------------------------------------------------------------------------------
1 | module namespace http-codes = "http://marklogic.com/workflow/http-codes";
2 |
3 | declare variable $OK := 200;
4 | declare variable $CREATED := 201;
5 | declare variable $UPDATED := 202;
6 | declare variable $NO-CONTENT := 204;
7 |
8 | declare variable $OK-MESSAGE := "OK";
--------------------------------------------------------------------------------
/src/main/ml-modules/root/lib/http-util.xqy:
--------------------------------------------------------------------------------
1 | module namespace http-util = "http://marklogic.com/workflow/http-util";
2 |
3 | import module namespace mime-types = "http://marklogic.com/workflow/mime-types" at "/lib/mime-types.xqy";
4 |
5 | declare function get-accept-type($context as map:map) as xs:string{
6 | let $accept-type := map:get($context,"accept-types")
7 | return
8 | if($mime-types:HTML = $accept-type) then $mime-types:HTML
9 | else if ($mime-types:XML = $accept-type) then $mime-types:XML
10 | else $mime-types:JSON
11 | };
12 |
13 | declare function html-response-requested($context as map:map) as xs:boolean{
14 | $mime-types:HTML = get-accept-type($context)
15 | };
16 |
17 | declare function xml-response-requested($context as map:map) as xs:boolean{
18 | $mime-types:XML = get-accept-type($context)
19 | };
20 |
21 | declare function json-response-requested($context as map:map) as xs:boolean{
22 | $mime-types:JSON = get-accept-type($context)
23 | };
24 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/lib/mime-types.xqy:
--------------------------------------------------------------------------------
1 | module namespace mime-types = "http://marklogic.com/workflow/mime-types";
2 |
3 | declare variable $XML := "application/xml";
4 | declare variable $JSON := "application/json";
5 | declare variable $HTML := "text/html";
--------------------------------------------------------------------------------
/src/main/ml-modules/root/lib/string-util.xqy:
--------------------------------------------------------------------------------
1 | module namespace string-util = "http://marklogic.com/workflow/string-util";
2 |
3 | declare function capitalize($string as xs:string){
4 | fn:upper-case(fn:substring($string,1,1))||fn:lower-case(fn:substring($string,2,fn:string-length($string)))
5 | };
6 |
7 | declare function dash-format-string($string as xs:string){
8 | let $strings := (fn:tokenize($string,"-") ! capitalize(.))
9 | return
10 | fn:string-join($strings," ")
11 | };
12 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/lib/workflow-constants.xqy:
--------------------------------------------------------------------------------
1 | module namespace wfc = "http://marklogic.com/workflow/constants";
2 |
3 | (: REST Status constants :)
4 | declare variable $SERVICE-SUCCESS-RESPONSE := "SUCCESS";
5 | declare variable $SERVICE-FAILURE-RESPONSE := "FAILURE";
6 |
7 | (: Namespaces :)
8 | declare variable $WORKFLOW-NAMESPACE := "http://marklogic.com/workflow";
9 |
10 | (: Collections :)
11 | declare variable $MODEL-COLLECTION := $WORKFLOW-NAMESPACE||"/model";
12 |
13 | (: Directories :)
14 | declare variable $WORKFLOW-DIRECTORY := "/workflow/";
15 | declare variable $MODELS-DIRECTORY := $WORKFLOW-DIRECTORY||"models/";
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/endEvent.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 |
8 | declare variable $cpf:document-uri as xs:string external;
9 | declare variable $cpf:transition as node() external;
10 | declare variable $cpf:options as element() external;
11 |
12 | (: A placeholder for an endEvent in a BPMN2 model
13 |
14 |
15 | BPMN2 End Event: end
16 | http://marklogic.com/states/PROCESSNAME__1__0/end
17 | http://marklogic.com/states/PROCESSNAME__1__0/_end
18 | http://marklogic.com/states/error
19 |
20 |
21 | /workflowengine/actions/endEvent.xqy
22 |
23 |
24 |
25 |
26 |
27 | :)
28 |
29 | try {
30 | let $st := fn:current-dateTime()
31 | return
32 | (
33 | xdmp:trace("ml-workflow","In endEvent.xqy"),
34 | xdmp:document-add-properties($cpf:document-uri,
35 | (
36 | {fn:current-dateTime()}
37 | )
38 | )
39 | ,
40 | xdmp:node-replace(xdmp:document-properties($cpf:document-uri)/prop:properties/wf:status,{$wfu:COMPLETE-STATUS})
41 | ,
42 | wfu:complete( $cpf:document-uri, $cpf:transition, (), $st )
43 | )
44 | } catch ($e) {
45 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/fork.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 | declare namespace prop = "http://marklogic.com/xdmp/property";
8 |
9 | declare option xdmp:mapping "false";
10 |
11 | declare variable $cpf:document-uri as xs:string external;
12 | declare variable $cpf:transition as node() external;
13 | declare variable $cpf:options as element() external;
14 |
15 |
16 | (: Just call wfu:fork with $cpf:options/wf:branches spec :)
17 | try {
18 | let $_ := xdmp:trace("ml-workflow",fn:concat("Fork called cpf:document-uri: ", $cpf:document-uri, " cpf:options: ", xdmp:quote($cpf:options) ))
19 | let $_ := wfu:fork($cpf:document-uri,$cpf:options/wf:branch-definitions)
20 | return
21 | wfu:complete($cpf:document-uri, $cpf:transition,(),fn:current-dateTime())
22 | }
23 | catch($e){
24 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/genericComplete.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 | declare namespace prop = "http://marklogic.com/xdmp/property";
8 |
9 | declare variable $cpf:document-uri as xs:string external;
10 | declare variable $cpf:transition as node() external;
11 | declare variable $cpf:options as element() external;
12 |
13 | try {
14 | let $st := fn:current-dateTime()
15 | let $_ := xdmp:log("MarkLogic Workflow generic complete CPF action called for: "||$cpf:document-uri)
16 | let $props := xdmp:document-properties($cpf:document-uri)/prop:properties
17 | let $_ := xdmp:log($props)
18 |
19 | (: wf:state in cpf:options MAY contain an override of the next state :)
20 | let $stateOverride :=
21 | if (fn:not(fn:empty($cpf:options/wf:state))) then
22 | xs:anyURI(xs:string($cpf:options/wf:state))
23 | else ()
24 |
25 | (: Allow state transition to happen :)
26 | return wfu:complete( $cpf:document-uri, $cpf:transition, $stateOverride, $st )
27 | } catch ($e) {
28 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/mlNodeReplace.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 |
8 | declare variable $cpf:document-uri as xs:string external;
9 | declare variable $cpf:transition as node() external;
10 | declare variable $cpf:options as element() external;
11 |
12 | (: A custom MarkLogic Workflow task that replaces a node in an XML document with a new node
13 |
14 |
15 | MarkLogic Node Replace
16 | http://marklogic.com/states/PROCESSNAME__1__0/SomeStep
17 | http://marklogic.com/states/PROCESSNAME__1__0/NextStep
18 | http://marklogic.com/states/error
19 |
20 |
21 | /workflowengine/actions/mlNodeReplace.xqy
22 |
23 | fn:doc($wf:process/wf:attachments/wf:attachment[@name='Attachment1']/wf:uri/text())/some/other/somens:docnode
24 | withNewContent]!>
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | :)
33 |
34 | try {
35 | (: Replace the node, evaluating the content as we go :)
36 | (xdmp:log("IN ML NODE REPLACE ACTION: " || $cpf:document-uri),xdmp:log($cpf:options),
37 | let $ns := ($cpf:options/wf:namespaces/wf:namespace,)
38 | return
39 | xdmp:node-replace(
40 | wfu:evaluate($cpf:document-uri,$ns,xs:string($cpf:options/wf:xpath)),
41 | wfu:evaluate($cpf:document-uri,$ns,xs:string($cpf:options/wf:content))
42 | )
43 | ,cpf:success($cpf:document-uri,$cpf:transition,())
44 | )
45 | (: Note the state transition is a full path as a string, so in the WF namespace, not the pipeline namespace :)
46 | } catch ($e) {
47 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/recheckState.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf = "http://marklogic.com/workflow";
7 | declare namespace p="http://marklogic.com/cpf/pipelines";
8 |
9 | declare variable $cpf:document-uri as xs:string external;
10 | declare variable $cpf:transition as node() external;
11 | declare variable $cpf:options as element() external;
12 |
13 | let $cpf:state := xdmp:document-properties($cpf:document-uri)/prop:properties/cpf:state/text()
14 | let $cpf:transition := /p:pipeline/p:state-transition[p:state = $cpf:state]
15 | let $module := $cpf:transition/p:execute/p:action/p:module/text()
16 | let $module-options := $cpf:transition/p:execute/p:action/*[fn:local-name(.) = "options"][fn:namespace-uri(.) = $module]
17 |
18 | let $condition-check-module := $cpf:transition/p:execute/p:condition/p:module/text()
19 | let $condition-check-options := $cpf:transition/p:execute/p:condition/*[fn:local-name(.) = "options"][fn:namespace-uri(.) = $condition-check-module]
20 | let $condition-check-result :=
21 | xdmp:invoke($condition-check-module,(xs:QName("cpf:document-uri"),$cpf:document-uri,xs:QName("cpf:transition"),$cpf:transition,xs:QName("cpf:options"),$condition-check-options))
22 | return
23 | if($condition-check-result) then
24 | xdmp:invoke($module,(xs:QName("cpf:document-uri"),$cpf:document-uri,xs:QName("cpf:transition"),$cpf:transition,xs:QName("cpf:options"),$module-options))
25 | else
26 | ()
27 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/task.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 |
8 | declare variable $cpf:document-uri as xs:string external;
9 | declare variable $cpf:transition as node() external;
10 | declare variable $cpf:options as element() external;
11 |
12 | (: A dumb blank task in a BPMN2 model
13 |
14 |
15 | Generic Task
16 | http://marklogic.com/states/PROCESSNAME__1__0/SomeStep
17 | http://marklogic.com/states/PROCESSNAME__1__0/NextStep
18 | http://marklogic.com/states/error
19 |
20 |
21 | /workflowengine/actions/task.xqy
22 |
23 |
24 |
25 |
26 |
27 | :)
28 |
29 | try {
30 | wfu:complete( $cpf:document-uri, $cpf:transition, (), fn:current-dateTime() )
31 | } catch ($e) {
32 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/actions/workflowInitialSelection.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 | declare namespace prop = "http://marklogic.com/xdmp/property";
8 |
9 | declare variable $cpf:document-uri as xs:string external;
10 | declare variable $cpf:transition as node() external;
11 | declare variable $cpf:options as element() external;
12 |
13 | try {
14 | let $st := fn:current-dateTime()
15 | let $_ := xdmp:log("MarkLogic Workflow initial selection action called for: "||$cpf:document-uri)
16 |
17 | (: determine next state by URI of the process document :)
18 |
19 | let $middleName := fn:string-join(fn:tokenize(fn:substring-after($cpf:document-uri,"/workflow/processes/"),"/")[1 to fn:last() -1],"/")
20 | let $_ := xdmp:log("Document is for process: " || $middleName)
21 | let $stateOverride := xs:anyURI("http://marklogic.com/states/" || $middleName || "__start")
22 | let $_ := xdmp:log("Next state is:-")
23 | let $_ := xdmp:log($stateOverride)
24 |
25 | (: Allow state transition to happen :)
26 | return wfu:complete( $cpf:document-uri, $cpf:transition, $stateOverride, $st )
27 | } catch ($e) {
28 | wfu:failure( $cpf:document-uri, $cpf:transition, $e, () )
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/assets/021-initiating-attachment/1/2/RejectedEmail.txt:
--------------------------------------------------------------------------------
1 |
4 | Document Rejected
5 |
6 |
7 | MarkLogic Admin
8 | admin@example.com
9 |
10 |
11 |
12 |
13 | {$wf:process/wf:data/RecipientName/text()}
14 | {$wf:process/wf:data/RecipientEmail/text()}
15 |
16 |
17 |
18 |
19 |
20 | V2 sample rejection message
21 |
22 |
23 | Document rejected
24 | Your document {xs:string($wf:process/wf:attachments/wf:attachment[@name='Document']/@uri)} was rejected.
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/assets/021-initiating-attachment/ApprovedEmail.txt:
--------------------------------------------------------------------------------
1 |
4 | Document Approved
5 |
6 |
7 | MarkLogic Admin
8 | admin@example.com
9 |
10 |
11 |
12 |
13 | {$wf:process/wf:data/RecipientName/text()}
14 | {$wf:process/wf:data/RecipientEmail/text()}
15 |
16 |
17 |
18 |
19 |
20 | Sample approved message
21 |
22 |
23 | Document approved
24 | Your document {xs:string($wf:process/wf:attachments/wf:attachment[@name='Document']/@uri)} was approved.
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/assets/021-initiating-attachment/RejectedEmail.txt:
--------------------------------------------------------------------------------
1 |
4 | Document Rejected
5 |
6 |
7 | MarkLogic Admin
8 | admin@example.com
9 |
10 |
11 |
12 |
13 | {$wf:process/wf:data/RecipientName/text()}
14 | {$wf:process/wf:data/RecipientEmail/text()}
15 |
16 |
17 |
18 |
19 |
20 | V1 sample rejection message
21 |
22 |
23 | Document rejected
24 | Your document was rejected.
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/assets/022-email-test/TestEmail.txt:
--------------------------------------------------------------------------------
1 |
4 | Test Email
5 |
6 |
7 | MarkLogic Admin
8 | admin@example.com
9 |
10 |
11 |
12 |
13 | Admin
14 | admin@example.com
15 |
16 |
17 |
18 |
19 |
20 | Test email message
21 |
22 |
23 | Email message
24 | Your document {xs:string($wf:process/wf:attachments/wf:attachment[1]/@uri)} was attached.
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/conditions/hasEntered.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 | declare namespace prop = "http://marklogic.com/xdmp/property";
8 |
9 | declare variable $cpf:document-uri as xs:string external;
10 | declare variable $cpf:transition as node() external;
11 | declare variable $cpf:options as element() external;
12 |
13 |
14 | let $result := fn:empty(xdmp:document-properties($cpf:document-uri)/prop:properties/wf:currentStep/wf:step-status)
15 | return (
16 | xdmp:log( fn:concat("MarkLogic Workflow hasEntered result=", fn:string($result), " for ", $cpf:document-uri) ),
17 | $result
18 | )
19 |
20 | (: End of hasEntered.xqy :)
21 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/conditions/hasRendezvoused.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (: Checks to see if this parent process has all its children in a state, for this specific configuration, that means
3 | all child processes have rendezvoused, and if so, continues to the next state :)
4 |
5 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
6 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
7 |
8 | declare namespace wf="http://marklogic.com/workflow";
9 | declare namespace prop = "http://marklogic.com/xdmp/property";
10 |
11 | declare variable $cpf:document-uri as xs:string external;
12 | declare variable $cpf:transition as node() external;
13 | declare variable $cpf:options as element() external;
14 |
15 | let $_ := xdmp:log( fn:concat("hasRendezvoused condition test on ", $cpf:document-uri) , "debug")
16 | let $activeFork := xdmp:document-properties($cpf:document-uri)/prop:properties/wf:branches[./wf:status = "INPROGRESS"]
17 | let $_ := xdmp:trace("ml-workflow","Active fork in hadRendezvoused : "||xdmp:quote($activeFork))
18 |
19 | (: Check RV method :)
20 | let $outcome :=
21 | if ($activeFork/wf:rendezvous-method = "ALL") then
22 | (: Ensure all forks' status are COMPLETE to return true :)
23 | fn:empty($activeFork/wf:branch-status[./wf:status = "INPROGRESS"])
24 | else
25 | fn:false() (: TODO implement AllTolerant and One methods too :)
26 |
27 | return (
28 | xdmp:log( fn:concat("MarkLogic Workflow hasRendezvoused condition result=", fn:string($outcome), " for ", $cpf:document-uri) ),
29 | (:xdmp:node-delete(xdmp:document-properties($cpf:document-uri)/prop:properties/wf:currentStep),:)
30 | (:xdmp:node-replace($activeFork/wf:status/text(),text{$wfu:COMPLETE-STATUS}),:)
31 | $outcome
32 | )
33 |
34 | (: End of hasRendezvoused.xqy :)
35 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/conditions/isComplete.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
4 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
5 |
6 | declare namespace wf="http://marklogic.com/workflow";
7 | declare namespace prop = "http://marklogic.com/xdmp/property";
8 |
9 | declare variable $cpf:document-uri as xs:string external;
10 | declare variable $cpf:transition as node() external;
11 | declare variable $cpf:options as element() external;
12 |
13 |
14 | let $_ := xdmp:log("isComplete condition check for: " || $cpf:document-uri)
15 | let $ready := xdmp:document-properties($cpf:document-uri)/prop:properties/wf:currentStep/wf:step-status
16 | let $_ := xdmp:log($ready)
17 | let $result := $wfu:COMPLETE-STATUS eq $ready
18 | let $_ := xdmp:log($result)
19 | return (
20 | xdmp:log( fn:concat("MarkLogic Workflow isComplete result=", fn:string($result), " for ", $cpf:document-uri) ),
21 | $result
22 | )
23 |
24 | (: End of isComplete.xqy :)
25 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/models/alert-action-process.xqy:
--------------------------------------------------------------------------------
1 | (:
2 | : An alert action that allows a MarkLogic Workflow process to be subscribed to the creation of a particular document.
3 | : Implemented as an alert to provide as much flexibility as possible.
4 | :
5 | : In future will be expanded with more support for data mappings.
6 | :)
7 |
8 | xquery version "1.0-ml";
9 |
10 | import module namespace alert = "http://marklogic.com/xdmp/alert" at "/MarkLogic/alert.xqy";
11 | declare namespace wf = "http://marklogic.com/workflow";
12 |
13 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
14 |
15 | declare variable $alert:config-uri as xs:string external;
16 | declare variable $alert:doc as node() external;
17 | declare variable $alert:rule as element(alert:rule) external;
18 | declare variable $alert:action as element(alert:action) external;
19 |
20 | (: Create a process instance for this document :)
21 |
22 | (: Find appropriate process from alert action option :)
23 | let $procname := xs:string($alert:action/alert:options/wf:process-name)
24 | let $pid := wfu:create($procname,$alert:doc/element(),
25 | ()
26 | ,(),(),()
27 | )
28 | return ()
29 |
30 |
31 | (:
32 | xdmp:document-insert($procname || "/" || sem:uuid-string() || ".xml",
33 |
34 |
35 | {
36 | ( : TODO check config for mappings options - rather than map entire document in : )
37 | $alert:doc/element()
38 | }
39 |
40 |
41 |
42 | {fn:base-uri($alert:doc)}
43 |
44 |
45 | ,
46 | xdmp:default-permissions(),
47 | (xdmp:default-collections(),"http://marklogic.com/workflow/processes")
48 | )
49 | :)
50 |
--------------------------------------------------------------------------------
/src/main/ml-modules/root/workflowengine/models/lib-stack.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace stack="http://marklogic.com/stack";
4 |
5 | declare function stack:push($map as map:map,$obj as item()) as empty-sequence() {
6 | map:put($map,xs:string(map:count($map) + 1),$obj)
7 | };
8 |
9 | declare function stack:peek($map as map:map) {
10 | map:get($map,xs:string(map:count($map)))
11 | };
12 |
13 | declare function stack:previous($map as map:map) {
14 | map:get($map,xs:string(map:count($map) - 1))
15 | };
16 |
17 | declare function stack:pop($map as map:map) {
18 | let $count := xs:string(map:count($map))
19 | let $item := map:get($map,$count)
20 | let $remove := map:delete($map,$count)
21 | return $item
22 | };
23 |
24 | declare function stack:count($map as map:map) as xs:unsignedInt {
25 | map:count($map)
26 | };
27 |
--------------------------------------------------------------------------------
/src/main/ml-modules/services/processroleinbox.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace ext = "http://marklogic.com/rest-api/resource/processroleinbox";
4 |
5 | (: import module namespace config = "http://marklogic.com/roxy/config" at "/app/config/config.xqy"; :)
6 | import module namespace json = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy";
7 |
8 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
9 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
10 |
11 | declare namespace rapi= "http://marklogic.com/rest-api";
12 | declare namespace roxy = "http://marklogic.com/roxy";
13 | declare namespace wf="http://marklogic.com/workflow";
14 |
15 |
16 | (:
17 | : Fetch a process inbox for the current role
18 | :)
19 | declare
20 | %roxy:params("role=xs:string")
21 | function ext:get(
22 | $context as map:map,
23 | $params as map:map
24 | ) as document-node()*
25 | {
26 | let $preftype := if ("application/xml" = map:get($context,"accept-types")) then "application/xml" else "application/json"
27 |
28 | let $_ := xdmp:log($params)
29 | let $_ := xdmp:log($context)
30 |
31 | let $out :=
32 | if (fn:empty(map:get($params,"role"))) then
33 | FAILUREParameter 'role' is required.
34 | else
35 | SUCCESS
36 | {wfu:roleinbox( map:get($params,"role") )}
37 |
38 |
39 | return
40 | (
41 | xdmp:set-response-code(200, "OK"),
42 | document {
43 | if ("application/xml" = $preftype) then
44 | $out
45 | else
46 | let $config := json:config("custom")
47 | let $cx := map:put($config, "text-value", "label" )
48 | let $cx := map:put($config , "camel-case", fn:true() )
49 | return
50 | json:transform-to-json($out, $config)
51 | }
52 | )
53 | };
54 |
--------------------------------------------------------------------------------
/src/main/ml-modules/services/processsearch.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 |
4 | (: process.xqy - Start a new, or modify an existing, MarkLogic Workflow process
5 | :
6 | :)
7 |
8 | module namespace ext = "http://marklogic.com/rest-api/resource/processsearch";
9 |
10 | (: import module namespace config = "http://marklogic.com/roxy/config" at "/app/config/config.xqy"; :)
11 | import module namespace json = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy";
12 |
13 | import module namespace cpf = "http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
14 | import module namespace wfu="http://marklogic.com/workflow-util" at "/workflowengine/models/workflow-util.xqy";
15 |
16 | declare namespace roxy = "http://marklogic.com/roxy";
17 | declare namespace wf="http://marklogic.com/workflow";
18 |
19 |
20 | (:
21 | : Simple listing of all processes. Optional process model instance name
22 | :)
23 | declare
24 | %roxy:params("processname=xs:string?")
25 | function ext:get(
26 | $context as map:map,
27 | $params as map:map
28 | ) as document-node()*
29 | {
30 | let $preftype := if ("application/xml" = map:get($context,"accept-types")) then "application/xml" else "application/json"
31 |
32 | let $_ := xdmp:log($params)
33 | let $_ := xdmp:log($context)
34 |
35 | let $out :=
36 | SUCCESS
37 | {
38 | wfu:list(map:get($params,"processname"))
39 | }
40 |
41 |
42 | return
43 | (
44 | xdmp:set-response-code(200, "OK"),
45 | document {
46 | if ("application/xml" = $preftype) then
47 | $out
48 | else
49 | let $config := json:config("custom")
50 | let $cx := map:put($config, "text-value", "label" )
51 | let $cx := map:put($config , "camel-case", fn:true() )
52 | return
53 | json:transform-to-json($out, $config)
54 | }
55 | )
56 | };
57 |
--------------------------------------------------------------------------------
/src/main/ml-modules/services/version.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace ext = "http://marklogic.com/rest-api/resource/version";
4 |
5 | (: import module namespace config = "http://marklogic.com/roxy/config" at "/app/config/config.xqy"; :)
6 | import module namespace json6 = "http://marklogic.com/xdmp/json" at "/MarkLogic/json/json.xqy";
7 |
8 | declare namespace roxy = "http://marklogic.com/roxy";
9 |
10 | (:
11 | : To add parameters to the functions, specify them in the params annotations.
12 | : Example
13 | : declare %roxy:params("uri=xs:string", "priority=xs:int") ext:get(...)
14 | : This means that the get function will take two parameters, a string and an int.
15 | :)
16 |
17 | (:
18 | :)
19 | declare function ext:get(
20 | $context as map:map,
21 | $params as map:map
22 | ) as document-node()*
23 | {
24 | let $preftype := if ("application/xml" = map:get($context,"accept-types")) then "application/xml" else "application/json"
25 | let $out := xdmp:version()
26 | return
27 | (
28 | xdmp:set-response-code(200, "OK"),
29 | document {
30 | if ("application/xml" = $preftype) then
31 | {$out}
32 | else
33 | fn:concat("{""version"": """,$out,"""}")
34 | }
35 | )
36 | };
37 |
--------------------------------------------------------------------------------
/src/main/ml-modules/services/versionjs.sjs:
--------------------------------------------------------------------------------
1 | function get(context, params) {
2 | // We return only one document, and it's a JSON doc
3 | context.outputTypes = [ 'application/json'];
4 |
5 | // create output JSON payload by default
6 | var out = {"version": xdmp.version() };
7 |
8 | // return zero or more document nodes
9 | if (context.acceptTypes == "application/xml") {
10 | xdmp.fromJSON(out);
11 | } else {
12 | return out;
13 | }
14 | };
15 |
16 | exports.GET = get;
17 |
--------------------------------------------------------------------------------
/src/test/ml-config/security/roles/workflow-role-unit-test.json:
--------------------------------------------------------------------------------
1 | {
2 | "role-name" : "workflow-role-unit-test",
3 | "description" : "A role for unit testing the workflow application",
4 | "role" : [ "workflow-role" ],
5 | "privilege" : [ {
6 | "privilege-name" : "xdmp:http-delete",
7 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-http-delete",
8 | "kind" : "execute"
9 | }, {
10 | "privilege-name" : "xdmp:eval-in",
11 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-eval-in",
12 | "kind" : "execute"
13 | }, {
14 | "privilege-name" : "xdmp:http-post",
15 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-http-post",
16 | "kind" : "execute"
17 | }, {
18 | "privilege-name" : "xdmp:http-put",
19 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-http-put",
20 | "kind" : "execute"
21 | }, {
22 | "privilege-name" : "xdmp:http-get",
23 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-http-get",
24 | "kind" : "execute"
25 | }, {
26 | "privilege-name" : "xdmp:filesystem-directory",
27 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-filesystem-directory",
28 | "kind" : "execute"
29 | }, {
30 | "privilege-name" : "xdmp:eval",
31 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-eval",
32 | "kind" : "execute"
33 | }, {
34 | "privilege-name" : "xdmp:save",
35 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-save",
36 | "kind" : "execute"
37 | }, {
38 | "privilege-name" : "xdmp:document-get",
39 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-document-get",
40 | "kind" : "execute"
41 | }, {
42 | "privilege-name" : "any-uri",
43 | "action" : "http://marklogic.com/xdmp/privileges/any-uri",
44 | "kind" : "execute"
45 | }, {
46 | "privilege-name" : "xdmp:http-head",
47 | "action" : "http://marklogic.com/xdmp/privileges/xdmp-http-head",
48 | "kind" : "execute"
49 | } ]
50 | }
--------------------------------------------------------------------------------
/src/test/ml-modules/rest-properties.xml:
--------------------------------------------------------------------------------
1 |
2 | none
3 | true
4 |
5 | false
6 |
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | return (
9 | test:load-test-file("022-email-test.bpmn", xdmp:database(), "/raw/bpmn/022-email-test.bpmn"),
10 | test:load-test-file("23-payload.xml", xdmp:database(), "/raw/data/23-payload.xml"),
11 | test:load-test-file("25-payload.xml", xdmp:database(), "/raw/data/25-payload.xml"),
12 | test:load-test-file("27-payload.xml", xdmp:database(), "/raw/data/27-payload.xml"),
13 | test:load-test-file("RejectedEmail.txt", xdmp:database(), "/raw/data/RejectedEmail.txt")
14 | )
15 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (
3 | xdmp:directory-delete("/"),
4 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5 | )
6 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/test-data/23-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 022-email-test__1__0
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/test-data/25-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 022-email-test__1__0
3 | email-sub-test
4 |
5 | Some folder alerting domain
6 | directory
7 | /some/
8 | 0
9 |
10 |
11 | /test/email/sub
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/test-data/27-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | B
3 | C
4 |
5 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-email/test-data/RejectedEmail.txt:
--------------------------------------------------------------------------------
1 |
4 | Document Rejected
5 |
6 |
7 | MarkLogic Admin
8 | admin@example.com
9 |
10 |
11 |
12 |
13 | {$wf:process/wf:data/RecipientName/text()}
14 | {$wf:process/wf:data/RecipientEmail/text()}
15 |
16 |
17 |
18 |
19 |
20 | V2 sample rejection message
21 |
22 |
23 | Document rejected
24 | Your document {xs:string($wf:process/wf:attachments/wf:attachment[@name='Document']/@uri)} was rejected.
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-conditional/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | return (
9 | test:load-test-file("fork-conditional.bpmn2", xdmp:database(), "/raw/bpmn/fork-conditional.bpmn2"),
10 | test:load-test-file("payload.xml", xdmp:database(), "/raw/data/payload.xml")
11 | )
12 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-conditional/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (
3 | xdmp:directory-delete("/"),
4 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5 | )
6 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-conditional/test-data/payload.xml:
--------------------------------------------------------------------------------
1 |
2 | fork-conditional__1__0
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-within-fork/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | return (
9 | test:load-test-file("fork-within-fork.bpmn2", xdmp:database(), "/raw/bpmn/fork-within-fork.bpmn2"),
10 | test:load-test-file("payload.xml", xdmp:database(), "/raw/data/payload.xml")
11 | )
12 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-within-fork/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (
3 | xdmp:directory-delete("/"),
4 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5 | )
6 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork-within-fork/test-data/payload.xml:
--------------------------------------------------------------------------------
1 |
2 | fork-simple__1__0
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 |
6 | let $_modules-import := deploy:deploy()
7 |
8 | return (
9 | test:load-test-file("payload.xml", xdmp:database(), "/raw/data/payload.xml"),
10 | test:load-test-file("fork-simple.bpmn2", xdmp:database(), "/raw/bpmn/fork-simple.bpmn2") (: ,
11 | test:load-test-file("13-payload.xml", xdmp:database(), "/raw/data/13-payload.xml") :)
12 | )
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (
3 | xdmp:directory-delete("/"),
4 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5 | )
6 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-fork/test-data/payload.xml:
--------------------------------------------------------------------------------
1 |
2 | fork-simple__1__0
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
6 |
7 |
8 | let $_modules-import := deploy:deploy()
9 | let $_lock-fail-user := uh:create-user("test-workflow-user", "test-workflow-user",
10 | ("workflow-role-unit-test", "rest-reader", "rest-writer") )
11 |
12 | return (
13 | test:load-test-file("015-restapi-tests.bpmn", xdmp:database(), "/raw/bpmn/015-restapi-tests.bpmn"),
14 | test:load-test-file("06-payload.xml", xdmp:database(), "/raw/data/06-payload.xml"),
15 | test:load-test-file("13-payload.xml", xdmp:database(), "/raw/data/13-payload.xml"),
16 | test:load-test-file("14-payload.xml", xdmp:database(), "/raw/data/14-payload.xml")
17 | )
18 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
3 |
4 | let $tidyup := uh:remove-user("test-workflow-user")
5 | let $clean-data := (xdmp:directory-delete("/"), xdmp:collection-delete("http://marklogic.com/cpf/pipelines"))
6 | return ()
7 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/06-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 015-restapi-tests__1__2
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/09-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/11-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/12-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/13-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data created on request to unlock
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/14-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data added by complete action
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-json/test-data/15-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data added by complete action
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
6 |
7 | let $_modules-import := deploy:deploy()
8 | let $_lock-fail-user := uh:create-user("test-workflow-user", "test-workflow-user",
9 | ("workflow-role-unit-test", "rest-reader", "rest-writer") )
10 |
11 | return (
12 | test:load-test-file("015-restapi-tests.bpmn", xdmp:database(), "/raw/bpmn/015-restapi-tests.bpmn"),
13 | test:load-test-file("06-payload.xml", xdmp:database(), "/raw/data/06-payload.xml"),
14 | test:load-test-file("09-payload.xml", xdmp:database(), "/raw/data/09-payload.xml"),
15 | test:load-test-file("11-payload.xml", xdmp:database(), "/raw/data/11-payload.xml"),
16 | test:load-test-file("12-payload.xml", xdmp:database(), "/raw/data/12-payload.xml"),
17 | test:load-test-file("13-payload.xml", xdmp:database(), "/raw/data/13-payload.xml")
18 | )
19 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
3 |
4 | let $tidyup := uh:remove-user("test-workflow-user")
5 | let $clean-data := (xdmp:directory-delete("/"), xdmp:collection-delete("http://marklogic.com/cpf/pipelines"))
6 | return ()
7 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/06-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | 015-restapi-tests__1__2
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/09-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/11-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/12-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/13-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data created on request to unlock
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/e2e-rest-process-xml/test-data/15-payload.xml:
--------------------------------------------------------------------------------
1 |
2 | {PID}
3 |
4 | Some data added by complete action
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/inclusive-gateway/lib/constants.xqy:
--------------------------------------------------------------------------------
1 | module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway";
2 |
3 | declare option xdmp:mapping "false";
4 |
5 | declare variable $TEST-01-MODEL-NAME := "InclusiveGatewayTest-01";
6 | declare variable $TEST-02-MODEL-NAME := "InclusiveGatewayTest-02";
7 | declare variable $TEST-MODEL-NAMES := ($TEST-01-MODEL-NAME,$TEST-02-MODEL-NAME);
8 | declare variable $TEST-FILES := $TEST-MODEL-NAMES ! file-name-for-model(.);
9 | declare variable $TEST-PID-DIR := "/test/pid/";
10 |
11 | declare function file-name-for-model($model-name as xs:string){
12 | $model-name||".bpmn"
13 | };
14 |
15 | declare function expected-model-id($model-name) as xs:string{
16 | $model-name||"__1__0"
17 | };
18 |
19 | declare function test-pid-uri($model-name as xs:string) as xs:string{
20 | $TEST-PID-DIR||$model-name||".xml"
21 | };
22 |
23 | declare function save-pid($pid,$model-name){
24 | let $pid-content := element test-constants:pid{$pid}
25 | return
26 | xdmp:document-insert(test-pid-uri($model-name),$pid-content)
27 | };
28 |
29 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/inclusive-gateway/setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test-config = "http://marklogic.com/test-config" at "/test/test-config.xqy";
4 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
5 | import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "/test/suites/inclusive-gateway/lib/constants.xqy";
6 |
7 |
8 | for $test-file in $test-constants:TEST-FILES
9 | let $target-uri := test-config:local-uri-for-test-file($test-file)
10 | return
11 | test:load-test-file($test-file, xdmp:database(), $target-uri)
12 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/inclusive-gateway/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | (
3 | xdmp:directory-delete("/"),
4 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
5 | )
6 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process-subscription/lib/constants.xqy:
--------------------------------------------------------------------------------
1 | module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway";
2 |
3 | declare option xdmp:mapping "false";
4 |
5 | declare variable $TEST-02-MODEL-NAME := "InclusiveGatewayTest-02";
6 | declare variable $TEST-MODEL-NAMES := ($TEST-02-MODEL-NAME);
7 | declare variable $TEST-FILES := $TEST-MODEL-NAMES ! file-name-for-model(.);
8 | declare variable $TEST-PID-DIR := "/test/pid/";
9 | declare variable $DOMAIN-NAME := "process-subscription-test-domain";
10 | declare variable $SUBSCRIPTION-NAME := "process-subscription-test-subscription";
11 | declare variable $MONITORED-DIRECTORY := "/test/process-subscription/monitored-directory/";
12 |
13 |
14 | declare function file-name-for-model($model-name as xs:string){
15 | $model-name||".bpmn"
16 | };
17 |
18 | declare function expected-model-id($model-name) as xs:string{
19 | $model-name||"__1__0"
20 | };
21 |
22 | declare function test-pid-uri($model-name as xs:string) as xs:string{
23 | $TEST-PID-DIR||$model-name||".xml"
24 | };
25 |
26 | declare function save-pid($pid,$model-name){
27 | let $pid-content := element test-constants:pid{$pid}
28 | return
29 | xdmp:document-insert(test-pid-uri($model-name),$pid-content)
30 | };
31 |
32 | declare function expected-subscription-id($subscription-name as xs:string) as xs:string{"/config/alerts/"||$subscription-name};
33 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process-subscription/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test-config = "http://marklogic.com/test-config" at "/test/test-config.xqy";
4 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
5 | import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "lib/constants.xqy";
6 |
7 |
8 | for $test-file in $test-constants:TEST-FILES
9 | let $target-uri := test-config:local-uri-for-test-file($test-file)
10 | return
11 | test:load-test-file($test-file, xdmp:database(), $target-uri)
12 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process-subscription/suite-teardown.xqy:
--------------------------------------------------------------------------------
1 | import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "lib/constants.xqy";
2 | import module namespace const="http://marklogic.com/test/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/test" 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
13 | (
14 | (: Delete model files :)
15 | cts:uris()[fn:matches(.,test-constants:file-name-for-model($process-model-name))] ! xdmp:document-delete(.),
16 | (: Delete associated pipelines :)
17 | //p:pipeline-name[fn:matches(.,$process-model-name)] ! xdmp:document-delete(fn:base-uri(.))
18 | )
19 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process/lib/constants.xqy:
--------------------------------------------------------------------------------
1 | module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway";
2 |
3 | declare option xdmp:mapping "false";
4 |
5 | declare variable $TEST-02-MODEL-NAME := "InclusiveGatewayTest-02";
6 | declare variable $TEST-MODEL-NAMES := ($TEST-02-MODEL-NAME);
7 | declare variable $TEST-FILES := $TEST-MODEL-NAMES ! file-name-for-model(.);
8 | declare variable $TEST-PID-DIR := "/test/pid/";
9 |
10 | declare function file-name-for-model($model-name as xs:string){
11 | $model-name||".bpmn"
12 | };
13 |
14 | declare function expected-model-id($model-name) as xs:string{
15 | $model-name||"__1__0"
16 | };
17 |
18 | declare function test-pid-uri($model-name as xs:string) as xs:string{
19 | $TEST-PID-DIR||$model-name||".xml"
20 | };
21 |
22 | declare function save-pid($pid,$model-name){
23 | let $pid-content := element test-constants:pid{$pid}
24 | return
25 | xdmp:document-insert(test-pid-uri($model-name),$pid-content)
26 | };
27 |
28 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process/suite-setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test-config = "http://marklogic.com/test-config" at "/test/test-config.xqy";
4 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
5 | import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "lib/constants.xqy";
6 |
7 |
8 | for $test-file in $test-constants:TEST-FILES
9 | let $target-uri := test-config:local-uri-for-test-file($test-file)
10 | return
11 | test:load-test-file($test-file, xdmp:database(), $target-uri)
12 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/process/suite-teardown.xqy:
--------------------------------------------------------------------------------
1 | import module namespace test-constants = "http://marklogic.com/workflow/test-constants/inclusive-gateway" at "lib/constants.xqy";
2 | import module namespace const="http://marklogic.com/test/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/test" 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
13 | (
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 | )
27 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/setup.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
4 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
5 | (: import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy"; :)
6 | import module namespace wsh = "http://marklogic.com/workflow/setup" at "/test/workflow-setup-help.xqy";
7 |
8 | let $_modules-import := deploy:deploy()
9 |
10 | let $properties := wsh:get-file("/test/suites/workflow-util/test-data/process-properties.xml")/prop:properties/*
11 | return (
12 | test:load-test-file("process-main.xml", xdmp:database(), "/workflow/processes/fork-simple__1__0/4daff6c3-aba5-4c02-bf38-6cf1bcb8d44c-2018-01-09T16:23:48.244058Z.xml"),
13 | xdmp:document-set-collections("/workflow/processes/fork-simple__1__0/4daff6c3-aba5-4c02-bf38-6cf1bcb8d44c-2018-01-09T16:23:48.244058Z.xml", "http://marklogic.com/workflow/processes"),
14 | xdmp:document-set-properties("/workflow/processes/fork-simple__1__0/4daff6c3-aba5-4c02-bf38-6cf1bcb8d44c-2018-01-09T16:23:48.244058Z.xml", $properties)
15 | )
16 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/teardown.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | let $_clean-data := (
4 | xdmp:directory-delete("/"),
5 | xdmp:collection-delete("http://marklogic.com/cpf/pipelines")
6 | )
7 | return ()
8 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/test-data/process-main-2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 2018-01-09T16:23:49.715305Z
17 | ProcessEngine
18 | http://marklogic.com/states/initial
19 | Completed step
20 |
21 |
22 |
23 |
24 | 2018-01-09T16:23:50.155466Z
25 | ProcessEngine
26 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
27 | Completed step
28 |
29 |
30 |
31 |
32 |
33 |
34 | http://marklogic.com/states/initial
35 | 2018-01-09T16:23:49.715305Z
36 | 2018-01-09T16:23:49.715305Z
37 | PT0S
38 | true
39 |
40 |
41 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
42 | 2018-01-09T16:23:50.155466Z
43 | 2018-01-09T16:23:50.155466Z
44 | PT0S
45 | true
46 |
47 |
48 | fork-simple__1__0
49 |
50 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/test-data/process-main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | B
5 | C
6 | admin
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 2018-01-09T16:23:49.715305Z
17 | ProcessEngine
18 | http://marklogic.com/states/initial
19 | Completed step
20 |
21 |
22 |
23 |
24 | 2018-01-09T16:23:50.155466Z
25 | ProcessEngine
26 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
27 | Completed step
28 |
29 |
30 |
31 |
32 |
33 |
34 | http://marklogic.com/states/initial
35 | 2018-01-09T16:23:49.715305Z
36 | 2018-01-09T16:23:49.715305Z
37 | PT0S
38 | true
39 |
40 |
41 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
42 | 2018-01-09T16:23:50.155466Z
43 | 2018-01-09T16:23:50.155466Z
44 | PT0S
45 | true
46 |
47 |
48 | fork-simple__1__0
49 |
50 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/test-data/process-properties-2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | done
4 | 0d72017683d9db991cc2e770f20ec474
5 | 2018-01-09T17:27:35.439963Z
6 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
7 | 2018-01-09T16:23:50.155466Z
8 | COMPLETE
9 | /workflow/processes/fork-simple__1__0/5daff6c3-aba5-4c02-bf38-6cf1bcb8d44c-2018-01-09T16:23:48.244058Z.xml
10 |
11 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/suites/workflow-util/test-data/process-properties.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | done
4 | 0d72017683d9db991cc2e770f20ec474
5 | 2018-01-09T17:27:35.439963Z
6 | http://marklogic.com/states/fork-simple__1__0/StartEvent_1
7 | 2018-01-09T16:23:50.155466Z
8 | COMPLETE
9 | /workflow/processes/fork-simple__1__0/4daff6c3-aba5-4c02-bf38-6cf1bcb8d44c-2018-01-09T16:23:48.244058Z.xml
10 |
11 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/test-config.xqy:
--------------------------------------------------------------------------------
1 | (:
2 | Copyright 2012 MarkLogic Corporation
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | :)
16 | xquery version "1.0-ml";
17 |
18 | module namespace c = "http://marklogic.com/test-config";
19 |
20 | (: configured at deploy time by Roxy deployer :)
21 | declare variable $c:USER := "%%mlUsername%%";
22 | declare variable $c:PASSWORD := "%%mlPassword%%";
23 | declare variable $c:RESTHOST := "localhost";
24 | declare variable $c:RESTPORT := "%%mlTestRestPort%%";
25 | declare variable $LOCAL-TEST-DATA-DIR := "/raw/bpmn/";
26 | declare variable $SLEEP-FOR-ASYNC := 5; (: Sleep period required, in seconds, for async tasks :)
27 |
28 | declare function local-uri-for-test-file($test-file-name as xs:string){
29 | $LOCAL-TEST-DATA-DIR||$test-file-name
30 | };
31 |
32 | declare function test-sleep(){
33 | xdmp:sleep($SLEEP-FOR-ASYNC * 1000)
34 | };
35 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/workflow-constants.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 |
3 | module namespace const = "http://marklogic.com/test/workflow-constants";
4 | import module namespace c="http://marklogic.com/test-config" at "/test/test-config.xqy";
5 |
6 | (: configured at deploy time by Roxy deployer :)
7 | declare variable $const:USER := $c:USER;
8 | declare variable $const:PASSWORD := $c:PASSWORD;
9 | declare variable $const:RESTHOST := $c:RESTHOST;
10 | declare variable $const:RESTPORT := $c:RESTPORT;
11 |
12 | (: to do - change to send json too :)
13 | declare variable $const:json-options :=
14 |
15 |
16 | {$const:USER}
17 | {$const:PASSWORD}
18 |
19 |
20 | application/xml
21 | application/json
22 |
23 | ;
24 |
25 | declare variable $const:xml-options :=
26 |
27 |
28 | {$const:USER}
29 | {$const:PASSWORD}
30 |
31 |
32 | application/xml
33 | application/xml
34 |
35 | ;
36 |
37 | declare variable $const:json-failure-options :=
38 |
39 |
40 | test-workflow-user
41 | test-workflow-user
42 |
43 |
44 | application/xml
45 | application/json
46 |
47 | ;
48 |
49 | declare variable $const:xml-failure-options :=
50 |
51 |
52 | test-workflow-user
53 | test-workflow-user
54 |
55 |
56 | application/xml
57 | application/xml
58 |
59 | ;
60 |
61 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/workflow-setup-help.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | module namespace wsh = "http://marklogic.com/workflow/setup";
3 |
4 | import module namespace test = "http://marklogic.com/test" at "/test/test-helper.xqy";
5 | import module namespace deploy = "http://marklogic.com/test/deploy-rest-resources" at "/test/workflow-deploy-rest-resources.xqy";
6 | import module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper" at "/test/workflow-users-test-helper.xqy";
7 |
8 | declare function wsh:get-bpmn($filename as xs:string) {
9 | let $binary := test:get-modules-file(fn:concat("/test/bpmn/", $filename))
10 | let $bpmn-uri := fn:concat("/raw/bpmn/", $filename)
11 | let $text := xdmp:unquote(xdmp:quote($binary))
12 | return xdmp:document-insert($bpmn-uri, $text, xdmp:default-permissions(), xdmp:default-collections() )
13 | };
14 |
15 | declare function wsh:e2e-setup() {
16 | let $_modules-import := deploy:deploy()
17 | return uh:create-user("test-workflow-user", "test-workflow-user",
18 | ("workflow-role-unit-test", "rest-reader", "rest-writer"))
19 | };
20 |
21 | declare function wsh:get-file($uri as xs:string) {
22 | xdmp:eval('
23 | declare variable $uri as xs:string external;
24 | fn:doc($uri)
25 | ',
26 | (xs:QName('uri'), $uri),
27 |
28 | {xdmp:modules-database()}
29 | )
30 | };
31 |
--------------------------------------------------------------------------------
/src/test/ml-modules/root/test/workflow-users-test-helper.xqy:
--------------------------------------------------------------------------------
1 | xquery version "1.0-ml";
2 | module namespace uh = "http://marklogic.com/test-models/workflow-users-test-helper";
3 |
4 | import module namespace sec = 'http://marklogic.com/xdmp/security' at '/MarkLogic/security.xqy';
5 |
6 | declare function uh:create-user($username as xs:string, $password as xs:string, $role-names as xs:string*){
7 | xdmp:invoke-function(
8 | function() {
9 | try {
10 | sec:create-user($username, 'DELETE THIS USER IF TESTS ARE NOT BEING RUN!', $password, $role-names, (), (), ())
11 | } catch ($e) {
12 | if($e/*:code = 'SEC-USEREXISTS') then 'already exists' else fn:error($e)
13 | }
14 | },
15 | map:entry('database', xdmp:database("Security"))
16 | )
17 | };
18 |
19 | declare function uh:remove-user($username as xs:string){
20 | xdmp:invoke-function(
21 | function() {
22 | if (sec:user-exists($username))
23 | then sec:remove-user($username)
24 | else ()
25 | },
26 | map:entry('database', xdmp:database("Security"))
27 | )
28 | };
29 |
30 | declare function uh:create-role(
31 | $rolename as xs:string,
32 | $role-names as xs:string*,
33 | $collections as xs:string*)
34 | {
35 | xdmp:invoke-function(
36 | function() {
37 | try {
38 | sec:create-role($rolename, 'DELETE THIS ROLE IF TESTS ARE NOT BEING RUN!', $role-names, (), $collections)
39 | } catch ($e) {
40 | if($e/*:code = 'SEC-ROLEEXISTS') then 'already exists' else fn:error($e)
41 | }
42 | },
43 | map:entry('database', xdmp:database("Security"))
44 | )
45 | };
46 |
47 | declare function uh:remove-role($rolename as xs:string){
48 | xdmp:invoke-function(
49 | function() {
50 | if (sec:role-exists($rolename))
51 | then sec:remove-role($rolename)
52 | else ()
53 | },
54 | map:entry('database', xdmp:database("Security"))
55 | )
56 | };
57 |
--------------------------------------------------------------------------------
/version.txt:
--------------------------------------------------------------------------------
1 | 1.7.7
2 |
--------------------------------------------------------------------------------