IBM MQSeries Workflow SupportPac WA07
Web Services Process Management Toolkit
Version 1 Release 2

Credit
Request Sample Scenario
The sample scenario uses a simple workflow model, which encompasses the
processing of a credit request through a bank. The credit request process
comprises running a credit check, evaluating the credit check, deciding
if the credit can be granted, and informing the customer accordingly.
A bank employee starts a client application and is prompted to enter
the customer information applying for credit as well as the credit amount.
Then, the client application sends a Web Service invocation request to
MQSeries Workflow containing the customer information. MQSeries Workflow
starts the process and passes the information to the first activity where
the risk of granting credit must be assessed. This activity is called
'GetCreditReport'
and
is carried out by a Web Service. This can be an in-house application or
even from a third-party partner, that is, a financial subcontractor. The
Web Service is invoked and as a result a credit report of the customer
is created, which includes the risk factor: high, medium, or low. Then,
control is given back to the main workflow process, where the next activity
is started depending on the content of the credit report and the credit
amount. If the risk is medium or high or if the credit amount is higher
than 100000, control is passed to activity 'Request Approval'. If the application
for credit is rejected, control passes to an activity that posts a notice
for rejection of credit. If it is accepted, control passes for posting
acceptance.
The Web Service GetCreditReport is a simple Web Service implementation
to illustrate its potential use. You could also implement it as an MQWF
process. You can use the DPXML sample, which is delivered with MQWF to
do that.
Everything gets done in good order by the right person in the right
sequence. MQSeries Workflow ensures that the bank's defined and modeled
process is followed. Every application gets processed properly and efficiently.
Setting up the sample
You find the CreditRequest sample directory in the
samples sub-directory. You can run the sample scenario by either using
the MQWF Client or the MQWF Web Client.
-
Using the MQWF Client
Change to the CreditRequest directory and perform
the following steps:
-
Adapt the sample FDL file CreditRequest.fdl to your environment.
running
-
Change USER to your user ID, that is the user ID with which you are logged
on to the machine.
Note that the user ID must be a valid MQSeries Workflow user ID and
conform to the MQSeries naming rules of the MQMD UserIdentifier field,
for example, it cannot be longer than 12 bytes. For more information, refer
to the MQSeries Programming Guide.
-
Change FMCGRP to your MQWF installation system group name
-
Change FMCSYS to your MQWF installation system name
-
Change FMCQM to your MQWF installation queue manager name
-
Next, import the FDL into your Workflow system. Execute the following command:
wfimport CreditRequest.fdl
Note: You can also import the .fdl file into Buildtime and study
the process model with the sample definitions.
-
Edit testit.cmd and change the userid and the password of the PEA start
up fmcsxpea command according to your Workflow user.
-
Using the MQWF Web Client
Change to the CreditRequest\WebClient directory
and perform the following steps:
-
Adapt the sample FDL file CreditRequest.fdl to your environment.
-
Change USER to your user ID, that is the user ID with which you are logged
on to the machine.
Note that the user ID must be a valid MQSeries Workflow user ID and
conform to the MQSeries naming rules of the MQMD UserIdentifier field,
for example, it cannot be longer than 12 bytes. For more information, refer
to the MQSeries Programming Guide.
-
Change FMCGRP to your MQWF installation system group name
-
Change FMCSYS to your MQWF installation system name
-
Change FMCQM to your MQWF installation queue manager name
-
Next, import the FDL into your Workflow system. Execute the following command:
wfimport CreditRequest.fdl
Note: You can also import the .fdl file into Buildtime and study
the process model with the sample definitions.
-
Edit in the CreditRequest directory testit.cmd and comment out the fmcsxpea
command on line 25:
REM fmcxspea -u=user -p=password -f
-
Copy the html files in the WebClient\programs sub-directory into the programs
directory of your MQWF web client.
Running the sample
-
Make sure that you set up the generic
service provider as well as the Web
Service UPES correctly.
-
If you want to use the MQWF Client make sure that it is installed on
your machine. The client is needed because all the activities except for
the UPES activities are implemented using the CreditRequest scenario executables.
-
The sample uses port 2020. If your SOAP server uses
a different port, you can redirect the port by using the Axis Tcp monitor.
For example, to redirect port 2020 to port 8080 enter the following
command:
start java org.apache.axis.utils.tcpmon
2020 localhost 8080
-
Execute the testit.cmd:
testit
-
Then, a window 'CreditRequestView' is displayed. Click 'New Request...'
to display a dialog asking for the customer information as shown below.
-
The following scenario navigates through the process where activity 'RequestApproval'
is not processed. It describes the steps by using the MQWF Client.
If you want to use the MQWF Web Client, navigate through the process
instance by using your Web browser.
Enter less than 100000 into the credit amount field, for example, 9999.
Click 'OK' to check the parameters log window.
-
A message indicates that the request has been approved.
-
Click 'OK' to view the response message on the log entry of the CreditRequestView
window.
-
You can start a second process where the 'RequestApproval' activity is
processed. This is the case if the credit amount is greater than
or equal to 100000. Click 'New Request...' in the CreditRequestView window
to display a dialog that requests additional information.
-
Enter 100000 or a larger amount in the credit amount field. The process
then runs the 'AcceptCredit' activity. Click 'OK' to view the message parameter
in the log panel.
-
Next, the next application displays a window requesting manual approval.
Click 'Approve' or 'Reject'.
-
If you click 'OK' in this window, you see the response message on the log
entry of the CreditRequestView window.