FileNet P8 provides support for document-centric business processes (workflows). WebSphere Process Server supports business processes written in the BPEL standard with IBM extensions for human tasks. It also supports integration of composite business service (CBS) components in a business process with the help of the Service Component Architecture (SCA) standard. This article describes a simple scenario in a banking application, specifically a loan application CBS business process modeled as a business state machine (BSM) in WebSphere Process Server. The BSM is integrated with a simple FileNet P8 workflow, which manages documents associated with the loan application.
The loan application is part of a fictitious banking application called Jivaro. The first article in this series, "Develop SOA composite applications to enable business services," (developerWorks, Oct 2006), introduced some scenarios that the Jivaro banking application supports. In this article, you look closely at the loan application scenario for the role of the bank customer.
Loan application process scenario
The loan application process implements the following flow:
- A bank customer goes to the bank portal to apply for a loan.
- The customer's application is forwarded to a bank employee for review. The bank employee decides that the applicant needs to fill out an online application form to provide supporting documentation, which should be stored for regulatory compliance purposes.
- As a result, the customer receives an automatic e-mail with a request to fill out and submit the form.
- The customer references the link in the e-mail to log on to the bank portal to launch the loan application form.
- After the applicant submits the document, a bank employee receives notification that the document is available for review.
- The bank employee approves or rejects the loan application based on the content of the form.
- If the bank employee approves the application, a bank manager receives notification to review the application.
- The bank manager either approves or rejects the application.
Implementing the loan application process
The above loan application flow is a simplified workflow for a loan approval application. This workflow includes both document management tasks and human tasks.
The FileNet P8 platform offers the best solution for the document management task, and WebSphere Process Server offers the best solution for human tasks in a workflow. WebSphere Process Server also supports BSMs for modeling event-driven business processes.
This article demonstrates:
- The use of the FileNet P8 platform to support the loan application creating, submitting, and electronically storing steps 4 and 5 in the above workflow.
- How to use WebSphere Process Server to support the loan application approval human tasks (steps 3, 6, and 7).
- The use of a WebSphere Process Server BSM to integrate the WebSphere Process Server process with the FileNet P8 process based on the occurrence of the loan application submission event generated in step 6.
In the next few sections, you walk through the steps to create this solution.
Step 1. Develop the loan application process in IBM WebSphere Integration Developer
First you create a WebSphere Process Server BSM for the loan application business process in WebSphere Integration Developer V6.0 and deploy it to a WebSphere Process Server V6.0 server. This process receives the loan application request, checks business rules for loan origination, executes human tasks for checking supporting documents by the staff and at a managerial level, sends an e-mail to the customer, and waits for a call back from the FileNet P8 subprocess.
Figure 1 shows the assembly diagram for the LoanApproveSM business process in WebSphere Process Server. It illustrates the main BSM component, LoanApproveSM, and its wiring to the other required components, including the human tasks (StaffApproval, ManagerApproval), the business rules (LoanOriginationRules), and the partner invocations for sending the e-mail requests to the loan applicant (SendEmailForDocument) for storing the requests in the database (JDBCLoanRequestOutboundInterface) and for querying the loan request status (LoanTrackingService).
Figure 1. Assembly diagram for the WebSphere Process Server LoanApproveSM business process

Figure 2 shows the WebSphere Process Server BSM, LoanApproveSM, modeling the loan approval process.
Figure 2. WebSphere Process Server BSM, LoanApproveSM, for the loan application process

