Chapter 13. Finishing the Application

In the previous chapter, you completed the process definitions by adding connectors to send email and to manage calendar events. You have now created all the processes, forms, connectors, and pages used in the Tahiti application.

In this chapter, you will update the forms used in the Tahiti application processes so that the application page is displayed after a form is submitted. Next, you will update the application to include the final page. Finally, you will deploy the processes.  

When you have updated the Tahiti application and deployed its processes, you will validate it in the development environment using a scenario that checks all the usage paths.

Updating Process Forms

In this section, you will update the process forms so that after the user clicks Submit on a form, the Tahiti application page is displayed. If you do not do this, after a form is submitted the default page is displayed. This is the user’s task list in the Bonita BPM Portal. If the users do not use the Portal for other processes, displaying this page could be confusing, so it is better to specify a page.

First, you need to get the URL of the Tahiti application that you defined in the Portal:

  1. Log in to Bonita BPM Portal and set the Profile to Administrator.
  2. Go to Applications. A list of the applications that you have defined is displayed, including a partial URL for each one. 
  3. Find the Tahiti application that you defined in “Create the Application Prototype” and click the URL. If you followed the suggestion, the URL is http://localhost:8080/bonita/apps/tahiti/index/ (adjust 8080 to the port used by your running Studio).
  4. We suggest you don’t include the host name (“localhost” in this example) in your form properties because it will change based on the server where you will deploy your application. Instead, use a relative URL: /bonita/apps/tahiti/index/. Save this URL to add to the forms.

Now that you have the URL, you can update the forms. There are three forms to update, newVacationRequestForm, reviewRequestForm, and cancellationReviewForm. For the newVacationRequestForm, follow these steps:

  1. In Bonita BPM Studio, open the Tahiti-NewVacationRequest process diagram.
  2. Select the pool, and then go to the Details panel, Execution tab, Instantiation form pane.
  3. Find the Target form field, which shows the name of the form, newVacationRequestForm. Click the pencil icon beside this field. This opens the UI Designer with the form displayed.
  4. Select the Submit button widget and go to the Properties panel.
  5. Set the value of the “Target URL on success” property to the URL that you saved earlier.
  6. Click Save at the top of the UI Designer to save the form, and then close it.

Now go back to the process diagram and select the Review request human task. Follow the same steps to open and update the reviewRequestForm form. For cancellationReviewForm, open the Tahiti-CancelVacationRequest process, go to the Review cancellation task, and update the form.

Update the Application

In “Add a Cancel Option to the Application Page” you created the final version of the Tahiti application home page, which you exported as a .zip archive. All you need to do to update the application is replace the previous page with this final version. Follow these steps:

  1. Log in to the Bonita BPM Portal, and switch to the Administrator profile.
  2. Go to the Resources screen.
  3. In the list of Pages, select TahitiVacationManagement, and then click Edit.
  4. In the popup, specify the page-TahitiVacationManagement.zip file that you exported earlier, and then click Next.
  5. In the confirmation popup, click Confirm. The page will be imported.
  6. Go to the Applications screen.
  7. Click the URL to view the Tahiti application page and check that the correct page is displayed. 
  8. Bookmark the URL of the page to make it easier to test the application later in this chapter.

You have now completed the updates to the Tahiti application.

Deploy the Processes

You have updated the application to use the updated page. Next, you need to deploy the processes that are called by the application:

  • Tahiti-InitiateVacationAvailable
  • Tahiti-NewVacationRequest
  • Tahiti-ModifyPendingVacationRequest
  • Tahiti-CancelVacationRequest

To do this, go the Bonita BPM Studio. Open each process diagram in turn and click Run in the top menu bar. If you are running a process for the first time since you updated it, there might be some configuration information that you need to provide, and this will be listed in an information message. You can check the configuration is complete manually before running a process, but it is usually quicker to rely on the Studio to check and report any problems.

For the Tahiti-InitiateVacationAvailable process, click the button in the displayed form so that the process runs to its conclusion. For the other processes, simply close the browser window where the form or the Portal is displayed. This deploys the process without running it.

The next section explains how to test the Tahiti application in your development environment.

Test the Application

In the previous section, you deployed the Tahiti vacation management application and its processes in your development environment. You have done some testing along the way to make sure that the individual components work, but now it’s time to test the whole application. This section outlines a test scenario that will validate almost every aspect of the application and the processes it contains.

There are three users in this scenario:

  • Helen Kelly (helen.kelly), the Human Resources manager
  • April Sanchez (april.sanchez), a compensation specialist who reports to Helen
  • Walter Bates (walter.bates), an HR benefits specialist who also reports to Helen

April and Walter are not managers. All three users have the same password, bpm.

In this scenario, you need to use the Tahiti application as each user in turn, so you log in and log out several times using the Bonita BPM Portal. In a production system, you would probably access the application from your corporate intranet, which would handle the login, and you would not use the Bonita BPM Portal. 

The three users log in to the Portal with the User profile, and then access the Tahiti application using the browser bookmark that you created earlier. Each user has 10 days of vacation available. To simplify checking, create all vacation requests for 1 day.

Follow these steps:

  1. Log in as Walter and then:
    1. Create two vacation requests.
    2. Select one of these requests and cancel it.
  2. Log in as April and then:
    1. Create two vacation requests. 
    2. Select one of these requests and modify it to be 2 days.
  3. Log in as Helen and then:
    1. Create a vacation request.
    2. View the list of pending requests from the team.
    3. Select the 1-day request from April and refuse it, giving a reason.
    4. Select Walter’s pending request and approve it.
  4. Log in as Walter and cancel the approved request.

At the end of these steps, Helen’s vacation statement should show that she has 9 days available with one pending request, April has 8 days available with one pending request, and Walter has 9 and an outstanding cancellation request.

Summary

You have created the Tahiti vacation management application and validated that it works correctly in the development environment.

The next chapter contains some suggestions about how to test the application in a pre-production environment and prepare it for deployment. It also contains some suggestions to think about for future improvements to the application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.175.164