MAIN arrow Samples-5.1 arrow Fetching values from an Array

Fetching values from an Array

Print E-mail
zip insertuser 14/02/2008,02:28 14.62 Kb

 

 

Description:

This use case illustrates the process of fetching values from an array as entered by user and inserting the same into a database

Use case dependencies:

1.Process.xsd
2.t-chema.xsd
3.query1.prm
4.query1.sql

Requirements:

1.Intalio|BPMS Server-5.1.1
2.Intalio|BPMS Designer-5.1.1
3.Process.wsdl
4.MySQL-5 database.
5.mysql-connector-5.0.4.jar.

 

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.

 

Process Download & Import:

1. Download ‘InsertUser.zip’.
2. Go to File > Import...
3. In Import wizard, select 'Existing Projects into Workspace', click on Next >
4. Select the "Select archive file" radio button.
5. Browse to select the downloaded archive file.
6. Click on Finish.
7. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

array.jpg

Defining Configurations:

 

MySQL Database:

1. All you need to have a table user with one field (Name) in MySQL-5.
2. mysql> create table user (Name varchar(10));

 

Designer:

1. To configure jdbc connection:
2. Refer to the reference guides>Intalio|BPMS Connector for JDBC
3. Create a Database Connection with the name asProcess.

 

Server:

1. Go to [intalio-bpms-server]\var\config\jdbc-connector and create a folder with name as Process
Note: The folder names should always be similar to the name given for Database Connections in designer
2. Create a "connection.properties" file and paste it into the Process folder.
Note The file can be obtained form the link given above
3. Paste mysql-connector-5.0.4. jar file under [intalio-bpms-server]\repository\com\intalio\bpms\pxe\5.1.2\pxe-5.1.2.war\WEB-INF\lib
Note: You can obtain the jar file from [intalio-bpms-server]\repository\mysql\mysql-connector\5.0.4

 

Scenario to fetch value from array:

1.Go to Data Editor and expand Server node.
2.Right click on assign node given under Server->sequence->Subprocess->sequence->invoke and select “Create assign's <bpel:copy>”.
3.Right click on <bpel:copy> node available under assign node and select Edit
4.In the Edit window provide below given code:
<bpel:copy>
<bpel:from>$thisReceiveRequestMsg.body/tns:name[position()=$count]</bpel:from>
<bpel:to>$processQuery1RequestMsg.parameters/Process1:execute/Process1:parameters/Process1:Name</bpel:to>
</bpel:copy>
5.Click to Apply.

 

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 to Finish.
4. Open a web browser, provide url as: http://localhost:8080/bpms-console, which takes to login screen for bpms-console.
5. Login with following credentials:
username: 'admin' (without quotes)
password: 'changeit' (without quotes)
6. Bpms-console will be available with deployed processes list
7. You should see "process1:Server" process with a package name "InsertUser", check the box under project and click to Start.
8. This should generate a form with an input text field.
9. Click on “Add child instance” to add more input text fields [This will create an array type input]
10. Provide values in all the text inputs t, and then click on Submit button.
11. This will replace the page with an output like "0".

Last Updated ( Feb 14 2008 )
  < Prev Next >