BPM Design - JDBC

Hi members:
I have a BPM scenario - IDOC-to-JDBC
I have to delete a record in the db after checking certain conditions. Lets say my IDOC has Field A etc..My db has
Row 1 : field B, Field C, Field D
Row 2 : field B, Field C, Field D
etc..
after i receive my idoc in the bpm,i have to check which row of FieldC in my db matches field A in my IDOC.There may be 1 or more matches. If there are more than 1 match or no matches at all, i have to cancel the process, if there is only one match, i have to take the corresponding row`s FieldB and pass it on to my next step.
I am not sure how can i fetch the fields, do the count and execute it in my BPM. any suggestions would be appreciated.
Thanks

Hi,
><i>Also, i have this basic Q: i always thought that
when we want to read from a db we use sender JDBC adapter
when we want to update/insert/delete into a db we use receiver JDBC adapter , right?
From your blog, i can see that we can also use receiver JDBC adapter to read from a db, did i understand it correct?</i>
sender JDBC adapter can be used to select data from the DB. Sender JDBC adapter is used when you want JDBC adapter to initiate message processing in XI>
Receiver JDBC adapter can be used to select , insert , update , delete and call stored procedures using the JDBC adapter.
In your case, as an IDOC will trigger flow of message in XI, using a Receiver JDBC adapter would be better design.
><i>just 1 time the FiledB or several times the FieldB,is there a way to count my return?</i>
Sure is possible using the Statistical function COUNT in your Mapping.
Can you give the entire process flow so that all / exact steps in the BPM can be discussed.
Regards,
Bhavesh

Similar Messages

  • BPM design - JDBC - SOAP - JDBC

    Hi experts,
    Business scenario - Pull the data from Data base using a Stored Procedure(this marks the records once it is successful) and call web service using this data. If web service call is success, push the response received from web service to Data Base. If call to web service fails, still push the data which was pulled initially from database back to same location in database.
    Iam using BPM for this.
    Block1  - get the data into BPM from Database  (async), had an exception branch to check its success status and raise alert incase of failure.
    if Block 1 is good.
    Transform the data to Web service input format
    Block2 -  send the call to webservice Synchronous send step(request and response are defined as abstract asynchronous), had an exception branch to check if call is good or not, if the call is unsuccessful, write the data back to database
    If block 2 is good,
    Block3 - Response(abstract asynchronous ) recieved from webservice is transformed to Data base format and written to Data base using JDBC receiver adapter.
    I would like to know if this design is good, can I use options like Async \ synch bridge here.
    Please let me know your thoughts.

    thank you for all your views.
    Stefan suggested initially to call the web service asynchronously and receive the response from web service in another receive step . When I do that receive step is asking me to have a correlation, eventhough I created a correlation it is vanishing when I save it.
    May be I could not understand it correctly.
    are these steps are good.
    BPM process  -
    Block 1 - ( to ge the data from data base) Asyn Receive step ,  
    Block2  - Asynch Send step (to call web service), Aynch receive step(to receive the response from web service ), exception branch (for web service call failures)
    Block3 - send step to send the response received from web service to Data base.

  • Reg: BPM design

    Hi All,
    I am bit confused on the solution approach of BPM design and I would like your suggestions in completing my task.
    Requirement :
    scenario is proxy to Jdbc .
    I will get two input files from the source system and I have combine two files information into database table :
    1) first file will come only once and have key field which I have to consider.
    2) second file  may come more than once based on bookings at source side( 3/5/6/8).
    with current design , able to capture only one output from this design . my current design is :
    Fork
    Two receive steps ( correlation enabled in two steps based on key value)
    transformation step
    send step.
    with the current design in bpm ,correlation will come out after the first message satisfies the condition. Now i want to loop in such away based on the second file input  correlation has to work ( there is no input from source to take count on files). pl guide me.
    Regards,
    Suman

    Hi,
    This is what happens: the first receive step starts the bpm. If you have, afterwards, some other receive steps you have to set up the correlation condition.
    Once a message is being sent, the engine looks at all the started BPMs and based on the correlation condition it assigns it to one of them (that's why it is important to have the correlation condition unique per instance).
    From what I understand, you have the first message and then you can get 1 to 4 more messages. So you always have at least two messages: the first one sets the correlation id for the second and further messages. This correlation condition/id is just a field in the message that corresponds. Now after you get the second message, you say that you already know how many other messages will follow, that's why I say put a loop block with the receive (which should have the same correlation as the other).
    Now the contents of the first message will be available to the other messages as long as you keep it in a separate container variable, and you can re-use it in the loop.
    Hope this helps,
    Horia

  • BPM design -help

    Hi all,
    i need you your help in enhancing one existing BPM.
    the initial state was
    file sys-> BPM -> sap R3 (system A) and also sap R3 (system B)
    where the BPM is   --> recv > sync send(A)->send(B)
    file sys send ONE vendor_key in xml format to BPM.
    now sysnc send is conected to R3 A through a RFC_A, which send one key field to RFC_A and get the whole record of a Z-table
    through that very RFC_A
    this whole record is then sent to another RFC_B thorugh send(B), which update a Z-table in the second sap system B.
    if the picture is clear, then the requirement is that:
    this time i have to design a BPM which will receive one xml file from file-sys, in which there will be multiple vendor key
    instead of one.
    the xml message must undergo 1:n transformation in bpm to craete xml messages containing one vendo key each.then parallely calling RFC_a with vendor key , get the reponse record from system R3 A,  and call RFC_B to send the record to system R3 B.

    HI Abhishek,
    Thanks for your response. Pls find below my BPM Design Details
    Block 1
    Step Name : Block1
    Exceptions : runTime
    Transformation
    Step Name : Transformation1
    Exception : System Error - runTime
    Exception Branch
    Exception Handler - runTime
    Control Step
    Setp Name : Control0
    Action : Throw Alert.
    I have followed the blog : https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3465. [original link is broken] [original link is broken] [original link is broken]
    Still the alert is not getting triggered.
    Could you pls guide me, whethere is there any change need in my above design.
    Regards
    Mani

  • BPM design pattern

    can any provide information on BPM design pattern and give examples scenarios.
    thank you

    hi vicky,
    check this links
    Design Patterns in Exchange Infrastructure
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ad6de0-7cd6-2910-f894-dd7fe18b6fbf
    BPM with Patterns explained Part-1
    regards
    reddy

  • BPM FILE-- JDBC-- RFC

    Hi All,
    I am doing the File to JDBC(Sync) to RFC through BPM
    Start->Receive(Ansc)>Send(sync)>send(Anyc)>
    I have created like this:
    DT  and corresponding MT
    1. File
    2.JDBC_Req
    3.JDBC_Req_response
    i have created Message interfaces bellow
    File outbound
    File outbound Abstract
    JDBC sync inound
    JDBC Sync Abstract
    JDBC response Asyc Abstract
    I have created Mappings like this
    File to File outbound Abstract
    File Abstact JDBC_req
    JDBC_Req Abstact to JDBC_Req
    JDBC_res Abstact to JDBC_res
    JDBC_res Abstact to RFC
    I have created Interface Mappings like this
    File to File Abstract
    JDBC_req to JDBC_res
    JDBC_res to RFC
    while i am doing in BPM i am getting error like this:
    Message File Abstact to be received and synchrounous interface MI_JDBC_req_Abstact are not of the same type
    Pls suggest me how i can map the File Abstact and JDBC Abstact.
    Thanks,
    Venkat

    Hi,
    According to my understanding your scenario is:
    1) Pick a file from some file server
    2) Send it to a BPM
    3) Send this file as a request to JDBC and get back the response....i.e synchronous..
    4) Once you get the response from JDBC map it to a RFC structure and send it to the specified destination.
    If the above flow is correctly understood by me then the following design won't work....
    Start--Receive--Receive--Tranformation--Send(Sync)--Send--End
    Your design should be:
    Start --> Receive (async) --> Transformation --> Send (Sync) --> Send (Async) --> End
    1)
    a) Define an Outbound-Async MI for File Sender
    b) Define an Abstract-Asynch MI for BPM ....(include in first receive step of BPM)
    MT for (a) and (b) shoulde be same...
    2) Define an Abstract-Async MI....this should have the request structure for the JDB
    3) Create a mapping between MI from step 1a and 2...(include in the Transformation step of BPM)
    4) Create an Abstract-Sync MI for BPM_to_JDBC....include the same message-type as that in step2....in the input message (request) part of the sync MI.....(include in the Sync-Send Step of BPM)
    5) Create Inbound-Sync MI for the JDBC receiver...again both the message type should be same as that in the Abstract-Sync MI of step4
    6) Create Abstract-Async MI for the RFC receiver....(include in the last Send step of the BPM)
    I hope that you are defining the MIs with proper message-types and with proper direction...same applicable for container variable definition...please note that all the MIs involved in the BPM should be abstract
    The error that you are getting is bcoz of the mismatch in the message-type in the MI....please check it.
    Regards,
    Abhishek.

  • BPM design for trigger based file from Oracle

    Hi
    We have one requirement as follows:
    1. We need to receive trigger file from Oracle.
    2. As soon as we recieved trigger file, it needs to activate all other 10 JDBC adapter channels.
    3. once reciever all 10 RFC channels completed, it needs to pass that trigger file.
    Please suggest design.
    Thanks
    Siva

    Hi Siva,
    1. We need to receive trigger file from Oracle.
    define a sender CC (FILE) which polls a directory every N seconds.
    The receiver of this message should be your BPM.
    2. As soon as we recieved trigger file, it needs to activate all other 10 JDBC adapter channels.
    in your BPM, trigger your 10 sender CC (JDBC). See sap help and blog to know how to trigger externally a CC. Easy to do.
    3. once reciever all 10 RFC channels completed, it needs to pass that trigger file.
    Then always in your BPM, you have to do a correlation on the 10 SQL responses (that's crazy!). Several blogs and threads on this subject.
    And after that, in BPM what do you do of these 10 SQL responses (thats' crazy!) ? do you have to merge data ?
    Welcome to the birthday of a future monster... for dev and maintenance... Sincerely simplify your flow!
    Question: do you really need to have 10 SQL? for your needs, is it not possible to create a stored procedure in database which will do the 10 SQL (with Join tables)... if yes do it, by tis way you will have only one Sender CC (JDBC) to trigger, and no correlation in a BPM. That will greatly simplify your flow.
    Regards
    Mickael

  • BPM Design using sync-async  bridge

    Hi Arpit,
    Below mentioned is an overview of the process flow which we are trying to implement.
    1. A synchronous interface takes in the request
    2. After the mapping, a file is created
    3. Another file adapter reads this file and sends a message back to the sync interface. This step is to make sure that the file is created
    I'm using a sync-async bridge for this process, since file creation and reading processes are asynchronous and the request/response is synchronous.
    Can somebody help me by telling how to design the BPM. How many send and receive steps are required etc?
    Thanks,
    Sandeep
        | Request  |    |    |       |    |     |    |       |
        |--------->|    |    |       |    |     |    |File   |
    HTTP|          |Sync|--->|Mapping|--->|Async|--->|Adapter|
        |<---------|I/f |<-  |       |    |I/f  |    |(write)|
        | Response |    | |  |       |    |     |    |_______|
                          |                              |
                          |                              |
                          |                          ____|___
                          ||      |   |        |    |        |
                          -|Async |<--|File Adp|<---|Folder  |
                           | I/f  |   |(read)  |    |________|

    Hi
    <i>>>I have to map the incoming xml from HTTP to another format before creating the file.</i>
    Ya then u can use the transform Step in between the
    sync Recv ---> Transform ---> Send to File System
    <i>>>Once a file is read, that interface has to send an acknowledgement message telling the status.</i>
    Wht type of acknowledgement msg telling the status.
    I think u can add another element in ur created file payload like <b>Status</b>: Created (ConstanT)
    Then u can map the payload of the readed file with tis payload having Ststus init.Fo this u need a <b>Transformation</b> Step.
    BTW i was searching some previous blogs and i got this and it is bit related to ur scenario.Go thru this
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi
    Hope it helps.
    Regards
    Arpit Seth

  • Synch RFC--BPM --Sync JDBC

    Hi All,
    I am doing a schenario where in im using BPM.
    Synch RFC from XI box will trigger the interface, then i will make a synch call to sql server & synch call(RFC) to R/3.
    Can anyone please letme know the steps required in BPM.
    Do i need synch-async bridge?
    And also lemme know if i can map a ASyncronous Message Interface to a Syncronous Message Interface.
    Can i Map source as Synch RFC & target as synch sql & synch rfc R/3.If not how do i map
    Thanks
    Sumit
    Message was edited by: Sumit Khetawat

    Sumit,
    I just looked upo into one of my SYNCH AYNCH Scenarios and i have created my interfaces exactly like i mentioned in these steps,
    <i>1. RECEIVE step ==> Opens SYNCH ASYNCH bridge and receives RFC request message.
    ( This will have a synchronous message interface associated with it. A synch abs interface and will be used for the PROPERTY ~~Synchrnous Message in the BPM) We would also need an ABS ASYNCH Message Interface created for the Request Message and this should be used in the MESSAGE ( after creating CONTAINER element) for the same. )
    2. Transfrom step ==> Map RFC request message to JDBC request message. Mappinng between 2 abs Aynch Interfaces
    ( You will have container elements created for REq RFC as stated in the step 1 and another for JDBC request )
    3. SEND synchronous ==> to send JDBC request and get the JDBC response.
    ( You will use a SYNCH ABS against MESSGAE INTERFACE , and also, a separate ABS ASYCNH for request and response )
    4. TRANSFORM step==> Map JDBC response to RFC response . Mapping between ABS Interfaces
    ( same as step 2)
    5. SEND ==> Closes SYNCH ASYNCH bridge and Send's response back to the RFC.</i>
    Use the Container element created for the mapping in step 4.
    In case of Split mapping, again you will need ABS ASYNCH Message interfaces.
    Drop me a mail if you need screen shots.
    Regards,
    bhavesh
    All you mapping in the BPM is between Asynch Abs Interfaces.

  • Error in BPM before JDBC fetch

    Hi   All,
    My BPM scenario consists of :
    1. Receving an IDOC,
    2. Calling a stored procedure through JDBC adapter, through the IDOC info.
    3. Getting response from Updated stored procedure.
    Error:
    Before  calling stored procedure , error in<b> Intialize system element.</b>
    After that it is not able to call Stored Procedure itself.
    Plz suggest me someting asap.
    Thanks in advance.
    Shaily

    It looks like it is related to XI, check the XI forums.

  • BPM Scenario ( JDBC and Web Services )

    Hi all,
    I working in scenario in XI BPM and I need to do this:
    1) I have one table in SQL Server.
    2) I need to fill this table with a Web Services, because the costumer needs exactly SOAP.
    3) To fill  this table, I have some roles, like Area Code, State, then I need to do in JDBC Adapter and BPM.
    4)Finaly, I need to create a Web Services Provider( WSDL)  that insert data in this table.
    I have one question: Is it possible to create this scenario in BPM? I need to create one Web Service Provider using a XI to table in SQL Server.
    Have you seen one scenario like this?
    Is its possible? 
    Thanks.
    Regards.

    Hi Fabio,
    Yes you could but I am still trying to understand why you would need Business Process Management (BPM)?  The way I understand it (correct me where I may be wrong) is that someone calls a web service which in turns calls your WSDL in SAP XI/PI.  SAP XI/PI does its mapping and calls the JDBC adapter to put your data into your SQL table.  BPM comes in only when you have some sequence to consider, complex logic to work with, etc. that you might not otherwise need. 
    Does that help?
    John Ta

  • Pls suggest  the BPM  design .

    Hello,
    We are in PI7.1. The requirement is 1:N mapping the file to IDoc ACC_DOCUMENT01. Before calling the Idoc we need to check the Duplicate Invoice BAPI, if the bapi return error code "11" calling Idoc should be skipped. Could you suggest the design for this requirement in BPM. We would like to collect all the messages which returned "11" to dump into a file.
    I'm new to PI...any help would be appreciated. I started something like this...but, condition is not working to filter out the messages.
    1. receive the file.
    2. start the block
    2. transform the file to Bapi  (1:N)
    3. transform the file to Idoc (1:N)
    4. check the message exception.
    4. cancel the process.
    5.end the block
    6. start the for block.
    7. made the sync call to BAPI.
    8. check the response error code is "11".
    9 if yes, store the duplicate doc req interface into the container.
    10.end the for block.
    12. start the for block.
    13. check in the switch condition Idoc belnr is the same as container reponse error code 11 belnr. This step is not working.
    14 otherwise call the Idoc.
    15.end the for block.
    16. transform the container req to file.
    Thanks,
    Santha Kumari

    You might have to insert another For Block in the final comparison section. Because you have to check the current belnr with all the error returned belnrs. Then only you would know if you have to send the idoc or stop it.
    VJ

  • BPM design question

    Hello folks,
    I have this requirement  and I have designed a BPM for the same, I would appreciate if you could give me any improvements/suggestions:
    Req: Receive a message from Sender A the message has a transaction ID associated to it, Send the message to Receiver B and from then on wait an Hour to receive an acknowledge from Receiver B for that transaction. if no ack is received then shoot a mail to the users saying that the transaction didn't make it through. If success don't do anything, Just end the process.
    Design:
    1. Recv step (to receive the message/ start the BPM)
    2. Send Step (to reciever B to send the message )
    3. Block  ---  Block has the following    a. Receive step (to receive the ACK from Receiver B)     b.   Deadline Branch  (with a wait time of 1 hour) Inside the Deadline branch there is a Send Step to send Email followed by a Control step to end the process.
    Thank you! I would appreciate a betterment in design

    In my opinion, this is not a very good design. Keeping open a BPM instance for 1 hour is not recommended. In case you have hundreds or thousands of such messages coming in, it would badly hit the performance.
    You haven't mentioned which kind of system is your receiver system. You may think about the following parameters:
    1.  What is taking so much time to send the ack?
    2. Could this ack be sent later as an async interface?
    Regards,
    Prateek

  • BPM Question: JDBC Sender to RFC to JDBC Receiver

    I have the following requirement:
    JDBC Sender Adapter (by nature Asynchronous) – SELECT multiple rows from a table
    To…
    RFC Receiver Adapter (Synchronous)
    To…
    JDBC Receiver Adapter (Synchronous) – UPDATE multiple rows in a table
    Then…
    IF <SAP:Error> XML is returned from the JDBC Receiver Adapter, I want to either issue a CCMS alert, or utilize the XI Email Adapter for error notification. 
    ELSE, if <root_response> XML is returned from the JDBC Receiver Adapter, do nothing.
    This obviously requires a BPM.  If I use the JDBC Receiver Adapter Asynchronously (with no error handling) this is a piece of cake.  But after trying to use it synchronously along with error handling logic, I am stuck.
    This issue that I am facing is how to logically handle the JDBC Receiver Adapter Response XML in the BPM.  I would like to know what I need to do in the BPM in order to issue a CCMS alert (and/or send a message through the XI Email Adapter) ONLY if the <SAP:Error> XML is returned. 
    Below are examples of the 2 types of response messages that I would receive back from the JDBC Receiver:
    Error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      <!--  Call Adapter -->
      <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAP_OrderImport' (structure 'StatementName2'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Violation of PRIMARY KEY constraint 'PK_SAP_OrderImport'. Cannot insert duplicate key in object 'SAP_OrderImport'.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Success:
      <?xml version="1.0" encoding="utf-8" ?>
      <root_response>
      <StatementName1_response>
      <update_count>1</update_count>
      </StatementName1_response>
      </root_response>
    I have searched SDN for a while but did not find anything that specifically addressed this.  I would appreciate any help…

    Hi,
    In ur BPM wrap the jdbc send step with a exception block. in the exception block define a control step to throw an alert.
    so when the jdbc step fails, the exception is caught and an alert is generated by the control step.
    cheers,
    naveen

  • Oracle BPM Design

    Hi, We are in design phase, so thinking how many BPMN projects we should create or a single BPMN project with all process in it .
    Is there any document which help us to come up with how many BPMN projects we require and how it help us in future releases and advantages of multiple BPMN projects and single BPMN projects.
    Could anyone let me know your experience in designing the number of BPMN and ADF UI projects and its adavantages. Thanks a lot.

    Hi,
    You should use following pattern
    - Create Different BPM projects for different functionalities  like Create USER, Create Account
    - Club similar BPM processes in same BPM project like create user, update user etc.
    In this way you make your projects easy maintainable.
    Regards
    Bhupinder

Maybe you are looking for