cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronous webservice

Former Member
0 Kudos

Hi All,

Can we call a Synchronous webservice in Asynchronous mode.

Regards,

Srinivas.

Accepted Solutions (0)

Answers (5)

Answers (5)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi

dont you need any response? o at least you need the response stuck in PI??

cna you give more details of ur scenario?

Thanks

Rodrigo

Former Member
0 Kudos

Hi,

We are using a Block step in Parforeach mode.In the block step we are using a Send step in Synchronous mode to get the response from the Webservice.

But the Parallel mode is not supported in Synchronous mode.So i want to change the Send step in Async mode but also want the Response by using the Receive Step.

Will it work.?

Regards,

Srinivas.

justin_santhanam
Active Contributor
0 Kudos

Srini,

>But the Parallel mode is not supported in Synchronous mode.

I won't think so. You can call it Synchronously but you need to correlate each request with its corresponding response. Do u have any common field in request and response?

raj,

Former Member
0 Kudos

Hi Raj,

When iam using the Sync mode for Send step.What is the use of Correlation.

Regards,

Srinivas.

justin_santhanam
Active Contributor
0 Kudos

Srini,

I don't know for what reason u are using Par-For-Each in block step. I'm sure u might be knowing the difference btw For-Each and Par-For-Each.

For-Each

If you have 10 messages, then it will Call each messages synchronously in Sequential Manner.

Par-For-Each.

If you have 10 messages, then it will send the request for all 10 messages Parallely and wait for the response. In this case how come the response will correctly identify the requestor? For this reason we have to use Correlation. So that the response will go to the correct requestor.

I hope it clear, if not reply back.

raj.

Former Member
0 Kudos

Hi Raj,

i dont have any common field in request and response.

Regards,

Srinivas.

justin_santhanam
Active Contributor
0 Kudos

Srini,

You don't want to use For-Each? May I know the reson for it?

raj.

Former Member
0 Kudos

Hi Raj,

With Foreach mode its working in sequential mode.

But i want to trigger it in parallel mode so that the total time for the BPM would be less.

Regards,

Srinivas

justin_santhanam
Active Contributor
0 Kudos

Srini,

I won't think so you can achieve it using Par-For Each.

raj.

Former Member
0 Kudos

Hi Srini,

I have done the same model but there is a limitation in ParForEach mode. I think you cannot process more than 999 messages and there will be performance problem also.

ParForEach Recommended

A ParForEach is recommended if:

· The messages are processed further in the parallel processing branches.

· The individual processing branches are not dependent on each other on a business level.

·There are less than 999 parallel processing branches (the multiline table element that is processed in the ParForEach contains less than 999 lines).

A ParForEach would be beneficial in the following example:

You want to send a message to multiple receivers, wait for the respective answers, and then edit each one independently of the others in a separate context. Once the messages have been sent asynchronously in the ParForEach, the step can wait for an acknowledgment or some kind of business confirmation, for example.

ParForEach Not Recommended

A ParForEach is not recommended if:

· The messages are not processed further in the processing branches.

If, for example, you want to send a message to multiple receivers, but do not want the step to wait for a response or acknowledgment, use a ForEach instead of a ParForEach.

· There are more than 999 processing branches.

Check whether you can use a ForEach instead of a ParForEach. In the case of a ForEach you can set the maximum number of processing branches as part of the absolute upper limit (transaction SWPA). The absolute upper limit is set to 999999.

ForEach or Loop?

By using a ForEach, you can conveniently process a loop by means of a multiline table element. However, a ForEach has a high resource consumption rate because a new work item is created for each loop run. For this reason, you must only use a ForEach when it is absolutely necessary, for example, when you need to process local container elements.

If this is not the case, check whether you can replace the ForEach with a loop with index access to the table. The step type Loop requires considerably less system resources than a ForEach.

Thanks,

Srini

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi

of course you can,

export it as External Definition, define the Message Interface as async mode. Also your receiver structure

also in ID select the QoS(quality of service)as EO( Exactly once) or EOIO( Exactly once in order)

Thanks

Rodrigo

Former Member
0 Kudos

Hi,

What is the exact requirement?can u please tell so it will easy to answer.

Regards,

Phani

Former Member
0 Kudos

Hi,

i have a synchronous webservice.Want to call in asynchronous mode and also get the response in BPM.

Reagards,

Srinivas.

justin_santhanam
Active Contributor
0 Kudos

Srini,

If you call it Asynchronously , how u will get the response? It's not possible.

raj.

justin_santhanam
Active Contributor
0 Kudos

Srini,

Of course you can do it. Instead of having Inbound Interface as Synch make it as Asynch. Also make sure that your O/b Interface also be Asynch.

You can't call Synch Webservice in Asynch way, if

Synch---->XI----->Asynch(Webservice)

But you can in the following way

Asynch---->XI----->Asynch(Webservice)

raj.

nisarkhan_n
Active Contributor
0 Kudos

I think you can but define the outbound as Async and try to proceed...i am not 100% sure but i think it should be possible,,,