ActiveVOS Designer User’s Guide
Previous | Next
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:
- View the ActiveVOS 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 ActiveVOS Central
- Sign in to ActiveVOS Central and send a request to the
process and receive a reply
Step 1: Open a browser to view the ActiveVOS Console
You can view deployment details for your processes in the
ActiveVOS Console.
- On the Designer menu bar, select
the icon.
- The ActiveVOS Console opens, using a URL of
http://localhost:8080/activevos.

- On the menu, select .
- Select . 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.)

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.
- In the Server Console, select as
shown.

- In the Deploy dialog, browse to the following location:
[ActiveVOS Designer installation folder]\designer\workspace\Tutorial\Partner_Services\riskAssessment.bpr
- Deploy this BPR, and select 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.
- Select .
- 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, Request Process Request 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> tag:
<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 shows the following:

- 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 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.
- 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.

- 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.
- 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 the
following:

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.
- In the Project Explorer, select
two folders: the deploy folder and the form folder.
- Right-mouse-click on either selected file, and select
Export>Business Process Archive.
- Deselect the .pdd, since it is already deployed:

- Select a new name for the .bpr file, such as tutorialResources.
- Select the same name for the .bprd file, and select Next.
- 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 button
to add them.

- 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.
- Ensure that the server is running
and that you have deployed all BPRs for your project.
- You can open ActiveVOS Central from the Designer toolbar,
but for a better experience, select the 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:
Username: manager
Password: manager
- In the navigation area, underneath Home, select .
- Select the folder.
This is the folder you created in the tutorialRequest.avcconfig
file.
- Click on the in
the work area. You will see the Tutorial Process Request form you
created.
- Submit a request as follows:
- In the 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 .
- The response from the loan approval process is displayed:

Step 7: Viewing a Completed Process
- In the ActiveVOS Console, go back
to the Service Definition page, and select from
the menu, and then select .
Notice that two processes have 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.

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.
Copyright (c) 2004-2010 Active Endpoints, Inc.