cancel
Showing results for 
Search instead for 
Did you mean: 

CPI: WRITE and SELECT Data store operations

06-02-2020 3:44 AM
babruvahana Contributor
5465 views 8 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi Experts,

I have to make an API call and store the data until the HTTP response is 404-not found. I can achieve this using a looping process call. Once I get a 404 response, I need to collect all the data from the data store and send it to SFTP.

As 404-not found is an exception I am catching the exception using exception subprocess call with a groovy script and calling another local integration process to collect the data from DataStore and delete it upon collection. But it is not working.

After the SELECT step, I am not getting the complete Payload while processing it. I am getting the following payload only

<?xml version="1.0" encoding="UTF-8"?><messages></messages>

Is there a limitation for WRITE and SELECT operations in the same IFlow. Do I have to use SELECT explicitly in another flow ?

Let me know if I have to follow any other approach to achieve the requirement. My IFlow looks as below:

Any pointer will be highly appreciated.

Thanks and Regards,

Pavan G.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

babruvahana
Contributor

The following steps have resolved my issue:

  • Exception Subprocess doesn't support Process Calls.
  • I have added Request-Reply with Process Direct adapter in Exception Subprocess.
  • SELECT data stores in the new Integration process with Process Direct adapter.

Regards,

Pavan G

Answers (2)

Answers (2)

Hi Pawan,

Request you to check transaction handling of the integration process.

For more information please refer below blog.

https://blogs.sap.com/2017/05/31/cloud-integration-how-to-configure-transaction-handling-in-integrat...

hope this helps.

thanks and regards,

Praveen T

babruvahana
Contributor
0 Likes

Hi tirumareddy.praveen

Posted on

Thanks for the response, I got some insights about transaction handling and simplified my integration flow as well.

I writing the data for the successful response from HTTP i.e 200- status OK. When there is a failure HTTP response i.e 404-not found. SELECT has to fetch the data written for all the successful cases.

I maintained Required for JDBC for the Local Integration Process and kept Not required in the Main Integration process. But, no luck.

After the SELECT step, I am not getting the complete Payload while processing it. I am getting the following payload only

<?xml version="1.0" encoding="UTF-8"?><messages></messages>

Is there any limitation of SELECT data store operation or transaction handling in exception subprocess?

Please let me know if I am missing anything.

Regards,

Pavan G

former_member666312
Active Participant
0 Likes

Hi Pavan,

Did you see the entries in the Write Data Store, in the monitoring page for the data Store.

Thanks and Regards,

Vijay.

sumanth171
Active Participant
0 Likes

Hi Pavan,

Check and change the below if you haven't done.

1. Use Get instead of Select datastore

2. set visibility to Global for both DS.

3. You have to read with the same entry id as you have written data using write.

Regards,

Anil

babruvahana
Contributor
0 Likes

Hi Anil,

Thanks for the response.

I have multiple messages to fetch, so GET doesn't work in my case.

Regards,

Pavan G