cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Process/ccBPM - When to be used

Former Member
0 Kudos

Hi All,

I have a scenario where i need to trigger the webservices in a third party java based system based on a value provided by SAP Workflow. Here two different web services are involved which needs to be triggred based on the response from the user.

Below are the steps that are involved in the entire process:

1. User request for an order and if material quantity is found, service 1 is triggered.

2. If the material quantity is not found, Service 2 is trigerred providing user with alternate options.

3. Now based on user response, if he agrees for alternate option, service 1 is trigerred.

Can any body explain how to do this in XI or perticularly in ccBPM.

Please let me know if you need further information

Help will be appriciated.

Thanks and best regards,

Kulwant

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kulwant,

I have written down the steps you would need in ccBPM to perform this scenario in your prevous post.

Well If you dont want to use ccBPM then you can also use conditional receiver determination to do this scenario. Without ccBPM, you are likely to gain on performance.

Please let me know if you need more help.

Thanks,

Varun

Former Member
0 Kudos

Hello Biplab/Varun,

I appriciate your effort.

Thanks for the details but i need more elaboration. if you can answer these particular questions then it will make easy for me.

Q1: Since there are two web services, i need to make 4 interfaces or 2 interfaces? I am asking this question because I need to know as the response from one web service will be sent back to SAP Work flow and then the same will be routed back based on user response to the another service interface.

Q2. What are the things that i need to create in Integration directory? As per my undersatnding, only the business service with out Party with basic objects will suffice.

Q3 Why do i need conditional routing ? As per my under standing, if the response needs to be sent back to the SAP work flow, i can choose the proper proxy calss object and populate it with corresponding data. But i think it will make a cycle of sending messages again and again. Please do correct me as i could be wrong and i need your guidence.

rest i will ask after your reply.

Thanks and best regards,

Kulwant Singh

Former Member
0 Kudos

Hi Kulwant,

You would need:

> > Q1: Since there are two web services, i need to make 4 interfaces or 2 interfaces? I am asking this question because I need to know as the response from one web service will be sent back to SAP Work flow and then the same will be routed back based on user response to the another service interface

1) One outbound asynchronous interface for SAP workflow request.

2) One inbound synchronous interface for webservice 1

3) One inbound synchronous interface for webservice 2

4) One inbound asynchronous interface for SAP workflow response from webservice 1.

5) One inbound asynchronous interface for SAP workflow response from webservice 2.

> > Q2. What are the things that i need to create in Integration directory? As per my undersatnding, only the business service with out Party with basic objects will suffice.

Yes, you are right, i have listed all the directory objects in my previous post.

> > Q3 Why do i need conditional routing ? As per my under standing, if the response needs to be sent back to the SAP work flow, i can choose the proper proxy calss object and populate it with corresponding data. But i think it will make a cycle of sending messages again and again. Please do correct me as i could be wrong and i need your guidence.

I think you need Conditional routing to identify which web service to execute at the first step.

I mean, you need to verify first up that you are getting material quantity or not and based on that only you can decide which webservice to execute 1 or 2.

Feel free to ask more questions Kulwant, we'll see your scenario through.

Thanks,

Varun

Former Member
0 Kudos

Hi Kulwant,

I have seen in most of the projects ppl avoid use of BPM due its performance.

In ur case u dont need BPM.It can be done easliy using conditional routing.My advise is.. u dont go for BPM!!!

steps in IR:

1)create 1 request DT,MT and 1 response DT,MT(for the workflow)

2)Import the WSDL's of the 2 webservice in IR under Externel def

3)create 3 message interfaces(1 for SAP,2 for 2 diff webservice)

4))create context object..fix it to MI or u can use X-path

5)Create 2 req message mapping , 2 response message mapping(sapws1,sapws2)

6) 2 interface mapping

Steps in ID

1)Create 2 Business service(rcvr systems)

2)use one Business system(sender system)

3)2 rcvr dtrmination,(use conditons)

4)2 interface dtrn

5)2 rcvr agreement

(no sender agrrement needed since using proxy)

see here how to use client/outbound proxy

/people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy

Thanqs

Biplab

Former Member
0 Kudos

Hello Biplab,

I have some questions about it:

1. Why do i need business system here?

2. Can you provide some inforamtion about why you have written that "(rcvr systems)" and "(sender system)".

3)create 3 message interfaces(1 for SAP,2 for 2 diff webservice)

are these response message interfaces ?

Thanks and best regards,

Kulwant Singh

Former Member
0 Kudos

Hi Kulwant,

1. Why do i need business system here?

good question !!

see... u r sending data from SAP system ..here ur sender service must be a business sytem .

we use business system when sending data from our own landscape.. here it is R/3

2. Can you provide some inforamtion about why you have written that "(rcvr systems)" and "(sender system)".

dont get confuse with... here i meant to say that....

sender system means SAP

receiver system means Webservices

3)create 3 message interfaces(1 for SAP,2 for 2 diff webservice)

are these response message interfaces ?

nope...

u need to create the 3 following MI's

a) synchronous message interface

o/p message - request message type from SAP

i/p message -response message type to SAP

b)synchronous MI

o/p message - request message type to Webservice1

i/p message -response message type to SAP

c)synchronous MI

o/p message - request message type to Webservice2

i/p message -response message type to SAP

u need 2 business service for 2 webservices.

Regards

Biplab

Former Member
0 Kudos

Hello Biplab/Varun

