ActiveVOS Designer User’s Guide

Tutorial Part 10: Creating a Request to Run the Process

To start at the beginning of the tutorial, see Introduction to ActiveVOS Tutorial.

If you have followed all tutorial parts so far, you have deployed a BPEL process to ActiveVOS Server.

After deploying the process to the ActiveVOS Server, you must deploy the partner services, and then you can run the process by sending in a credit information request and getting back a response from the risk assessment or loan approval service.

By completing Part 10 of the tutorial, you will be able to:

Step 1: Open a browser to view the ActiveVOS Console

You can view deployment details for your processes in the ActiveVOS Console.

  1. On the Designer menu bar, select the ActiveVOS Console icon.
  2. The ActiveVOS Console opens, using a URL of http://localhost:8080/activevos.
  3. Administration Console

  4. On the menu, select Admin.
  5. Select URN Mappings. Notice that a URN to URL mapping is defined. This mapping is for the address of the Loan Approval and Risk Assessment services. (This URN mapping exists only in the embedded server in Designer. If you are deploying to a different server, such as ActiveVOS on JBoss, you will not see any pre-existing URN mappings. You must add them.)
  6. URN mappings

Normally you will add your own URN mappings. However, for the convenience of the tutorial, the partner role URNs have been mapped to a URL for you.

Note: Be sure that the host port 8080 in the URL is correct. If you selected a different port during installation of ActiveVOS Designer, select the URN to open the URL for editing. Update the URL so that the host port matches your server host port.

Step 2: Deploying the Risk Assessment and Loan Approval Services

The Loan Approval and Risk Assessment services have been created as BPEL processes for the convenience of this tutorial, and they have already been packaged in a BPR file. You must deploy these services. Then, when you execute the tutorial process, one or both of these services will also execute. They will be invoked at the URL defined in the URN mapping.

  1. In the Server Console, select Deploy as shown.
  2. Administration Console with Deploy button call out

  3. In the Deploy dialog, browse to the following location:
  4. [ActiveVOS Designer installation folder]\designer\workspace\Tutorial\Partner_Services\riskAssessment.bpr
  5. Deploy this BPR, and select Deploy another resource and select the loanApproval.bpr.

You can view the deployed processes. To do so, in the Server Console, select Catalog, and then select Process Definitions. You will see the listing for the tutorial, risk assessment, and loan approval processes.

Step 3: Creating a Process Request Form

We will use ActiveVOS Central to send a request to the process to start it. ActiveVOS Central is a client application that contains requests, as well as other work items, such as tasks and reports.

  1. Select File>New>Process Request Form.
  2. In the wizard, select the request operation, which is the operation for the starting receive activity.
  3. ActiveVOS Central Process Request Form

  4. Select Next and name the file tutorialRequest.html. Notice that the file will be added to a new folder called request. (This name is not related to the request operation. It is a generic name for all process requests that you may create for a project.)
  5. Select Finish. Your Process Request Form opens in the Web Page Editor, as shown.
  6. Web Page Editor

  7. Select the first occurrence of Request from the form title, Request Process Request and change it to Tutorial so that the title is Tutorial Process Request.
  8. Notice that the input message is in a table, and the title of the table is Loan Process Request. This title is based on the schema element of the message. We will change it to provide instructions for testing different paths in the process.
  9. Open the HTML Palette, and drop a Table beside the input message header, as shown:
  10. Web Page Editor

  11. In code view, add the following HTML code between the <table></table> tag:
  12. <tr><td>5000 &lt;loan amount &lt;=20000</td><td>Jones is declined</td></tr>

    <tr><td>20000 &lt;loan amount &lt;=50000</td><td>Only Smith is approved</td></tr>

    <tr><td>loan amount &gt; 50000</td><td>Everyone is declined</td></tr>

    <tr><td>Last Name: Approvefault</td><td>Loan approval faults</td></tr>

    <tr><td>Last Name: Assessfault</td><td>Risk Assessment faults</td></tr>

  13. In code view, your HTML code shows the following:
  14. Web Page Editor

  15. Your form should look like the following example:
  16. Web Page Editor

  17. Save and close your form.