- A new process starts with an invocation of the
approveCheckmethod of the LoanApproveSM BSM. The process goes into the Initialized state and invokes the loan origination business rules component to get the approval type. - If the approval type is AutoApproved, the process transitions to the Approved state. In this state, the decision is logged into the database and the process terminates.
- If the approval type is AutoRejected, the process transitions to the Rejected state where the decision is logged into the database and the process terminates.
- If the approval type is NeedHumanApproval, the process transitions to the First Review state. Here, if the staff wants to view more loan application documents, the process transitions to the Waiting for documentation state.
- Upon entering the Waiting for document state, an e-mail is sent to the loan
applicant to submit the necessary documentation to the FileNet server. When the
loan applicant submits the document to the FileNet server, a FileNet process is
invoked. The FileNet process invokes the
loandocSubmitCallBackmethod of the WebSphere Process Server BSM process and provides the URL for the requested document. This external event causes the WebSphere Process Server BSM process to transition back to the First Review state. - In the First Review state, if the staff rejects the request and the approval type is approved once, the process transitions to the Rejected state. If the approval type is approved-once and the staff approves the request, the process transitions to the Approved state.
- If the approval type is approved-twice and the staff approves or rejects the
request, the process transitions to the Second Review state.
- In this state, if the manager approves the request and the staff had approved the request, the process transitions to the Approved state.
- If the manager rejects the request and the staff had rejected the request, the process transitions to the Rejected state.
- If the manager rejects the request and the staff had approved the request, the process transitions back to the First Review state.
Step 2. Create a loan application eForm in FileNet Process Designer
Next you create and deploy the loan application submission form and the form submission subprocess using the FileNet P8 eForms Designer and the Process Designer (a feature of IBM FileNet Business Process Manager). In addition to the FileNet P8 V4.0.1 platform, an add-on product, FileNet P8 eForms, and the eForms Designer V4.0.1 need to be installed.
You use the FileNet P8 eForms Designer to create a form template that contains the layout, graphic elements, and intelligence features of an electronic form. After the form design is complete, you can deploy it to the FileNet P8 Workplace (a function within FileNet Content Manager) and configure it within a form template workflow policy. Then you can send a hyperlink representing this workflow policy to a user so he or she can fill out the form and a workflow can be launched. In this scenario, the form is the loan application, and after it's completed, the form submission workflow is launched. This in turn invokes the WebSphere Process Server BSM process with the relevant information.
Figure 3 shows a loan application form template that you create in the FileNet P8 eForms Designer. The template should include an application ID field, which acts as the correlation ID for the WebSphere Process Server BSM process. This ID should be included in the e-mail sent by the WebSphere Process Server BSM process to the bank customer. The form fields need to be published so they can be mapped to the workflow data fields during the creation of the form workflow policy. This form template is then added to the FileNet P8 Workplace
Figure 3. Designing and deploying the loan application form template in the FileNet P8 eForms Designer

For the integration of FileNet P8 eForms with workflow, you need to define the form step processors in the Workplace Process Configuration Console, as shown in Figure 4. Only workflow steps with Form Step Processor are visible for the mapping of form fields and workflow data fields in the creation of a form workflow policy.
Figure 4. Defining form step processors in FileNet P8 Workplace Process Configuration Console

From the FileNet P8 Workplace Author/Advanced Tools page, you can find these tools: Process Designer, Add Entry Template Wizard, and Add Form Policy Wizard. These let you create the loan application submission workflow and the form workflow policy necessary to launch the workflow when the form is completed by the customer.
Figure 5. Designing the loan submission workflow in the FileNet P8 Process Designer

Figure 5 shows a simple loan form submit process that you create in the Process
Designer. The LaunchStep task starts this workflow and transfers the eForm
parameters to this workflow. The Invoke step invokes the WebSphere Process Server
BSM loan application process through the
loanDocsSubmitCallBack method. The TeminateProcess step
stops this workflow.
The workflow needs to have the data fields defined that correspond to the form fields for the mapping in the form workflow policy. The launch step also needs to have the Form Launch (HTML) FileNet P8 Step Processor as the step processor. In addition, to invoke the WebSphere Process Server BSM loan application process, you need to add a Web Services partner link in the Workflow Properties window, as shown in Figure 6.
Figure 6. Partner link for the invocation of WebSphere Process Server BSM process callback method

Figure 7 shows the details of the Invoke step. The
loanCallBack service is a one-way call, and the type is
set to Invoke. In the Invoke step you need to select the partner link and
operation, and bind the workflow parameter with the corresponding method parameter
(for example, requestId to
ApplicationId).
Figure 7. Details of the Invoke step

