cancel
Showing results for 
Search instead for 
Did you mean: 

BPM scenario using JDBC and acknowledgement

Former Member
0 Kudos

hello

i have the foll. requirement-

mine is a File->JDBC-> File scenario using ack.(BPM is used)

a file is placed. the content of the file is used to select certain data from the JDBC.

The response from JDBC consists of multiple rows, each of has only one field-Name(occurrence 0..1).

This response needs to be mapped to a file.(let us say mapping1)

My problem is, I need to get the number of times the name field is absent from the response(rows) and use the value in another mapping(let us say mapping2)) which is used in sending the acknowledgement.This implies that the acknowledgement data consists of the number of time the name was absent from teh response.

i thought of using a global variable in mapping1.However we cant refer to this global variable in mapping2.

Also in case i use a container element in switch in IP, there is no function to check if a certain field is absent or not.

please help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

itisha,

wat you can do in BPM is..

1. recieve step

2. sync send step

3. tranformation step where you can count number of times row node has come

4. async send to final target

Former Member
0 Kudos

thanks for ur input but its not as simple as that..

you forgot i have the requirement of getting the node non-occurrence of node -name from the mapping1 and using it in mapping2 .

what u suggest is not meeting the requirement

former_member200962
Active Contributor
0 Kudos

Hi,

In the BPM say you receive message M1 on which you need to perform the counting

Then in the mapping2 you include this message on the source side alongwith the main source message

In this mapping itself check for the occurence / non-occurence of the node in message M1 and count it.

Then assign it to the required element in the target....you will have two source and one target messages in the mapping2.....

Make sure that your message M1 is not chaanged till it reaches mapping2......i.e. M1 --> transformation --> M1 (with some other data format in the same structure)....it will work.

Also in case i use a container element in switch in IP, there is no function to check if a certain field is absent or not.

you can check the existence of a field in the Switch block:

For XI:

Include a Switch Block --> Click on the condition section of the switch --> select the Xpath of the element from the desired message --> Click Ok --> Then select the Right Operand in the Condition Editor as EX --> Click OK

For eg: p1:EmpData/FirstNam EX........it will execute the IF branch if FirstName field exists

For PI7.1:

Refer this thread:

Regards,

Abhishek.

Answers (0)