Step 4: Create a Central Configuration File

To deploy your form to ActiveVOS Central, you must create a configuration file that contains deployment information about the form. The purpose of the configuration file is similar to that of a Process Deployment Descriptor.

  1. Select File>New>Central Configuration.
  2. Select the deploy folder for the location.
  3. Name the file tutorialRequest. The avcconfig extension is automatically added.
  4. Select Finish, and the file opens in an XML Editor.
  5. Select the Source tab to view the file.
  6. Scroll down to the Requests section as shown.
  7. invoke request operation

  8. We need to uncomment the XML in this section. Add a HTML end comment tag (-->) at the end of the Requests line, the top line shown in the illustration above.
  9. Remove the end comment tag at the end of the Requests section.
  10. Remove the <avccom:allowedRoles> section. There are four lines of code to remove.
  11. If you make a mistake, close the form, delete it from the deploy folder, and create a new form.

  12. Fill in the placeholder values exactly as shown. Note that the values are case-sensitive:
  13. <tns:requestCategoryDefs>
      <tns:requestCategoryDef id="education_category"
       name="Tutorial and Samples">
        <avccom:requestDef id="tutorial_request"
         name="Tutorial Request Form">
         <avccom:description>
           Submit loan approval request (basic tutorial).
         </avccom:description>
           <avccom:formLocation>
           project:/Tutorial/form/request/tutorialRequest.html
           </avccom:formLocation>
        </avccom:requestDef>
       </tns:requestCategoryDef>
    </tns:requestCategoryDefs>
  14. Save the file. Your completed file should look like the following:
  15. SOAP response

Step 5: Deploying ActiveVOS Central Resources

Now that we have a request form and a configuration file describing how to display it in ActiveVOS Central, we can deploy the files.

  1. In the Project Explorer, select two folders: the deploy folder and the form folder.
  2. Right-mouse-click on either selected file, and select Export>Business Process Archive.
  3. Deselect the .pdd, since it is already deployed:
  4. SOAP response

  5. Select a new name for the .bpr file, such as tutorialResources.
  6. Select the same name for the .bprd file, and select Next.
  7. Notice that the two ActiveVOS Central files are already selected, since we selected their parent folders to create the .bpr. If your files are not selected, use the Add button to add them.
  8. SOAP response

  9. Select Finish.

Step 6: Opening ActiveVOS Central and submitting a request

ActiveVOS Central is a great place to test the different paths of your process.

  1. Ensure that the server is running and that you have deployed all BPRs for your project.
  2. You can open ActiveVOS Central from the Designer toolbar, but for a better experience, select the Open Web Browser button from the toolbar.
  3. In the Address bar, type in the following URL:
  4. http://localhost:8080/activevos-central

  5. In the Sign On screen, sign on with the following user name and password:
  6. Username: manager

    Password: manager

  7. In the navigation area, underneath Home, select Requests.
  8. Select the Tutorial and Samples folder. This is the folder you created in the tutorialRequest.avcconfig file.
  9. Click on the Tutorial Request Form in the work area. You will see the Tutorial Process Request form you created.
  10. Submit a request as follows:
  11. Your form should look like the following:
  12. SOAP response

  13. Scroll to the bottom of the form, and select Send Request.
  14. The response from the loan approval process is displayed:
  15. SOAP response

Step 7: Viewing a Completed Process

  1. In the ActiveVOS Console, go back to the Service Definition page, and select Home from the menu, and then select Active Processes. Notice that two processes have completed.
  2. On the Active Processes page, select the tutorial process. You can see the actual results returned from the risk assessment service. Because Jones is a credit risk, the loan was denied.
  3. active process

For more details about the two services, and to debug your running or completed process from within ActiveVOS Designer, go to Tutorial Part 11: Debugging Your Process Remotely.