Next you need to add a form entry template and a form workflow policy to bind the form template, workflow, and data store together. The entry template persists the form data to the object store. For creating a form workflow policy, you need to complete the following steps:
- Select the workflow.
- Define the Launch step maps by selecting the loan application form template.
- Map the form fields to workflow data fields.
- Select the entry template used to persist the form data in the object store.
- Add simple customizations to the form windows interface by adding HTML banners and sidebars.
Then you can use the form workflow policy hyperlink in the e-mail sent to the customer to fill in the loan application form.
Step 3. Execute the scenario in WebSphere Process Server and FileNet P8
The following steps demonstrate the execution of the scenario:
- Bank customer Li Wei with user ID b1u1 logs in to the Jivaro banking
application portal to apply for a loan.
Figure 8. Apply for a loan in the Jivaro banking application portal
- His application is forwarded to the bank employee b1e1 based on
business rules that require human approval for all education loans.
Figure 9. WebSphere Process Server human task: staff approval for loan application
- Bank employee b1e1 receives this application and determines that she
needs more supporting documents for this application. She sets the required
document field as
truein the WebSphere Process Server human task manager. The WebSphere Process Server loan application process then sends an e-mail to customer b1u1.
Figure 10. Human task for requesting supporting documents for the loan application
- Customer Li Wei receives an e-mail notice with a link to a FileNet P8 server for
submitting an application form and providing supporting documentation.
Figure 11. E-mail sent by the loan application process for providing supporting documentation
- Customer Li Wei logs in to the FileNet site to fill out an eForm with the
supporting documentation. The application ID should match the application ID
referenced in the e-mail.
Figure 12. FileNet P8 Workplace for submitting the eForm for the supporting loan application document
- After the customer submits his form, the bank employee b1e1 receives a
new task item in her task list informing her that the supporting document has
been submitted.
Figure 13. WebSphere Process Server human task for approving the loan after the supporting documents are submitted
- Now the bank employee can approve this application and let the process go on
to the next step for bank manager approval. She sets the
isAdditionalLoanDocsRequired field to
falseand the isApproved field totrue.
Figure 14. WebSphere Process Server human task showing the bank employee approving the loan
- In the next step, the bank manager b1m1 approves this application. This
terminates the WebSphere Process Server BSM loan application process, and Li
Wei's request is approved.
Figure 15. WebSphere Process Server human task for the bank manager to approve the loan application
Composite business services often require a combination of document-centric activities and SOA-enabled business processes. FileNet P8 and WebSphere Process Server can be integrated in the technique discussed in this article to provide a best-of-breed solution encompassing both types of business processes.
The authors would like to thank Ashleigh Brothers and Patrick Flanders for helping to edit this article.
Learn
- Learn more about
FileNet eForms.
- Get a good overview of
FileNet Business Process Management.
- "Build BPM applications using FileNet, Part 1: A guided
tour to content and process modeling with the FileNet P8 platform"
(developerWorks, Jul 2007) introduces the process of building Business Process
Management (BPM) applications using the FileNet P8 platform and the Business
Process Framework (BPF).
- "WebSphere
Process Server: IBM's new foundation for SOA"
(developerWorks, Sep 2005) discusses the major WebSphere Process Server
capabilities, features, and solutions, and provides references so you can learn
more.
- "WebSphere
Process Server Business State Machines concepts and capabilities, Part 1: Exploring basic
concepts"
(developerWorks, Oct 2006) gives an overview of the BSM.
- "WebSphere
Process Server Business State Machines, Part 2: Enhancing your vending machine"
(developerWorks, Feb 2007) takes a closer look at the BSM through a series of
examples.
- "Dynamic
configuration of the Human Task Manager in WebSphere Process Server"
(developerWorks, Aug 2007) describes the range of programmatic and dynamic capabilities of
the Human Task Manager.
- The SOA and Web services zone on IBM developerWorks hosts hundreds of informative articles and introductory, intermediate, and advanced tutorials on how to develop Web services
applications.
- Play in the IBM SOA Sandbox! Increase your SOA skills through practical, hands-on experience with the IBM SOA entry points.
- The IBM SOA Web site offers an overview of SOA and how IBM can help you get there.
- Stay current with developerWorks technical events and webcasts.
- Browse for books on these and other technical topics at the
Safari bookstore.
- Check out a quick Web services on demand demo.
- Get an RSS feed for this series. (Find out more about RSS.)
Get products and technologies
- Innovate your next development project with
IBM trial software, available for download or on DVD.
Discuss
- Participate in the discussion forum.
- Get involved in the developerWorks community
by participating in developerWorks blogs.

Li (Tony) Wei is a software engineer in the China Software Development Lab (CSDL). He is currently working in the SOA development area. You can contact him at weili@cn.ibm.com.

Qiang Wang works as a software engineer in the China Emerging Technology Institute, China Software Development Laboratory. He concentrates on IBM Incubator projects and SOA-related topics. His interests include J2EE, SOA, MDA/MDD, AOP, RUP, and project management. He is currently working on an SOA pilot named composite business services (CBS).
Comments (Undergoing maintenance)







