MOND Cloud by ConnectGlobalOne

Lesson 7

Create and run your first BPM Application


In this lesson you will learn how to create and run a simple 'Request Call Back' BPM Application.

The Business Application:

  • Displays a form to collect a user’s name and phone number. For example, the user may be requesting information on a product, or signing up to a service.
  • Calls a process that runs a script to generate a message containing the name and phone number.
  • Displays a form requesting that the recipient of the work item call the user.

You should work through each section in turn to complete the tutorial. Although it uses a very simple example, this tutorial demonstrates some of the fundamental points of the analysis phase for any business service:

  • designing the process flow;
  • creating and assigning the data required by the process;
  • creating and assigning the participants who will be involved in the process;
  • placing and describing tasks such as scripts (or services) that will be implemented later by the solution designer.

After completing the tutorial, you should be familiar with the basic steps involved in creating a process design.

The following are the main steps involved in creating and running the BPM Application.

  • Create a Class
  • Create a Form
  • Create a Process
  • Run the Process

Now, let us complete each of these steps.

Create Forms


This Process requires two forms. One form to collect the Request call back information from a person and another form to display the Request call back information to the Customer support officer.


Create Request call back form


In this section we will create a Form to capture the Name and Phone number of the requesting person.


  • Click here to login to MOND BPM
  • Navigate to Designer -> Data Form Designer. List of existing Forms will be displayed

MOND Forms


  • On the menu bar, click Add New.(A new window will open)

MOND Forms


  • Enter 'Request Call Back' as the name of the Form and click Save. The Form will be saved and a Form Design window will be displayed.

MOND Forms


  • In this example, we will create the following fields:
  • A Heading field
  • Line Break
  • A data field with Label Your Full Name
  • A data field with Label Your Phone number

  • You can define Form fields by adding rows in the Form Fields table. To add a field please click the Add icon in the botton of the table.
  • Click Add New Row
  • In the Field Id column enter f1. Enter Request Call Back in the label field and choose Heading as the component type and press enter.
  • Click Add New Row
  • In the Field Id column enter f2. Choose Line Break as the component type and press enter.
  • Click Add New Row
  • In the Field Id column enter f3. Enter 'Your Full Name' in the label field and choose Data Field as the component type and press enter.
  • In the Field Id column enter f4. Enter 'Your Phone Number' in the label field and choose Data Field as the component type and press enter.
  • Click Save Form to save your changes.
  • Click the Preview tab to view your form.
  • You will notice that both the name and the phone number fields are in the same line.
  • You can edit a Field by clicking on any cell of the table for the corresponding field and you can delete a Field by clicking the Delete icon.

MOND Forms

After adding all the Form Fields, you can define properties for each of the fields. The properties will allow you to define the width & placement of the field.

  • In order to define the property for a field, click Properties icon in the relevant row of the table. A Field Properties window will open.

MOND Class Diagram

  • Click the Properties icon of the 'Your Full Name' row.
  • Choose the Overall width as 100%. This means this field (along with its label) will occupy the entire row (12 Columns).
  • Click the Close icon('X') to close the properties window.
  • Click the Properties icon of the 'Your Phone Number' row.
  • Choose the Overall width as 100%. This means this field (along with its label) will occupy the entire row (12 Columns).
  • Click the Close icon('X') to close the properties window.
  • Click Save Form to save your changes.
  • Click the Preview tab to view your form.
  • You will notice that the 2 fields appear one below the other now.
  • Navigate to Preview tab. The Form will be displayed as it would appear in the run-time. View snapshot of the sample form here.

