MAIN arrow Samples-5.1 arrow Material Receipt

Material Receipt

Print E-mail

 

 zip materialreceipt 04/02/2008,06:14 101.74 Kb

 

Description:

This use case is implemented by uploading the service in the Axis2.
In this sample, we are implementing a scenario in which the user can place a request for any material present in the stock, description of which is maintained in the database. The request is granted if the ordered material is present in the stock and appropriate calculations are automatically done and the database is updated subsequently. There is also an additional option for inserting a new item into the database. The use case works in the following way: The user is provided with the display of all the items in the stock. He can order any item and also give the quantity of that item that he wants to order. The process calculates the total price of the all the items ordered and also adds the shipping cost to the total price and displays it to the user. There is also an option of adding a new item to the existing stock.

The document describes in detail the dependencies, requirements and step-by-step process of creating this process, deploying it and executing it in the Intalio-bpms Server.

 

Use case dependencies: 

Material1.xsd The schema is of complex type.

 

Requirements: 

i.  Server-intalio-bpms: 5.1.1
ii. Intalio|BPMS Designer: 5.1.1
iii. Client.java
iv. Client.class
v. JdbcConnection1.txt
vi. One WSDL File
      1. MaterialWS.wsdl
vii. Six jsp Files
      1. MaterialReceiptDetailsRequest.jsp
      2. MaterialReceiptDetailsResponse.jsp
      3. MaterialReceiptCustomerRequest.jsp
      4. MaterialReceiptCustomerResponse.jsp
      5. InsertMaterial.jsp
      6. InsertFinish.jsp
viii. Material.mdb (Database File)
ix. MaterialWS.aar

 

Work Scenario in the Axis 2:

1. Please start the Intalio-bpms server.
2. Open your browser and give the url as http://localhost:8080/axis2/.
3. Click on the link Administration.
4. In the login window, give the username as admin and password as axis2 and select the login button available.
5. On the new page, on the top left, click on the link Upload Service.
6. It will display Upload a AxisService Archive File page.
7. Browse the location to the MaterialWS.aar and click on the upload button.
8. Logout.
9. It takes you to the main page of Axis2.
10.Click on the link Services.
11.Here you will see the list of the available services.
12.Verify that MaterialWS is present there.
13.Click on the MaterialWS to see the wsdl file.
Note: Note: This wsdl displays users Ip address in place of localhost in soap address location.you need to save this wsdl file on your system and you need to use this wsdl in place of the existing wsdl.

 

Preconditions: 

1. Copy and Paste the JdbcConnection1.txt file in any of the drive.
Note: Assume that the text file is pasted in the C:\drive.
2. Place all the jsp files in the server folder: intalio-bpms server: \repository\com\intalio\bpms\axis2-services-geronimo-1.1\1.1.1\axis2-services-geronimo-1.1-1.1.1.war\axis2-web.
The six jsp files are:
    a. MaterialReceiptDetailsRequest.jsp
    b. MaterialReceiptDetailsResponse.jsp
    c. MaterialReceiptCustomerRequest.jsp
    d. MaterialReceiptCustomerResponse.jsp
    e. InsertMaterial.jsp
    f. InsertFinish.jsp
3. Go to the folder: intalio-bpms-5.0.0.064\repository\com\intalio\bpms\axis2-services-geronimo-1.1\1.1.1\axis2-services-geronimo-1.1-1.1.1.war\WEB-INF\classes and create a new folder wsdl and place Client.java and Client.class in it.
4. Create a new dsn with the name material for the database Material.mdb.
5. Close and restart the server if its already started so that all the configurations done can be uploaded.

 

Fig-1: MaterialReceipt.bpm

materialreceipt.jpg

 

Fig-2:MaterialInsert.bpm

 

materialinsert.jpg 

 

Process Download & import: 

1. Download 'MaterialReceipt.zip'.
2. Go to File -> import...
3. Select 'Existing Projects into Workspace', in the wizard, click on Next >
4. Browse to select the downloaded archive file.
5. Click to Finish.
6. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

Process Explanation:

MaterialReceipt.bpm: This is the main process. There are total of 5 pools in this process:
a) CustomerRequest (Executable Property set to False): Used to start the other pools.
b) ServerSendquest: (Executable Pool): In this pool all the calculations regarding the order placed are done. When the user places an order, it checks whether the quantity ordered is less than the quantity available in the stock, and then calculates the total gross price for it accordingly.
c) SearchAll: (Executable): In this pool, the process search for a particular item that whether it is present in the stock or not and displays the list of all the items present in the stock to the user.
d) MaterialWSSOAP11port0: It is the wsdl used in which all the operations are defined.
Note: This wsdl has been taken from the wsdl file that is generated by axis2 on uploading the MaterialWS.aar file in axis.
Thus this process is used to accept an order, make necessary calculations and update them and also search and display the list of items present in the stock.

InsertMaterial.bpm: This process is used to insert a new item to the existing stock.

 

Scenario in Tomcat: 

1. Make sure bpms server is running fine.
2. Also make sure that both the bpm files are deployed.
3. Open the browser and give the url as: http://localhost:8080/axis2/axis2-web/MaterialReceiptDetailsRequest.jsp
Note: The browser will open a JSP screen with showing a Click Here hyperlink. Click on it.
4. On clicking the hyperlink, MaterialReceiptDetailsResponse.jsp will be opened.
Note: It will show a list of items available in the stock and Text-box to enter the no. of items you want to order.
5. Check the box corresponding to the item you want to order and enter the no. of that items in the “please fill quantity text-box.
6. Click the submit button.
7. This will take you to the MaterialReceiptCustomerRequest.jsp which displays the soap message in which it shows:
    a) ActualPrice
    b) Grosstotalprice
    c) materialname
    d) quantity
    e) QuantityOrdered
    f) Totalmaterialprice
    g) TotalShippingprice

8.  This page contains two buttons: accept and decline. On clicking decline it takes you to the first page.
9.  On clicking accept button the, MaterialReceiptCustomerResponse.jsp is opened and it will display the message Material Order Confirmed with details button.
10. On clicking "Details link, it will take you to the list showing all the items. i.e. MaterialReceiptDetailsResponse.jsp.
11. If you want to enter a new item to the database, go to step 4 in which MaterialReceiptDetailsRequest.jsp is opened.
12. The page, a link is present as Insert New Item to the Lis.
13. On clicking this link, InsertMaterial.jsp is opened.
Note: Enter the item name, quantity and price of the item.
14.  Click on the Insert.
15.  This will take you to the InsertFinish.jsp showing that item is inserted successfully. (Check: InsertFinish.jsp).
16. On this page a link is present, Click here. On clicking this link, it will take you to the list showing all the items. i.e. MaterialReceiptDetailsResponse.jsp.
17. From here you can again place the next order.

This completes the scenario.

Note:
1.) You can verify that an instance of all the executable pools is completed in the console as well.
2.) All the jpeg files mentioned above are present in the MaterialReceipt.zip.

Last Updated ( Feb 04 2008 )
  < Prev Next >