Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The purpose of this page is to describe different methods that can be used to include a custom BPMN workflow to ONAP SO (Casablanca Release)

...

Prerequisite : For ONAP casablanca release, Camunda apps are not exposed by default, so in order to be able to access Camunda applications (rest-engine, cockpit, tasklist,..), you need to expose the so-bpmn-infra deployment in your running ONAP instance.

Ex. : use "kubectl -n onapĀ  expose deployment onap-so-so-bpmn-infra --type=NodePort --name=onap-so-bpmn-infra-svc-expose" to get a new port for camunda applications pod.

Using Camunda Modeler deploy option

    1. Open the workflow using the Camunda modeler application.
    2. Click "deploy" button.
    3. Enter the deployment name (can be any name you like to use).
    4. Enter ONAP-SO camunda REST engine URI :
      1. Use your ONAP IP address & "so-bpmn-infra" deployment exposed port number.
      2. Note that for ONAP-SO casablanca release, the URI path is

        http://{{onap_LB@}}:{{camunda_Pod_Port}}/sobpmnengine/deployment/create

        instead of the original Camunda URI "engine-rest/deployment/create".

    5. Select "None" for authentication.
    6. Click Deploy.
    7. For successful deployment you should receive " Deployment Successful" message.
    8. Use the Camunda cockpit application to view your custom workflow.

...

    1. This method is useful in case you need to include some script files in your deployment.
    2. Specify Script format (JavaScript, groovy,..).
    3. Specify Script type as "External Script" in your script task.
    4. Refer to the script name using URI "deployment://{{script_file_name}}".
    5. Use below cURL command to deploy the BPMN file and its associated scripts to your running ONAP instance

      curl -w \

      -H "Accept: application/json" \

      -F "deployment-name=rest-test" \

      -F "enable-duplicate-filtering=false" \

      -F "deploy-changed-only=falses" \

      -F "ExternalScript.bpmn=@/PATH_TO_BPMN_File/ExternalScript.bpmn" \

      -F "externalScript.js=@/PATH_TO_SCRIPT_File/externalScript.js" \

      http://{{onap_LB@}}:{{camunda_Pod_Port}}/sobpmnengine/deployment/create


    6. Use the Camunda cockpit application to view your custom workflow.

...

You can run the workflow directly using below URI

http://{{onap_LB@}}:{{camunda_Pod_Port}}/sobpmnengine/process-definition/key/{{BPMN_NAME}}/start

The above link will bypass the API handler and run the required workflow directly.

To be able to run the workflows via the APIhandler, you first need to manually create a link between the service UUID and the associated workflow id in the service, service_recipe and vnf_recipe tables in SO db (catalogdb) , in order to have SO trigger the custom workflow when the createinstance action is triggered to so API handler.

...