seshukm | 107e0c4 | 2017-11-06 10:31:04 +0530 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
| 3 | .. Copyright 2017 Huawei Technologies Co., Ltd.
|
| 4 |
|
| 5 | BPMN Main Process Flows
|
| 6 | ========================
|
| 7 |
|
| 8 | Characteristics
|
| 9 | ----------------
|
| 10 |
|
| 11 | **Invoked by an API Handler**
|
| 12 |
|
| 13 | 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:
|
| 14 |
|
| 15 | * The original request received by the API handler from the portal or other client.
|
| 16 | * Metadata such as the request-id generated by the API Handler for the request.
|
| 17 | * The name of the BPMN process to execute (obtained by the API Handler from the mso_catalog.service_recipe table.
|
| 18 |
|
| 19 | **Asynchronous Service Model**
|
| 20 |
|
| 21 | 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.
|
| 22 |
|
| 23 | 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)
|
| 24 |
|
| 25 | **Typically calls one or more subprocess flows**
|
| 26 |
|
| 27 | Main process flows usually implement the high-level service logic, delegating the "real" work to reusable subflows (Building Blocks) or custom subflows
|
| 28 |
|
| 29 | **Handles "Completion" and "Fallout" tasks**
|
| 30 |
|
| 31 | "Completion" tasks are those that occur when the process ends successfully, and "Fallout" tasks are those that occur when the process fails. Activities include:
|
| 32 |
|
| 33 | * Updating the mso_requests database.
|
| 34 | * Rolling back uncompleted work.
|
| 35 | * Sending an asynchronous callback notification.
|
| 36 |
|
| 37 | Example: CreateVfModuleVolumeInfraV1.bpmn
|
| 38 | ------------------------------------------
|
| 39 |
|
| 40 | .. image:: images/BPMN_Main_Process_Flows_1.png |