MAIN arrow Samples-5.1 arrow InvokeProcessFromJSP

InvokeProcessFromJSP

Print E-mail

 

zip invokeprocessfromjsp 05/02/2008,08:14 14.69 Kb 

This use case illustrates the process of accepting the SOAP request from a JSP UI form apart from providing the SOAP request through Command Prompt. The JSP form takes three inputs from the user. First it takes the input as 'endpoint URL', secondly it takes the input as 'Service Name' from the generated WSDL and third it takes 'SOAP message', and after submitting the form, the JSP displays the output. The JSP UI form is taking the example of 'HelloWorld' process described below.

 

Use case dependencies

message.xsd: Schema used is "start" which is of "string" type.

 

Requirements

1. Intalio|BPMS Server-5.1.1
2. Intalio|BPMS Designer-5.1.1

 

Process Download & Import

1. Download 'InvokeProcessfromJSP.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,click to Finish.
5. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

invoke.jpg

 

* Please follow these below instructions to remake the process 

 

Preconditions

  1. Make sure Intalio|BPMS Server is up and running fine.
  2. Make sure the Process Explorer pane does not contain any Intalio|BPMS Business Process Project with same name.

  

Steps to remake the process

  1. Right click on the project; go to New > "Business Process Diagram".
  2. Provide File name as "InvokeProcessfromJSP", and click to finish.
  3. A pool with a task is available in BPMN Editor Pane, name default pool as 'Client' and task as 'send'.
  4. Right click on Client pool and select "Set pool non executable".
  5. Add new pool by click on BPMN Editor (select "Add Pool" option from pop up menu) and name it as "InvokeProcessfromJSP".
  6. Focus on "send" task in Client pool, drag the out going message icon from boundary to "InvokeProcessfromJSP" pool and select option to "Connect to a new Task", name it as "receive".
  7. Focus on "receive" task, drag outgoing sequence flow icon from boundary and select option to "Connect to a new Task", name it as "reply".
  8. Drag the outgoing message icon from "reply" task and connect to "send" task in the Client Pool.
  9. Import schema files from zip file into the project (You can also create your own schema from File > New > Other > XML > XML Schema).
  10. Drag and drop message.xsd > tns:start schema node on to incoming message flows from "send" task to "receive" task.
  11. A message "Set schema element 'start' as the content of the message" will prompt you, click on it.

  

Defining Outgoing Mapping

  1. Make sure Mapper view is visible (otherwise go to and select Windows > Show View > Mapper).
  2. In the process model select "reply" task.
  3. make sure Mapper Pallete window is opened other wise go to and select windows > show View >Mapper Pallete.
  4. Go to Mapper Palette and expand "Functions on Strings->Functions on String Values" and dnd "fn:concat" onto the Mapper Area.
  5. Go to mapper tool bar, click on "creates a new operator" button available.
    Note: The red button is used to create operators and constants.
  6. Drag the mouse pointer from the tool bar to work area of mapper and click on it.
    Note: A textbox will be available in the editing mode on the mapper work area.
  7. Provide "World" in the text box within double quotes.
  8. Go to the source side of the mapper and click on "thisReceiveRequestMsg.body" node.
    Note: A connection link is started.
  9. Click on the left edge of the textbox displaying "concat" function available in the work area.
  10. Again click on the right edge of the textbox displaying string "World" and then click on the left edge of the textbox displaying "concat" function.
  11. Again click on the right edge of the textbox displaying "concat" function and then click on "thisReceiveResponseMsg.body" node given in the target side of Mapper.
  12. Save the process model.
  13. Now your process is fully implemented to and is valid to deploy and execute within Intalio|BPMS Server.

Process Deployment & Execution

  1. Click on Deploy Project to Intalio|BPMS Server button in tool bar.
  2. Make sure you select all runtime files while exporting to Intalio|BPMS Server.
  3. Also verify & check "Deploy processes" choice before click on Finish button.
  4. Open a web browser, provide url as: http://localhost:8080/bpms-console, which takes to login screen for bpms-console.
  5. Login with the following credentials:
    username: 'admin' (without quotes).
    password: 'changeit' (without quotes).
  6. Under the "Processes", select the checkbox corresponding to the name "HelloWorld:HelloWorld" under package name "HelloWorld" given under the list of processes and select "Start" under "Processes" tab.
  7. The "Process Invocation" window is opened.
  8. In the textbox give the input as:
    i. start: Hello and select 'Submit' button available.
  9. The output will be displayed as:
    receiveResponse: HelloWorld.

Scenario in Intalio-bpms Server Directory

  1. Go to the folder where you are already installed "Intalio|BPMS Server 5.1.1".
  2. Go to following directory:
    \repository\com\intalio\bpms\axis2-services-geronimo-1.1\1.1.1\axis2-services-geronimo-1.1-1.1.1.war\axis2-web.
  3. Place the "ST_01Client.jsp" and "ST_01CallClient.jsp" (from the attached .zip file) inside axis2-web folder.
  4. Go to the folder:
    \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 with name "WSDL" and place the "ST_01Client.java" and "ST_01Client.class" files inside the "WSDL" folder.
  5. Now start the server and deploy the " InvokeProcessfromJSP.bpm" process in Intalio|BPMS designer.
  6. Open the browser and provide the URL as: http://localhost:8080/axis2/axis2-web/ST_01Client.jsp.
    Note: Now the browser will open a JSP screen with "End Point Url", "Service Name" and "Type SOAP file".
  7. Provide the "End Point Url"as generated in WSDL like:
    http://localhost:8080/ode/processes/INvokeProcessfromJSP/InvokeProcessFromJSP/InvokeProcessfromJSP/Client.
  8. Provide the "Service Name" as generated in WSDL like:
    CanonicServiceForClient
  9. Provide the following SOAP message in "Soap file" text area from "input.soap" like:
    <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
    xmlns:mes="http://www.example.org/message">
    <soapenv:Body>
    <mes:start>hello</mes:start>
     </soapenv:Body>
     </soapenv:Envelope>
  10. Select the submit button then we can get the output like:
     <soapenv:Body>
     <axis2ns5:receiveResponse xmlns:this=http://example.com/InvokeProcessFromJSP/InvokeProcessfromJSP
     xmlns:axis2ns5=http://example.com/InvokeProcessFromJSP/InvokeProcessfromJSP
     xmlns="http://example.com/InvokeProcessFromJSP/InvokeProcessfromJSP">
     helloWorld
     </axis2ns5:receiveResponse>
     </soapenv:Body>
     </soapenv:Envelope>

 

Last Updated ( Feb 05 2008 )
  < Prev Next >