aboutsummaryrefslogtreecommitdiffstats
path: root/docs/bpmn
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2018-08-21 20:49:19 +0800
committerseshukm <seshu.kumar.m@huawei.com>2018-08-21 20:50:04 +0800
commitcb4f87025be4cb4b5466abc186c3785d003ef770 (patch)
tree3272149afc37c6656406110ad76ef05608acf6f9 /docs/bpmn
parent9c58cdde6b5d63ffbc41ae7725313ed6a96ddd1c (diff)
Fix the structure in the doc for bpmn
Issue-ID: SO-675 Change-Id: I2dc7bc2f77b191a60206678a6fe25bd2ef81f83c Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'docs/bpmn')
-rw-r--r--docs/bpmn/BPMN_Main_Process_Flows.rst40
-rw-r--r--docs/bpmn/BPMN_Project_Deployment_Strategy.rst35
-rw-r--r--docs/bpmn/BPMN_Project_Structure.rst47
-rw-r--r--docs/bpmn/BPMN_Subprocess_Process_Flows.rst32
-rw-r--r--docs/bpmn/Camunda_Cockpit_Community_Edition.rst44
-rw-r--r--docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst143
-rw-r--r--docs/bpmn/Camunda_Modeler.rst19
7 files changed, 360 insertions, 0 deletions
diff --git a/docs/bpmn/BPMN_Main_Process_Flows.rst b/docs/bpmn/BPMN_Main_Process_Flows.rst
new file mode 100644
index 0000000000..43e08ffd9c
--- /dev/null
+++ b/docs/bpmn/BPMN_Main_Process_Flows.rst
@@ -0,0 +1,40 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+BPMN Main Process Flows
+========================
+
+Characteristics
+----------------
+
+**Invoked by an API Handler**
+
+ The BPMN application (war) exposes a REST endpoint to which the API Handler(s) send requests for flow execution. The message sent by the API Handler to this endpoint is a JSON wrapper containing:
+
+ * The original request received by the API handler from the portal or other client.
+ * Metadata such as the request-id generated by the API Handler for the request.
+ * The name of the BPMN process to execute (obtained by the API Handler from the mso_catalog.service_recipe table.
+
+**Asynchronous Service Model**
+
+ All main process flows implement an asynchronous service model. The connection to the API Handler is kept open until the main process flow sends back a response. In the flow shown below, this is done by the "Send Sync Ack Response" script task. A flow is expected to send a response after validating the request, but before performing any long running tasks or tasks that could cause the process to be suspended.
+
+ After the synchronous response is sent, the flow continues to execute. When the flow ends, it may optionally send an asynchronous notification to a callback URL provided in the original request (behavior depends on the API agreement)
+
+**Typically calls one or more subprocess flows**
+
+ Main process flows usually implement the high-level service logic, delegating the "real" work to reusable subflows (Building Blocks) or custom subflows
+
+**Handles "Completion" and "Fallout" tasks**
+
+ "Completion" tasks are those that occur when the process ends successfully, and "Fallout" tasks are those that occur when the process fails. Activities include:
+
+ * Updating the mso_requests database.
+ * Rolling back uncompleted work.
+ * Sending an asynchronous callback notification.
+
+Example: CreateVfModuleVolumeInfraV1.bpmn
+------------------------------------------
+
+.. image:: images/BPMN_Main_Process_Flows_1.png \ No newline at end of file
diff --git a/docs/bpmn/BPMN_Project_Deployment_Strategy.rst b/docs/bpmn/BPMN_Project_Deployment_Strategy.rst
new file mode 100644
index 0000000000..50f48363ed
--- /dev/null
+++ b/docs/bpmn/BPMN_Project_Deployment_Strategy.rst
@@ -0,0 +1,35 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+BPMN Project Deployment Strategy
+==================================
+
+Single Application with Embedded Process Engine
+------------------------------------------------
+
+Deployment in SO is currently limited to a single process application: MSOInfrastructureBPMN. The WAR file for this application contains everything needed to execute the infrastructure process flows, including:
+
+ * BPMN process flows, java classes, groovy scripts, and resource files from MSOInfrastructureBPMN itself.
+
+ * BPMN process flows, java classes, groovy scripts, and resource files from other SO projects, like MSOCommonBPMN and MSOCoreBPMN.
+
+ * An embedded Camunda Process Engine to execute the flows.
+
+The process application exposes a REST endpoint to the API Handler(s) for receiving flow execution requests.
+
+Development is required in SO to be able to support one a more versatile deployment strategy, probably one of the following:
+
+Shared Process Engine
+----------------------
+
+The Camunda Process Engine is created and manged as a Wildfly module. This single engine is shared by all process applications.
+
+Multiple Applications, each with an Embedded Process Engine
+-------------------------------------------------------------
+
+More than one application could be deployed, each having its own embedded process engine.
+
+
+
+
diff --git a/docs/bpmn/BPMN_Project_Structure.rst b/docs/bpmn/BPMN_Project_Structure.rst
new file mode 100644
index 0000000000..209ec727c3
--- /dev/null
+++ b/docs/bpmn/BPMN_Project_Structure.rst
@@ -0,0 +1,47 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+BPMN Project Structure
+=======================
+
+BPMN main process flow
+----------------------
+
+A BPMN main process flow is a top-level flow. All main process flows are under the src/main/resources/process folder.
+
+CreateVfModuleVolumeInfraV1 is a main process flow.
+
+.. image:: images/bpmn_project_structure_1.png
+
+Open BPMN files with the camunda modeler (standalone application). To launch the modeler from eclipse, right-click→open-with→Other→Browse. Select Check the boxes on the dialog so that eclipse will open all .bpmn files with the camunda-modeler executable.
+
+BPMN subprocess flow
+---------------------
+
+A BPMN subprocess flow is meant to be invoked by other flows (either main process flows or other subprocess flows). All subprocess flows are under the src/main/resources/subprocess folder.
+
+The CreateVfModuleVolumeInfraV1 process flow is delivered with two custom subflows: DoCreateVfModuleVolumeV2 and DoCreateVfModuleVolumeRollback.
+
+.. image:: images/bpmn_project_structure_2.png
+
+Groovy scripts
+---------------
+
+There is one groovy script for each BPMN file. Groovy scripts are invoked by script tasks within the BPMN flows.
+
+.. image:: images/bpmn_project_structure_3.png
+
+Unit Tests
+-----------
+
+Normally, we create a unit test class for every flow. This one is missing a unit test for its rollback flow.
+
+.. image:: images/bpmn_project_structure_4.png
+
+Unit Test Resource Files
+------------------------
+
+Any files needed by the unit tests are kept under the src/test/resources/__files folder.
+
+.. image:: images/bpmn_project_structure_5.png \ No newline at end of file
diff --git a/docs/bpmn/BPMN_Subprocess_Process_Flows.rst b/docs/bpmn/BPMN_Subprocess_Process_Flows.rst
new file mode 100644
index 0000000000..098f38ff02
--- /dev/null
+++ b/docs/bpmn/BPMN_Subprocess_Process_Flows.rst
@@ -0,0 +1,32 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+BPMN Subprocess Process Flows
+==============================
+
+Characteristics
+----------------
+
+**Invoked by other flows**
+
+ A BPMN Call_Activity_ provides the mechanism to invoke subprocess flows. The Called Element attribute of the Call Activity specifies the name of the subprocess to execute.
+
+.. _Call_Activity: https://docs.camunda.org/manual/7.7/reference/bpmn20/subprocesses/call-activity/
+
+**Input and Output variable mapping**
+
+ In the modeler, you can specify a list of "In Mappings". With this, you can map execution variables from the calling flow to the subprocess. The subprocess always has its own copy of each variable. To transfer values back to the calling flow, you specify "Out Mappings".
+
+**May throw MSOWorkflowException**
+
+ The current best practice for reporting errors from subprocess is described here:
+
+ * The subprocess should create a WorkflowException object and store it in an execution called WorkflowException.
+ * The WorkflowException object contains an error code and an error message.
+ * The subprocess should then throw an MSOWorkflowException BPMN event which may be handled by the calling flow.
+
+Example: VnfAdapterRestV1.bpmn
+-------------------------------
+
+.. image:: images/BPMN_Subprocess_process_flows_1.png
diff --git a/docs/bpmn/Camunda_Cockpit_Community_Edition.rst b/docs/bpmn/Camunda_Cockpit_Community_Edition.rst
new file mode 100644
index 0000000000..a9379decc9
--- /dev/null
+++ b/docs/bpmn/Camunda_Cockpit_Community_Edition.rst
@@ -0,0 +1,44 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+Camunda Cockpit Community Edition
+=================================
+
+On a deployed instance of SO, you can use the Camunda_Cockpit to view BPMN 2.0 workflow definitions in the deployment.
+
+.. _Camunda_Cockpit: https://camunda.org/features/cockpit/
+
+Unfortunately, the Community Edition of Camunda included with SO is not fully featured. It cannot be used to inspect running and completed process instances. For that, the Enterprise Edition is required.
+
+Logging In
+-----------
+
+Because port 8080 on the docker host machine is forwarded to port 8080 in the SO docker container you can log into the cockpit by browsing to this URL:
+
+ http://*dockerhost*:8080/camunda/app/admin/default/#/login
+
+ Where dockerhost is the docker host system.
+
+If you can use a browser on the docker host system, then use a localhost address:
+
+ http://localhost:8080/camunda/app/admin/default/#/login
+
+The user is "admin" and the password is the same as the jboss admin password, which is not displayed here.
+
+.. image:: images/Camunda_Cockpit_1.png
+
+Viewing Process Definitions
+---------------------------
+
+Use the drop-down menu next to the home icon and select the "Cockpit" option:
+
+.. image:: images/Camunda_Cockpit_2.png
+
+The number of deployed process definitions should be displayed. Click on it.
+
+.. image:: images/Camunda_Cockpit_3.png
+
+Now you should see an actual list of deployed process definitions. You can click on any of them to view them.
+
+.. image:: images/Camunda_Cockpit_4.png
diff --git a/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst b/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst
new file mode 100644
index 0000000000..3e2d15bf15
--- /dev/null
+++ b/docs/bpmn/Camunda_Cockpit_Enterprise_Edition.rst
@@ -0,0 +1,143 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+Camunda Cockpit Enterprise Edition
+==================================
+
+The Community Edition of Camunda is the version normally built into SO. With the Community Edition, you can see process definitions, but you cannot inspect running or completed process instances, which is an essential debugging capability. This capability is available only in the Enterprise Edition and requires a commercial license. If you have such a license, you can build SO with the Enterprise Edition. Your use must be consistent with the terms of your license, of course.
+
+With the Enterprise Edition cockpit, you can:
+
+ * See a trace of tasks executed by a running or completed process instance.
+ * Look at execution variables in a running or completed process instance.
+ * Look at called subprocesses in a running or completed process instance.
+
+Maven Repository for Camunda EE Artifacts
+------------------------------------------
+
+To build with Camunda EE, you will need a maven repository containing the Camunda EE artifacts. This can be a nexus repository or a local repository in your filesystem.
+
+To construct a local repository, start with this structure for the 7.7.3-ee version of Camunda:
+
+ camunda-ee-repository.zip_
+
+.. _camunda-ee-repository.zip: https://wiki.onap.org/download/attachments/16001686/camunda-ee-repository.zip?version=1&modificationDate=1507838888000&api=v2
+
+*NOTE*: the zip archive does not contain the actual Enterprise Edition JAR and WAR files. It contains zero-length files as placeholders. You will need to replace the zero-length files with files you obtain from Camunda. The archive does contain all the poms, checksums, and metadata required to make it a functional maven repository.
+
+Here's the minimum set of artifacts you need to build the SO Amsterdam release software:
+
+ camunda-engine-7.7.3-ee.jar
+
+ camunda-webapp-7.7.3-ee-classes.jar
+
+ camunda-webapp-7.7.3-ee.war
+
+ camunda-webapp-ee-jboss-standalone-7.7.3-ee.war
+
+ camunda-engine-cdi-7.7.3-ee.jar
+
+ camunda-engine-rest-7.7.3-ee-classes.jar
+
+ camunda-engine-plugin-spin-7.7.3-ee.jar
+
+ camunda-engine-plugin-connect-7.7.3-ee.jar
+
+ camunda-engine-rest-core-7.7.3-ee.jar
+
+ camunda-engine-feel-api-7.7.3-ee.jar
+
+ camunda-engine-feel-juel-7.7.3-ee.jar
+
+ camunda-engine-dmn-7.7.3-ee.jar
+
+ camunda-engine-spring-7.7.3-ee.jar
+
+ camunda-bpmn-model-7.7.3-ee.jar
+
+ camunda-xml-model-7.7.3-ee.jar
+
+ camunda-dmn-model-7.7.3-ee.jar
+
+ camunda-cmmn-model-7.7.3-ee.jar
+
+Maven settings.xml
+------------------
+
+Add a profile to your maven settings.xml to include the repository containing your Camunda EE artifacts.
+
+For example:
+
+.. code-block:: bash
+
+ <profile>
+ <!-- profile for artifacts not in public repositories -->
+ <id>my-local-artifacts</id>
+ <repositories>
+ <repository>
+ <!-- Local repository for Camunda Enterprise Edition -->
+ <!-- YOU MUST HAVE A VALID LICENSE TO USE THIS -->
+ <id>camunda-ee</id>
+ <name>camunda-ee</name>
+ <url>file:///home/john/onap/camunda-ee-repository</url>
+ </repository>
+ </repositories>
+ </profile>
+
+And add your profile to the list of active profiles:
+
+.. code-block:: bash
+
+ <activeProfiles>
+
+ <activeProfile>my-local-artifacts</activeProfile>
+
+ <activeProfile>openecomp-staging</activeProfile>
+
+ <activeProfile>openecomp-public</activeProfile>
+
+ <activeProfile>openecomp-release</activeProfile>
+
+ <activeProfile>openecomp-snapshots</activeProfile>
+
+ <activeProfile>opendaylight-release</activeProfile>
+
+ <activeProfile>opendaylight-snapshots</activeProfile>
+
+ </activeProfiles>
+
+Building
+--------
+
+Add these options to the mvn command line when you build "so"
+
+.. code-block:: bash
+
+ -Dcamunda.version=7.7.3-ee -Dcamunda.bpm.webapp.artifact=camunda-webapp-ee-jboss-standalone
+
+Installation
+-------------
+
+The cockpit is part of the SO image. There are no special installation requirements. When you log in, you will need to enter your license information. Alternatively, you can insert your license directly into the camundabpmn database before you log in:
+
+.. code-block:: bash
+
+ INSERT INTO camundabpmn.ACT_GE_PROPERTY VALUES ('camunda-license-key','YOUR-LICENCE-KEY-HERE',1);
+
+Logging In
+-----------
+
+Because port 8080 on the docker host machine is forwarded to port 8080 in the SO docker container you can log into the Enterprise Edition cockpit by browsing to this URL:
+
+ http://*dockerhost*:8080/camunda
+
+ Where dockerhost is the docker host system.
+
+If you can use a browser on the docker host system, then use a localhost address:
+
+ http://localhost:8080/camunda
+
+The user is "admin" and the password is the same as the jboss admin password, which is not displayed here.
+
+.. image:: images/Camunda_Cockpit_Enterprise_1.png
diff --git a/docs/bpmn/Camunda_Modeler.rst b/docs/bpmn/Camunda_Modeler.rst
new file mode 100644
index 0000000000..54f3534210
--- /dev/null
+++ b/docs/bpmn/Camunda_Modeler.rst
@@ -0,0 +1,19 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2017 Huawei Technologies Co., Ltd.
+
+Camunda Modeler
+=================
+
+The Camunda_Modeler_ is the editor for BPMN 2.0 process flows. It is a standalone application. NOTE: the Camunda eclipse plugin is no longer supported and should not be used.
+
+.. _Camunda_Modeler: https://docs.camunda.org/manual/latest/modeler/camunda-modeler/
+
+.. image:: images/camunda_modeler_1.png
+
+Modeler Templates
+------------------
+
+Some work has already been done in MSO to develop templates_ for "building block" subprocess flows. When a template is provided for a BPMN element, the modeler displays a custom form for inputting parameters. This significantly simplifies flow construction and reduces the chance of making mistakes.
+
+.. _templates: https://docs.camunda.org/manual/7.7/modeler/camunda-modeler/element-templates/ \ No newline at end of file