If you have followed all tutorial parts so far, you have deployed a BPEL process to Process Server.
After deploying the process to the Process 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.
After completing Part 10 of the tutorial, you will be able to:
View the Process Console in a workspace browser.
Deploy the Risk Assessment and Loan Approval services.
Create and deploy a process request form and Central Configuration file for Process Central.
Sign in to Process Central and send a request to the process and receive a reply.
Step 1: Open a Browser to View the Process Console
You can view deployment details for your processes in the Process Console.
On the Process Developer menu bar, select the Process Console icon.
The Process Console opens, using a URL of
http://localhost:8080/activevos
.
On the menu, select Admin.
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 Process Developer. If you are deploying to a different server, such as JBoss, you will not see any pre-existing URN mappings. You must add them.)
Normally you will add your own URN mappings. However, for the convenience of the tutorial, the partner role URNs were 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 Process Developer, select the URN to open the URL for editing. Update the URL so that the host port matches your server host port.
Step 2: Deploy 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.
In the Process Console, select Deploy as shown.
In the Deploy dialog, browse to the following location:
[Process Developer installation folder]\
Process Developer\workspace\Tutorial\
Partner_Services\riskAssessment.bpr
Deploy this BPR, and select Deploy another resource and select the
loanApproval.bpr
.
You can view the deployed processes. Do this in the Process Console by selecting
Catalog
, and then
Process Definitions
. You will see the listing for the tutorial, risk assessment, and loan approval processes.
Step 3: Create a Process Request Form
You will now use Process Central to send a request to the process to start it. Process Central is a client application that contains forms, as well as other work items, such as tasks and reports.
Select File > New > Process Request Form.
In the wizard, select the request operation, which is the operation for the starting receive activity.
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.)
Select Finish. Your process request form opens in the Web Page Editor, as shown.
Select the first occurrence of Request from the form title,
and change it to
Tutorial
so that the title is
Tutorial Process Request
.
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.
Open the HTML Palette, and drop a table beside the input message header, as shown:
In code view, add the following HTML code between the
<table></table>
tags:
<tr><td>5000 <loan amount <=20000</td>
<td>Jones is declined</td></tr>
<tr><td>20000 <loan amount <=50000</td>
<td>Only Smith is approved</td></tr>
<tr><td>loan amount > 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>
In code view, your HTML code should be:
Your form should look like the following example:
Save and close your form.
Step 4: Create a Central Configuration File
To deploy your form to Process 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.
Select File > New > Central Configuration.
Select the
deploy
folder for the location.
Name the file
tutorialRequest
. The
avcconfig
extension is automatically added.
Select
Finish
, and the file opens in an XML Editor.
Select the Source tab to view the file.
Scroll down to the Requests section as shown.
You need to uncomment the XML in this section. Add an HTML end comment tag (
-->
) at the end of the Requests line, the top line shown in the illustration above.
Remove the end comment tag at the end of the Requests section.
Remove the
<avccom:allowedRoles>
section. There are four lines of code to remove.
If you make a mistake, close the form, delete it from the deploy folder, and create a new form.
Fill in the placeholder values exactly as shown. Note that the values are case-sensitive:
<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>
Save the file. Your completed file should look like this:
Step 5: Re-deploy Your BPR Contribution
Now that we have a request form and a configuration file describing how to display it in Process Central, you can deploy the BPR contribution, because the Tutorial project was updated with new files. Each time you update your project, redeploy the entire project to keep your files together as a contribution unit.
In the Project Explorer, select
File > Export > Contribution-Business Process Archive
.
Do not change any values on the first page of the wizard.
Select
Next
. Notice that two new resources were added to the contribution:
Select Finish to deploy
tutorial.bpr
. On the server, you now have two contributions. The older one (version 1) is offline and the new one (version 2) is online.
Step 6: Open Process Central and Submit a Request
Process Central is a great place to test the different paths of your process.
Ensure that the server is running and that you have deployed your BPR for your project.
You can open Process Central from the Process Developer toolbar to view an embedded browser. To open a larger, stand-alone window, select the Open Web Browser button from the toolbar.
In the Address bar, type in the following URL:
http://localhost:8080/activevos-central
In the Sign On screen, sign on with the following user name and password:
In the navigation area underneath Home select Forms.
Select the
Tutorial and Samples
folder. This is the folder you created in the
tutorialRequest.avcconfig
file.
Click on the Tutorial Request Form in the work area. You will see the Tutorial Process Request form you created.
Submit a request as follows:
In the Last Name field, type in
Jones
(case-sensitive)
In the Amount Requested field, type in an amount between 5000 and 20000
Fill in the other fields as desired
Your form should look like the following:
Scroll to the bottom of the form, and select Send Request.
The response from the loan approval process is displayed:
Step 7: View a Completed Process
In the Process Console, go back to the Service Definition page, and select Home from the menu, and then select Active Processes. Notice that two processes completed.
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.