--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright 2017 Huawei Technologies Co., Ltd.\r
+\r
+BPMN Main Process Flows\r
+========================\r
+\r
+Characteristics\r
+----------------\r
+\r
+**Invoked by an API Handler**\r
+\r
+ 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:\r
+ \r
+ * The original request received by the API handler from the portal or other client.\r
+ * Metadata such as the request-id generated by the API Handler for the request.\r
+ * The name of the BPMN process to execute (obtained by the API Handler from the mso_catalog.service_recipe table.\r
+ \r
+**Asynchronous Service Model**\r
+ \r
+ 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.\r
+ \r
+ 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)\r
+ \r
+**Typically calls one or more subprocess flows**\r
+\r
+ Main process flows usually implement the high-level service logic, delegating the "real" work to reusable subflows (Building Blocks) or custom subflows\r
+ \r
+**Handles "Completion" and "Fallout" tasks**\r
+\r
+ "Completion" tasks are those that occur when the process ends successfully, and "Fallout" tasks are those that occur when the process fails. Activities include:\r
+ \r
+ * Updating the mso_requests database.\r
+ * Rolling back uncompleted work.\r
+ * Sending an asynchronous callback notification.\r
+\r
+Example: CreateVfModuleVolumeInfraV1.bpmn\r
+------------------------------------------\r
+\r
+.. image:: images/BPMN_Main_Process_Flows_1.png
\ No newline at end of file
--- /dev/null
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+.. Copyright 2017 Huawei Technologies Co., Ltd.\r
+\r
+BPMN Project Structure\r
+=======================\r
+\r
+BPMN main process flow\r
+----------------------\r
+\r
+A BPMN main process flow is a top-level flow. All main process flows are under the src/main/resources/process folder.\r
+\r
+CreateVfModuleVolumeInfraV1 is a main process flow.\r
+\r
+.. image:: images/bpmn_project_structure_1.png\r
+\r
+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.\r
+\r
+BPMN subprocess flow\r
+---------------------\r
+\r
+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.\r
+\r
+The CreateVfModuleVolumeInfraV1 process flow is delivered with two custom subflows: DoCreateVfModuleVolumeV2 and DoCreateVfModuleVolumeRollback.\r
+\r
+.. image:: images/bpmn_project_structure_2.png\r
+\r
+Groovy scripts\r
+---------------\r
+\r
+There is one groovy script for each BPMN file. Groovy scripts are invoked by script tasks within the BPMN flows.\r
+\r
+.. image:: images/bpmn_project_structure_3.png\r
+\r
+Unit Tests\r
+-----------\r
+\r
+Normally, we create a unit test class for every flow. This one is missing a unit test for its rollback flow.\r
+\r
+.. image:: images/bpmn_project_structure_4.png\r
+\r
+Unit Test Resource Files\r
+------------------------\r
+\r
+Any files needed by the unit tests are kept under the src/test/resources/__files folder.\r
+\r
+.. image:: images/bpmn_project_structure_5.png
\ No newline at end of file
Create a new VM in VirtualBox for Ubuntu\r
----------------------------------------\r
Type: Linux\r
+\r
Version: Ubuntu (64-bit)\r
+\r
At least 2048 MB memory\r
+\r
At least 40 GB VDI\r
+\r
Network: Attached to: NAT\r
\r
Create a port-forwarding rule for SSH\r
-------------------------------------\r
Create a port-forwarding rule so that you can use PuTTY (or other SSH client) to connect to the VM.\r
+\r
Go to "Network" settings in VirtualBox, add a port forwarding rule:\r
+\r
Name: SSH\r
+\r
Protocol: TCP\r
+\r
Host IP: 127.0.0.1\r
+\r
Host Port: 1022\r
+\r
Guest IP: <leave blank>\r
+\r
Guest Port: 22\r
\r
+.. image:: images/Configure_ubuntu_SO_1.png\r
+\r
+.\r
+\r
+.. image:: images/Configure_ubuntu_SO_2.png\r
+\r
Create Shared Folder\r
--------------------\r
This is oriented to Windows users. If you're using a MAC or a Linux host computer, the details may be different. You can share any folder on the host computer with the Ubuntu VM. On Windows, a practical choice is to share the C:\Users folder, so that your Windows home directory will be accessible from the Ubuntu VM.\r
+\r
Go to "Shared Folders" settings in VirtualBox, add a share:\r
+\r
Folder Path: C:\Users\r
+\r
Folder Name: Users\r
+\r
Auto-mount: <checked>\r
+\r
Read-only: <unchecked>\r
\r
+.. image:: images/Configure_ubuntu_SO_3.png\r
+\r
+.\r
+\r
+.. image:: images/Configure_ubuntu_SO_4.png\r
+\r
Install Ubuntu in the VM\r
------------------------\r
On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your Ubuntu ISO image.\r
\r
+.. image:: images/Configure_ubuntu_SO_5.png\r
+\r
After selecting the ISO image, start the VM.\r
+\r
Follow the prompts to install Ubuntu.\r
\r
Proxy Configuration (optional)\r
------------------------------\r
If you're behind a corporate firewall, configure some proxy settings. NOTE: your proxy configuration may require username and password credentials, not shown here.\r
**Ubuntu system proxy setting:**\r
+\r
System Settings → Network → Network proxy\r
+ \r
(Replace "proxyhost" and port with your actual proxy information)\r
\r
+.. image:: images/Configure_ubuntu_SO_6.png\r
+ \r
**apt proxy setting:**\r
Edit /etc/apt/apt.conf and add one line at the top (replace "proxyhost:port" with your actual proxy information):\r
+ \r
Acquire::http::Proxy "http://proxyhost:port";\r
+ \r
Reboot the VM.\r
\r
Install SSH Server\r
------------------\r
-sudo apt update\r
-sudo apt install openssh-server\r
+\r
+.. code-block:: bash\r
+\r
+ sudo apt update\r
+ sudo apt install openssh-server\r
\r
Connect to the VM from your host computer\r
-----------------------------------------\r
The PuTTY SSH client is popular. A connection to localhost:1022 (or whatever port you have forwarded) will go to the VM.\r
\r
+.. image:: images/Configure_ubuntu_SO_7.png\r
+ \r
Install VirtualBox Guest Additions\r
----------------------------------\r
On the "Storage" panel in VirtualBox, click on "[ optical drive ]" and then "Choose Disk Image". Select your VirtualBox Guest Additions ISO image.\r
\r
+.. image:: images/Configure_ubuntu_SO_8.png\r
+\r
In a VM terminal window, mount the cdrom:\r
+\r
+.. code-block:: bash\r
+\r
sudo mkdir -p /media/cdrom\r
sudo mount /dev/cdrom /media/cdrom\r
+ \r
Install necessary dependencies:\r
- sudo apt update\r
- sudo apt install gcc g++ dkms\r
+\r
+.. code-block:: bash\r
+\r
+ sudo apt update\r
+ sudo apt install gcc g++ dkms\r
+ \r
Install the guest additions. NOTE: look for errors in the command output! If you see an error that says you are missing kernel headers, the most likely cause is that you are using a VirtualBox version that is too old. The error message is misleading.\r
+\r
+.. code-block:: bash\r
+\r
cd /media/cdrom\r
sudo ./VBoxLinuxAdditions.run\r
\r
+.. image:: images/Configure_ubuntu_SO_9.png \r
+ \r
Add yourself to the vboxsf user group (replace "userid" with your user ID):\r
+ \r
+.. code-block:: bash \r
+ \r
sudo usermod -a -G vboxsf userid\r
+ \r
Reboot the VM.\r
+\r
In a VM terminal window, verify that you can access your home directory on the host computer, which should be mounted under here:\r
/media/sf_Users\r
\r
Further Reading\r
---------------------------------------- \r
-https://wiki.onap.org/display/DW/Development+Environment
\ No newline at end of file
+\r
+.. toctree::\r
+ :maxdepth: 1\r
+\r
+ Install_Docker.rst\r
+ Configure_git_and_gerrit.rst\r
+ Workspace_and_Development_Tools.rst
\ No newline at end of file