cancel
Showing results for 
Search instead for 
Did you mean: 

BPM question - Delete all entries in a table and Insert data

Former Member
0 Kudos

Hello,

I'm new to PI BPM and have this scenario to implement.

I'm supposed to delete all entries in a table and then insert data to the same table.

Is BPM necessary? If it is, what is the best practice to implement my scenario?

I want to make sure that all entries were successfully deleted before insert data.

How do I check if all entries in the table were deleted successfully before

initiating insert.

Thank you.

-Won

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Won,

No BPM is needed and also you can do that in 1 call.

Build a jdbc receiver message, that contains 2 statement in the order from top to bottom you want to execute the actions.

1.) statement that deletes the records from the table

2.) statement that inserts the records in the table

(The statements get executed in this sequence)

Check your transaction settings in the adapter, if you use transactional processing both statements get executed all together

if successful or none of them.

With best regards

Sebsatian

Answers (4)

Answers (4)

prateek
Active Contributor
0 Kudos

If Stored procedure is not an option for you, I support the approach suggested by Sebastian and Sandeep.

Regards,

Prateek

former_member208856
Active Contributor
0 Kudos

You have to use 2 Statements in Mapping.

Make 2 mappings, 1 for Delete Statement & another for Insert Statement.

There is no need to use BPM.

Former Member
0 Kudos

Hi Won,

Yes, this is possible without BPM.

You have to create 2 separate mappings, each for deleting & inserting the records.

You will have 2 different Interface mappings as well.

But in ID, create a single interface determination.

In that, configure Deletion interface mapping first and in the second row, configure Insertion interface mapping.

Please make sure that the parameter 'Mainain Order At runtime' is checked in interface determination.

-Supriya.

former_member181985
Active Contributor
0 Kudos

better use Storedprocedure on DB side to avoid BPM design in PI