Create Review Call Back Request form


  • Let us create a copy of the previous form. Click the Form Designer home to view the list of forms.Select the 'Request Call Back' form, by clicking icon below the name. Now choose the 'Copy' icon from the toolbar.
  • Enter the name 'Review Call Back Request' and click Copy. A Message 'Copied Successfully' will be displayed.When you close this message, the list of forms will be displayed. Select the 'Review Call Back Request' form to view the form details.
  • In the Field Id column enter f5. Enter 'Message' in the label field and choose Text Area as the component type and press enter.
  • Click Save Form to save your changes.
  • Click the Preview tab to view your form.
  • This form will be used to display the Call back request to the customer support agent. View snapshot of the sample form here.


    Create a Process

    • Navigate to Designer -> Business Process Model. List of existing Business Process diagrams will be displayed

    MOND Business Process Diagram


    1. On the menu bar, click Add New.(A new window will open)

    2. MOND Business Process Diagram


      1. Enter the 'Request Call Back' as the name of the Business Process Diagram and click Save.
      2. The Business Process Diagram will be saved and a canvas will be displayed with the Start node.

      3. MOND Business Process Diagram


        1. We start the process with a User Task. To do this, click the 'Activities' section from the BPMN palette.
        2. Drag the User Task BPM object from the BPMN palette and drop it on the canvas.
        3. Double click the name of the object. The name will be editable. Enter 'Request Call Back' as the name of the User Task and click anywhere on the canvas.
        4. In order to connect the User Task to the Start node, hover on the Start node. When the cursor turns into a pointing finger, hold down the left mouse button and drag the pointer to the User Task node. A arrow head connector will connect the Start node and the User Task nodes. Then you can release the mouse button.
        5. Next we will use a Service task that performs some actions and returns a message that will be displayed on the form.
        6. Drag the Service Task BPM object from the BPMN palette and drop it on the canvas.
        7. Double click the name of the object. The name will be editable. Enter 'Create Display Message' as the name of the Service Task and click anywhere on the canvas.
        8. Connect the User task to the 'Create Display Message' Service Task .
        9. Similarly, include another User Task with name as 'Review Request' and connect the User Task from the Service Task.
        10. Click the 'End Section' from the BPMN Pallete and drop an 'End' event to the canvas and connect the End Event from the 'Review Request' Service Task.
        11. Click Save Process on the menu bar to save your changes.

        12. MOND Business Process Diagram


          Bind Data To Process

          • In the Business Process diagram, click Properties icon on the menu bar. The Process Properties window will open.
          • Navigate to Variables tab. Variables definition table is shown.

          MOND Business Process Diagram


          • Click Add New Row icon in the bottom of the table to insert a new row in the table.
          • Select String as the data type of the variable.
          • Enter 'userName' in the Field Name column and press Enter.
          • Similarly, create two additional variables called 'phoneNumber' and 'displayMessage' of type 'String'.

          MOND Business Process Diagram


          • Close the Process Properties window.
          • Click Save Process on the menu bar to save your changes.

          Associate Participant and Form to User Task and bind data to Form


          After drawing a Process diagram, the next step is to associate Users to various user tasks in the Process.

          • Double click 'Request Call Back' user task.
          • Navigate to Task Assignment tab
          • You will see that the Login User is already selected.
          • Click the Form Properties tab
          • Choose Dynamic MOND Form. Form Name drop down will appear.
          • Select Request Call Back Form. A Form Fields table will be displayed showing all the fields defined in the form.
          • Click on the row showing Form field User Name. The row will become editable.
          • Select the data type of the variable. Note that the variable $userName defined as Process property is available in the dropdown. Select $userName variable.Press Enter to save.
          • Similarly for the Form Field Phone Number, associate the variable $phoneNumber that we defined earlier in the Process Propeties.Press Enter to save.
          • Close the Form Properties window.
          • Click Save Process on the menu bar to save your changes.

          Associate Participant and Form to Review Request User Task and bind data to Form

          • Double click the 'Review Request' user task.
          • Navigate to Task Assignment tab
          • You will see that the Login User is already selected.You can assign this task to another user or another role. Task assignment based on roles is handled in another tutorial.
          • Choose Assigned To Role. An Organisation chart drop down and a Role drop down will appear.
          • Navigate to Form Properties tab
          • Choose Dynamic MOND Form. Form Name drop down will appear.
          • Select Review Request Form. A Form Fields table will be displayed showing all the fields defined in the form.
          • As before, associate $userName to 'Your Full Name' field, $phoneNumber' to 'Your Phone Number' field and click enter.
          • Click on the row corresponding to field 'Message'. The row will become editable.
          • Select the data type of the variable. Note that the variable displayMessage defined as Process property is available in the dropdown. Select displayMessage variable.
          • Close the Form Properties window.
          • Click Save Process on the menu bar to save your changes.

          When you associate a role to a task, at runtime, all the users belonging to the role can view the task. When once a User claims a task and starts working on it, other Users belonging to the role will not be able to view the task anymore. The administrator will have the ability to re-assign the task to a specific User or to a User role.


          Define an Implementation Service

          Implementation of Service task can be done without writing Java code. MOND Integration Development Console provides a Service development interface which can be used by Business Analysts to develop Service logic using a standard Web Browser.


          • Click here to login to MOND ESB
          • Navigate to Build Tab
          • In the left navigation menu, navigate to Services -> Projects Page.
          • Create a new project by clicking New Project button in the bottom of the Project tab.
          • Enter the name 'My First Project' and click the Save Project button in the bottom of the Project tab.
          • In the RHS grid, click New Service. Select the Service Type as Standard, enter CreateDisplayMessage as the name of the Service, then set PF checkbox to Checked (✔). This indicates that it is a Process flow Service.
          • Click Save Service.
          • Click on the Service name hyperlink. A new window will open for developing the implementation logic of the Service.

          MOND Business Process Diagram


          • Click InputOutput button. Two grids will be opened to specify the input and output of the Service.

          MOND Business Process Diagram


          • In the Input grid, click New Input. A row will be added in the grid. Select String as the Data Type, and provide inputUserName as the name of the variable. This is same as defining the variables in the Process Properties which we learnt above in the Binding Data To Process section above.
          • Similarly add another input variable with the name inputPhoneNumber.
          • Similarly, define a output String variable with the name outputDisplayMessage. The output variables will return the output of the Service to the Business Process.
          • Close the InputOutput window.
          • Navigate to the Create Display Message Service tab.
          • Create the implementation logic.

          • What do we want to do? We want to take the User's name and Phone and create a text 'Please call back {UserName} on {Phone Number} and return this text.

          MOND Business Process Diagram

          • In the mapping grid, click to add a mapping logic row. A mapping logic panel will open in the right.
          • In the Operator field, select Variable->Variable String.
          • In the Variable name field, enter 'message' as the variable name.
          • In the Initial value field, enter 'Please call back '.Please note the extra space after 'back'.
          • Click Save in the bottom of the mapping logic panel.
          • Now we will build a logic as in the snapshot below to concatenate the User name to the string Please Call back.

          MOND Business Process Diagram

          • In the mapping grid, click MOND Business Process Diagram to add a mapping logic row. The mapping logic panel will open in the right.
          • In the Operator field, select String->Concatenate.
          • In the Operand1 field, select the variable '$message'.
          • In the Operand2 field, select the variable '$inputUserName'.
          • In Set field, select the variable '$message'.
          • Click Save in the bottom of the mapping logic panel.
          • Now we will build a logic as in the snapshot below to concatenate the Phone number.

          MOND Business Process Diagram

          • In the mapping grid, click click MOND Business Process Diagram to add a mapping logic row. The mapping logic panel will open in the right.
          • In the Operator field, select String->Concatenate.
          • In the Operand1 field, select the variable '$message'.
          • In the Operand2 field, by default you will see '----Use Fixed Value----'. If you see any other value, select '----Use Fixed Value----'.
          • In the Fixed Value field, enter ' on phone number '. Please note to leave spaces after the starting quote and before the ending quote.
          • In the Operand3 field, select the variable '$inputPhoneNumber'.
          • In Set field, select the variable '$outputDisplayMessage'.
          • Click Save in the bottom of the mapping logic panel.
          • Associate the implementation Service to the Service Task in Business Process

            • Click here to login to MOND BPM
            • Navigate to Designer -> Business Process Model/
            • Select the Business Process. The Business Process diagram will open.
            • In the Business Process diagram, double click the Create Display Message Service task. the Task Properties window will open.

            MOND Business Process Diagram


            • In the Project field, select the Project Test which contains the implementation Service.
            • In the Map field, select the implementation Service CreateDisplayMessage.
            • In the Set Task Status To field, enter 'Completed'.
            • In the Set Process Status To field, enter 'Completed'.

            Bind Data to Create Display Message Service task

            • Navigate to Input/Output tab. The window as in the snapshot will be displayed. The table shows the input and out variables of the implementation service that we created. We now have to associate the Process variables to the implementation service variables.

            MOND Business Process Diagram


            • Click in the Process Field Name column for the input variable inputUserName and select $userName.
            • Click in the Process Field Name column for the input variable inputPhoneNumber and select $phoneNumber.
            • Click in the Process Field Name column for the output variable outputDisplayMessage and select $displayMessage. Now the completed Properties window will appear as in the snapshot below:

            MOND Business Process Diagram


            • Close the Properties window.
            • Click Save Process to save your changes.
            • Click Publish Process to render the Process ready for execution.

            Run the Process


            In this section we will run the Process that we just created.


            • Navigate to Process -> Launch. List of existing Business Processes will be displayed
            • Click Launch icon relating to the Request Call Back Business Process. The Request Call Back Form will open.
            • Enter your name and phone number in the respective fields and click Submit.
            • Login to MOND BPM using the User ID 'andrew.williams@acme.com' and password 'bpmuser' who is the user associated to the Sales Role in the Organisation chart.
            • Navigate to Tasks page. Notice that a task under the title Review Call Back Request is displayed with the task status as Started.
            • Click the Task hyperlink to open the task. The Review Call Back Request Form will be displayed showing the message "Please call back <your name> on phone number <your phone number>".
            • Click Submit to confirm closure of the Review Call Back Request task.

            Conclusion

            Congrats! You have successfully completed the Request Call Back Process tutorial on MOND BPM. You will now have the basic knowledge of implementing a BPM Application on MOND BPM Platform. In the ensuing tutorials, we will cover more advanced levels to be able to implement full-fledged BPM Application.