Thanks for the entire details that you have provided till now. Now I am clear about what i need to do. Except one. I have listed down the interfaces that i need to create in IR as i got little confused with it. Please remember that i need to use PULL mechanism for the web services on the java side.

1. An outbound asynchronous Message Interface WorkFlowToXI_MI_async using message types in external definition for the SAP Workflow request structure.

2. Two inbound synchronous Message Interfaces Service1_MI_sync and Service2_MI_sync for Webservice 1 and Webservice2 using the message types defined in external definitions.

3. Two inbound asynchronous interfaces for SAP Workflow response from the two web services. Service1ToWorkFlowResponse_MI_async and Service2ToWorkFlowResponse_MI_async

Please correct me if i am wrong here about the direction (inbound/outbound)

Thanks and best regards,

Kulwant Singh

Former Member
0 Kudos

Hello Varun, Hello Biplab,

I am again back with a question related to the same scenario.

Can any one of you please tell me why did u have asked for an oubound interface for SAP Workflow side?

I hope that you remember the scenario. But just to refresh, I have SAP WorkFlow <> XI <> java based Third party system.

I need to trigger the web services in Java side based on the response provided by the SAP Work Flow.

Thanks and best regards,

Kulwant

Former Member
0 Kudos

Kulwant,

If u r using any IDoc or RFC then u need not create any outbound DT,MT or message interface.

if u want to use proxy then only u need to create outbound

DT,MT and message interface.

Thanqs

Biplab

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kulwant,

Though I had mentioned some steps earlier also, i am putting them again here for you:

Following are the steps for Integration Repository:

1) You would need an outbound proxy program to send data from SAP workflow. I am not proficient in SAP workflow but i know you can write some code in the workflow steps to send data to SAP XI, you get examples of writing an outbound proxy program in SDN.

2) Now your outbound proxy would trigger this particular scenario. It will bring input parameters for first java based webservice in XI.

3) You need to create data type, message type and outbound message interface for your SAP workflow structure. you need not create data type and message type for Java based web service as you would be directly importing it's wsdl and using it as your inbound message interface in message and interface mappings directly.

4) If the third party webservice is a synchronous one, then while creating the message mappings you need to create two message mappings for the 1st java based webservice, i.e. one for request and 1 for response, you would also need to create a response structure to create the mapping for 1st java based webservice's response or if you want to directly pass the output of 1st webservice as an input to the 2nd java based webservice, you can also do that.

5) Create a response mapping for the response of 2nd webservice in a similar fashion.

Confuguration / Integration Directory:

1) For sender side you do not need any communication channel. For receiver side you would need one as I mentioned earlier. To create a communication channel, you need to first create or import (if already created) a business system or a business service (you can read about these in help.sap.com, ask me if you need the link). I would suggest a business system as web service provider is a third party. How to do it:

ID--><your configuration scenario> --> Service without Party --> Business Service / Business system --> right click to create or assign.

Note: looking @ yesterdays posts, i believe it's fine for you to create just a business service only.

2) When you are done with this, you get a communication channel option created inside you business system or business service. Right click to create a communication channel. Give a name to it and press F4 to select the adapter type as SOAP. it would be a receiver. Read help.sap.com for more info on it.

Note: you would need two receiver SOAP communication channels for executing the 2 java based web services.

3) Rest of the mostly needed parameters i have already mentioned in my earlier posts for configuring the communication channel.

Hint: the target URL needed to configure the communication channel is usually there in <SOAP:action> tag in the wsdls of the respective web services.

4) Next create a Receiver determination --> Interface determination --> Sender Agreement --> Receiver Agreement

7) For receiver determination, you need to enter a business service / business system and the sender message interface. If you have chosen your own service then you need to register your message interface in the service. double click on the service name to do it. there are options to register inbound / outbound messages.

If you can use a conditional receiver determination to determine the user response and call the relevant web service based on that. At the 'edit receiver determination' screen there is a 'configured receivers' tab, where in condition field you can press F4. When you pess F4, a new screen opens, in left operand field, again press F4, a new screen would again open up, select 'Xpath' and there select the field in your sender (structure coming from workflow) structure, the field which contain the user choices (say 1 or 2 as mentioned by you).

Similarly, in the same receiver determination based on the condition, you can call either webservice 1 or 2.

😎 For interface determination, you need to perform same steps as step no 7 also you need to enter your receiver service or business system.

9) In sender and receiver agreements you mention sender and receiver communication channels. Well in your case you need not make any sender agreement as you sending data from R/3 to XI directly.

if you configure these object completly, i believe you scenario should run.

In case of more queries, feel free to ask,

Thanks,

Varun

Former Member
0 Kudos

Hello Varun,

Thanks for the details.

Now i have next question. Based on the user response that if he chooses to have an alternate product, i need to send a mail. So can you tell me hiow can i trigger an email from XI

Thanks and best regards,

Kulwant

Former Member
0 Kudos

Hi Kulwant,

Thats what i was asking u in ur last thread.

u r having 2 webserivce.

see there r 2 ways u can do it.

1)without BPM

SAP to SOAP

u have to use 2 rcvr business service .

use context object/x-path, use condition in rcvr determination.

depending upon the payload it will be routed to particular webserivce.

2)With BPM

SAP->BPM->SOAP

steps

1)rcv-- this step will rcv the request from SAP system

2)use condition

3)send to rcv

Regards

Biplab