Human Approval Completed Sample
This is a completed version of the Human
Approval Sample. In the Human Approval sample we
updated the Loan Process created in the ActiveVOS
Tutorial by adding human interaction by using a People activity.
The People activity is based on the WS-BPEL
Extension for
People and WS-Human Task specifications.
This document contains the following information:
- How to start the ActiveVOS Embedded Server
- How to deploy the Loan Process
- How to deploy the Partner services used by the Loan
Process
- How to run an instance of the Loan Process on the server
- How to interact with the human task by signing in to the
Inbox, claiming, updating and completing the human task
- How to verify that the Loan Process completed successfully
after the human task is completed
Getting Started
To start we are going to create a new orchestration project
based on
the Human Approval Completed sample template. By using this
template we
will create
a new orchestration project which includes a complete loan approval
process, including human
interaction.
Step
1. Create a new Orchestration Project
- Open
the ActiveVOS Designer and select File
> New > Orchestration Project from the main
menu.
- Enter a value of HumanApprovalCompleted
for the Project name and
press Next.
- Select Human
Approval Completed from the list of ActiveVOS Samples to
use the Human Approval Completed template.
- Press Finish.
Start the ActiveVOS Embedded Server
Before we can deploy the Loan Process, and the supporting
partner processes, to the ActiveVOS Server we must start it.
Instructions for starting the server can be found
in the Starting
the ActiveVOS Server Sample. Once the server is
started please continue with the next step.
Deploy the Loan Process
To deploy the Loan Process we need to create a
Business Process Archive (.bpr) file by exporting the Process
Deployment Descriptor (.pdd) file. These files are packaged
in the deploy folder of this sample along with another file containing
a .bprd extention.
Step
1. Export the .pdd file to generate the .bpr and deploy to the server
- In the Navigator view expand the deploy folder.
- Right-click on the loanProcessHumanCompleted.pdd
file and select Export....
- Expand the
Orchestration folder and Select Business Process Archive File.

- Press Next.
- Set the following properties:
- Make sure that the loanProcessHumanCompleted.pdd
file is
selected.
- Press the Browse...
button and navigate to the deploy
folder of your project and specify a file named loanProcessCompleted.bpr
(note: the file will be overwritten if it already exists).
- Select Web
Service from the Deployment
Type Drop-down list.
- Create a .bprd file by checking the checkbox option for
this choice.
- Navigate to the deploy
folder of your project and specify
a file named loanProcessHumanCompleted.bprd
(note: the file will be overwritten if it already exists).
The .bprd file will save all the choices that we specifiy
during the deployment and will make re-deploying the process a one-step
process. We will see how to deploy using the .bprd file in
the next section when we deploy our partner processes.
- Check the Replace
existing resources checkbox.
- Your dialog should look similar to this:

- Press
the Finish
button.
- A dialog indicating the status of the deployment will be
displayed:
- Press OK.
- The Loan Process is now deployed.
Deploy the Partner Processes
In the section we are going to deploy the two partner
processes that the Loan Process uses to process a loan. The BPR
files for the partner services are included in the Partner Services
folder of the HumanApprovalCompleted project. You will use the
ActiveVOS console to deploy the two BPR files (loanCRM.bpr and riskAssessment.bpr). Instructions for doing this are located in Part 10 of the ActiveVOS Tutorial chapter in the ActiveVOS Designer Online Help.
Run the Loan Process on the server
Before we run the process we want to ensure that the URNs that
we used in our Process Deployment Descriptor (.pdd) file that defined
our partner services are mapped to the actual URL's where those
services were deployed to. After that we can run a simple Ant
script to run our Loan Process.
Step
1. Verify the URN Mappings
- Open
the ActiveVOS Console, normally located at http://localhost:8080/activevos/
and navigate to Admin
> Configure Server > URN Mappings page and
set/verify the following URN Mapping:
- URN: urn:x-vos:loancompany
- URL: http://localhost:8080/active-bpel/services/${urn.4}

Step 2. Run the deployed
process
- In the ActiveVOS Designer expand the project's GenerateLoanRequests
folder, right-click on the generateRequests.xml
file and select Run As
> Ant Build.
- The output of the script is displayed in the Console view:
- The
messages from the embedded server are no longer
displayed in the Console View. To switch back to the embedded
server’s console press the Display
Selected Console icon from the
toolbar and choose the ActiveVOS server from the list of consoles as the
screen shot below shows:
- To see the status of the running process you can select HOME > Active
Processes from the ActiveVOS console:
- Press
the loanProcessHumanCompleted
process to view the
details of the process. As the screen shot below shows the
process is waiting on the ReviewLoan
People activity:
- The
process will wait in this state until the People
activity is completed or expires.
Claim, Update and Complete the Human
Task
The loan that was requested requires human intervention to
complete due to the amount of the loan. To complete the loan
process a human loan representative must sign in to the ActiveVOS
Inbox, claim and complete the task.
Step
1. Open the ActiveVOS Inbox
- Enter the following link in a web
browser: http://localhost:8080/activevos-inbox/.
- Sign in using the following credentials:
- Username: loanrep1
- Password: loanrep1
Step 2. Claim and Start the
task
- A new task was added to the list of unclaimed,
open tasks for the user loanrep1
as the screen shot below shows. Start this task by selecting
the row and pressing the Claim
button and then the Open button:
- Complete the task by:
- Change the value of the Loan Response
drop-down list from Under
Review to Approved.
- Enter some text for the Response Reason. Note:
you must enter a string > 10 characters.
- Press the Save
button.
- Press the Complete
button and confirm that you want to complete the task.
- Go back to the inbox and verify that the task is now
completed and moved to the list of Closed
> Completed tasks:

Review the completed Loan Process
Once the human task has
completed the loanProcessHumanCompleted process will continue on and
complete. You can check this by refreshing the
loanProcessHumanCompleted process from the list of Active Processes
and/or from the process details
- Refresh the process details. As the screen shot
below shows the ReviewLoan
People activity has completed. All other activities in the
process have also completed leaving the process in the Completed state.
Copyright (c) 2004-2009 Active
Endpoints, Inc.