Handling Java Mapping Exception in BPM Transformation step

Dear SDN members,
I have developed a File to File scenario using BPM as follows.
Step 1:
Sender file adapter picks the file from FTP server and using file content conversion mapped to XML structure.
Step 2:
BPM will recieve the XML payload , immediately in the block a transformation step is called with an interface mapping. In the interface mapping a Java mapping will be executed with certain data validations on the XML payload. If found any invalid data is there a suitable excptions will be raised . Here the transformation step should be catch the error and control should be sent to exception block to place the recived file as a error file.
else if the transformation is executed with out any issues, the file will be placed in success folder.
But in the transformation step, though java mapping thorwing exceptions, the control not going into exception block, instead it is continuing to next step i.e the file is placing in the success folder.
Can anybody tell me, how to handle the exceptions raised in java mapping in the BPM transformation step?
I have refered all the SDN blogs, forums related to this issue, but could not able to find the answer. Please help me?
Thanks & Regards
Vijayanand Poreddy

Hi Abhishek,
Once the file is picked from FTP server then sent to BPM,
the BPM steps
Step1:
-->Recive
Step 2:
Block Starts
   ---Block Start: New Transaction
   ---Block End : New Transaction
   ---Exception : Error
Step 3 
Inside the Block
Transformation Step
   --Interface Mapping: <IM Name>
   -- Check box ticked for Create New Transcation
   -- Exceptions
      --System Error: Error
   --Source Message: Message recieved in Recieve Step (Step 1)
Step 4:
  --Send
  --Source Maessage: Output message from the Transformation Step
Block End
Inserted a Exception Branch for Block
Steps inside Exception Branch
  -Control
    --Throw Alert
   --Alert Name
In the above scenario
The transformation step is not throwing error even my interface mapping going to error. The same transformation step if i place outside the block next to recieve step, then the transformation step is throwing error and BPM stops the process.
Also, when transformation is inside the block, i have used the exception handling on the send step inside the block. here it is throwing error as the source message payload is empty. because in the preceding transformation step the interface mapping is failed due to which there the target will not be filled. But even though it is not entered into exception block.
Regards
Vijayanand Poreddy

Similar Messages

  • Alert for BPM Transformation Step

    Hi I am trying to think of a way to get the information from my alert transformation step into my Alert Message.
    The scenario is a multiline container called XML_Collect mapping to XML_Output a single container with the XML messages merged.
    If I encounter an error with mapping, currently I am raising an Alert with Process <Process ID> and Long Text Transformation Failure.
    I have the Transform step in a Block and an exception branch for the Alert. I am going to instigate a Container Operation step to fill my Container variables with information about the error.
    In the BPM Workflow Log I can see the Transformation1 Container Instance with variables such a MAPPING and MESSAGES_IN and _EXCEPTIONS in it.
    Can I reference this container in my Container Operation.
    Ideally I would like to know which XML message from the multiline container generated the mapping error. This would help in correcting.
    I have read some information on a UDF calling Alerts but I am not sure if this is the method to use.
    thanks,

    It is MESSAGES_IN
    We have
    MAPPING MAPPING http://<company>.com/msghdr IM_T_MSGHDR_V3_to_T_MSGHDR_V3_Multi-<...>-1-
    TRACE <?xml version="1.0" encoding="utf-8" ?>
    <MappingTrace><Trace level="1" type="T">Mapping-Namespace:http://company.com/msghdr </Trace>
    <Trace level="1" type="T">Mapping-Name:IM_T_MSGHDR_V3_to_T_MSGHDR_V3_Multi </Trace>
    <Trace level="1" type="T">Mapping- ...
    This trace is what appears in the XML trace also
    MESSAGES_IN MESSAGES_IN < 1 Entry >
      MESSAGES_IN[1] MESSAGES_IN[1] 0000000001-<...>
        NUMB Parameter ID 0000000001
        MESSAGES MESSAGES < 3 Entries >
    XC     ZXI_PROXY_MI_MSGHDR_V3_0001     E0630F307D7B11DCA23700145E6916E5
    XC     ZXI_PROXY_MI_MSGHDR_V3_0001     E035BDA07D7B11DCB90500145E6916E5
    XC     ZXI_PROXY_MI_MSGHDR_V3_0001     BA2A92307D7511DCB09900145E6916E5
    then the XML Header and Payload.
    _EXCEPTIONS _EXCEPTIONS < 3 Entries >
    _EXCEPTIONS[1] EXCEPTIONS[1] Component MAPPING has reported an error-The exception occurred (program: CLSW..
    _EXCEPTIONS[2] EXCEPTIONS[2] com/sap/xi/tf/MM_T_MSGHDR_V3_to_T_MSGHDR_V3_Mult~com.sap.aii.utilxi.misc.api...
    I have just tried the variable &_WORKITEM.WORKITEMID& and this gives the work item ID of the starting step for the Process.
    My MESSAGE_ID variable that I am updating with the container variable straight after the Transformation step has the first message id from the multiline container but I know this isn't my incorrect message.

  • BPM - Transformation Step

    In one of our BPM scenarios, while defining
    <b>Transformation</b> step.
    I have defined the interface mapping in IR. After refering the interface mapping from IR, the source and target messages are read from the interface mapping.
    the values for both source and target messages are empty.
    Should the values be given here or are they read during runtime.
    -Naveen.

    Hi Julio,
    BPM understands only abstract interface. So you will have to define a abstract interface for each message going into BPM and inbound interface going out of BPM.
    Also you can only declare asynchronous abstarct interface as the container elements. So no synchronous abstract interfaces can be defined as container element.
    So in your case you will need following interfaces:
    In case your scenario is IDOC -->  XI  -->  RFC.
    You will need:
    1) IDOC_Outbound_Aysnc
    2) IDOC_Abstract_Aync
    3) RFC_Inbound_Sync
    4) RFC_Abstract_Sync (This for sunchronous send to RFC system)
    5) RFC_Abstract_Request (This is to be used as target message in Interface mapping step in BPM)
    6) RFC-Abstract_Response
    In your transformation step the mapping would be between IDOC_Abstract_Aync and RFC_Abstract_Request  as only abstract asynchronous messages can be used in the scenario. Then the send sync will send the message sync to rfc system and the response can again be used further in BPM only in abs_async mode.
    Hope this helps.
    Regards,
    Ashish

  • BPM Transformation Step Failed

    Hi All,
    We have a scenerio-1 developed where we use the BPM. I have tranforted the Scenerio-1 from Development system to the QA system. The scenerio is based on FILE TO FILE using BPM. I have process the file after the transport and found that the scenerio works fine.
    Now, i have deleted one perticular MT/DT/ from scenerio-2  but this is used by the scenerio-1. Now i have reimport all the objects in Scenerio-2/Scenerio-1 and everything looks smiliar.
    Now when i am trying to process one file by Scenerio-1 the message process without performing the transformation steps.
    In BPM i have te following steps..
    1= Receive the messages.
    2= Loop to receive next message
    3= Append the messages in a container.
    4=Transform the message to three other messages.
        a. One with -ve items
        b. One with +ve items.
        c. one with control details.
    5= Send the messages through sends steps.
    Adding to the above condition, i have also cehcked the testing of MM at IR which is sucessful.
    NOW WHEN I AM TRYING TO PROCESS ONE FILE IT FAILED IN THE TRANSFORMATION STEP AND THE MESSAGE GET PROCESSED WITHOUT ANY BRANCHING..
    Can anyone guide me how can i check the exact error in the complete process.
    Thanks,
    Jay

    If your BPM is syntactically correct then you need to check the properties of each step in the flow properly.
    As you mentioned that you have copied  objects ,pls make sure the name spaces are mentioned correctly.
    check your configuration also
    refer toublesooting guide if it helps
    http://wiki.sdn.sap.com/wiki/display/BPMT/BPMTroubleshootingGuide
    Regards,
    Srinivas

  • Handling Java runtime exception on Vista OS

    Hello Forum members,
    This is regarding the handling of runtime exception on Vista machine with JRE 1.4.2_14.
    Iam working on client / server scenario where i need handle the run time exception say SocketExcpetion or IOException like "No Route to Host " exception whenever there is network connection problem with the server.
    Problem:
    On Windows 2000 and Windows XP OS , Iam able to get the Socket Exception from the server when there is network connection problem and based on this Iam displaying some error message to the user but on Vista am not able to catch these runtime exception since Vista OS is blocking the runtime excpetion thrown from the server or network.
    Please let me know how to configure the Vista OS to allow the runtime exception to be thrown to the user or how to handle the programmatically (using java ) on Vista OS to throw exception.
    Any suggestion is welcome
    Best regards,
    Sudhir

    I have heard that on Vista machine , by default the windows firewall will block all the runtime exceptions (especially the ones which are thrown from the server).
    This problem is with respect to Client/server scenario where the server will throw SocketException when there is network connection problem and on the client side i need to catch and handle this exception to display appropriate message to the end user.
    Background: Iam able to handle exception thrown from the server on Windows 2000 and Windows XP but on Vista am facing the above said problem i.e. am not able to get any exception from the server.

  • Trigger an exception in BPM ( Control Step )

    Hi everyone,
    I have a BPM which has a switch with three branch, one of them has a transformation to generate a mail structure and a sender to send the email, now I need throw an exception after send the email, I have think use a control step to do it, but I don't know how use the control step to throw an exception.
    Could someone please help me?
    Thanks, in advance.

    Jose,
    Please refer to the following url
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Also refer to the example scenarios in the Design: Integration Builder.  For example
    <b>Software component</b> SAP BASIS
    <b>Software component version</b> SAP BASIS 6.40
    <b>Namespace</b> http://sap.com/xi/XI/System/Patterns
    <b>Integration Scenarios and Integration Processes</b>
    <b>Integration Processes</b> BpmPatternReqRespTimeOut
    Regards,
    Mike

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • Mapping Errors in BPM

    Hi All,
    How can the mapping errors in BPM be handeld implicitly (without the use of Exception Handling Branch)
    Regards,
    Anurag

    Hi Anurag.
    Handling the mapping exceptions in BPM could be possible using the Alerts.
    Go through this blog for Alert Configuration:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    And also go through this thread:
    alert in BPM
    Hope this helps you.
    Regards,
    Hari.

  • Exception is not showing in transformation step in BPM after activating

    Hi ,
    I want to cancel the process if any mapping error occur in transformation step for that I designed by below steps.
    1.Block step ( mentioned exeption)
    2. transformation step ( Inside block mentioned block step exception)
    3. exception branc inside block
    4. contorl step (Cancel process inside exception branch)
    after activating the BPM , in transformation step exception is not showing .
    How to resolve this issue how
    Please help me
    Regards

    2. transformation step ( Inside block mentioned block step exception)
    Did you define the Exception Handler properly and also used the same in the Exception Branch? If you do a check in IR for your BPM (F7) do you get any error/ warning messages?
    Regards,
    Abhishek.

  • ** Transformation step - 1:n mapping error - BPM

    Hi friends,
    In my BPM transformation step I am doing 1:n mapping. I created & tested the message mapping and Interface mapping for this. Its working fine there. But, while I put the payload, the message is not splitted. Instead only the first message is splitted.
    Source Payload
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:PurchaseOrder xmlns:ns0="http://www.XYZ.com/ABCD/SDFunctions">
    <row>
    <PONO>5005</PONO>
    <PODATE>2008-06-09</PODATE>
    <VENDOR_CODE>0000100614</VENDOR_CODE>
    <REFERENCE>PENA</REFERENCE>
    <MATERIAL_CODE>100-00</MATERIAL_CODE>
    <ORDER_QTY>1</ORDER_QTY>
    </row>
    <row>
    <PONO>5006</PONO>
    <PODATE>2008-06-09</PODATE>
    <VENDOR_CODE>0000100614</VENDOR_CODE>
    <REFERENCE>PENA-1</REFERENCE>
    <MATERIAL_CODE>100-100</MATERIAL_CODE>
    <ORDER_QTY>4</ORDER_QTY>
    </row>
    </ns0:PurchaseOrder>
    But, only the message is splitted comes in SXMB_MONI with the following error.
    HTTP response contains status code 500 with the description Timeout Error while sending by HTTP (error code: 500, error text: Timeout)</
    What could be the problem ? Why second message is not splitted. Is it required to add any Receiver Determination step in ID ?
    Kindly tell me, friends.
    Thanking you.
    Kind Regards,
    Jeg P.

    Hi friends,
    I have corrected Message Mapping and Interface Mapping. If I send 2 message (source), I will get only 1 message in the target side. (after transformation)
    In my BPM design, after 'Transformation' step, one block is there, I set property Mode as 'For Each', and I set Multiline Element.
    Now, the 500 Internal Server problem has gone. But, why the 2nd message is not entered into block ?

  • BPM Transformation Error not Raising Exceptions

    Hi,
    I've got a BPM receives a message, then call a transformation step and then send the message.  I've created exception branches for the transformation and send steps.  If the message mapping called in the transformation step works, the message is send, no problems.  If a message mapping exception occurs, for example a string index out of bounds, the exception branch is not executed.  Instead the BPM continues to the send step and an error occur because of the empty container element.(the container is empty because the mapping fails).  SAP Help states that an exception is "Thrown when a permanent system error occurs" in the Transformation step.  My question is what exactly is a permanent system error if normal message mapping exceptions is not a permanent system error?  And also, how do I generate a permanent system error when a message mapping exception is thrown in order for the exception branch in my BPM to execute?
    Any suggestions will be appreciated.

    I dont think there is a direct way to raise such error in mapping
    What is the sxi_cache status for ur integration process?
    Here r the steps for which permanent error is thrown
    http://help.sap.com/saphelp_nw04s/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm
    Regards,
    Prateek

  • IDOC in transformation step with multi mapping

    Hello,
    I have found this posting
    Splitting a message into multiple Idocs
    and now I am a little bit afraid that our planned process using BPM is not working:
    a) XI receives an IDOC
    b) XI continues with calling an external system sync.
    c) Sync message response and IDOC are used to be merged into one new message M using transformation step (2 messages into 1 new)
    d) send message M to receiver
    Now I have read (see link) that IDOCs cannot be used in such multimapping steps. Is this true?
    Can anybody give some information?
    Best regards
    Dirk

    Hi Michal,
    this answer gives hope!
    So I think there is a misunderstanding in using the "multimapping" term?
    Multimapping in a simple Interfacemapping for 1 sender to n receiver is different from the "multimapping" issue in a transformation step in BPM?
    The central assumption in the mentioned blog was:
    IDOC cannot be used in multimapping because IDOC adapter runs on ABAP engine.
    In BPM transform step we are on Java side and using XML payload! So this will set us apart from the IDOC adapter ABAP engine issue?
    That would be nice!
    Regards
    Dirk

  • Making correct use of Mappings: Transformation Step in BPE

    Hi everybody,
    in SAP Docu, I found the recommendation to use Transformation Step only for those kind of mappings that cannot be done in the Integration Engine (e.g. n:1 mappings)
    http://help.sap.com/saphelp_nw04/helpdata/en/d5/be364296f1b26be10000000a155106/frameset.htm
    Can anybody give me the rationale behind this recommendation?
    regards,
    Peter

    Peter,
    That's because u have to use BPM for n:1 or 1:n type of mappings.It can't be done through normal map programs.Hence for the better design if u have normal map then u can perform mappings either before where BPM receive step will receive transformed message or after BPM where maps source message would be fetched from BPM.
    Technically BPM transform step is the part of the workflow and it communicates with Java stack for mappings.Thus I guess eliminating Transformation step in normal map would reduce this communication time and thus improves the performance of the interface.
    Regards
    Rajeev

  • BPM problem: mapping in a transformation step

    Hello,
    In my current BPM scenario....
    1)I created the interfaces below for the Receive step (receives MT_Request):
    -MI_async_BPM
    -MI_async_abstract
    2)Then I created the interface and mapping for the transformation step:
    -MI_JDBC_async_abstract
    MM(MT_Request to MT_Request2)
    IM(MI_async_abstract to MI_JDBC_async_abstract)
    3)Then I created the interface and mapping for the Send step:
    -MI_JDBC_async_in
    MM(MT_Request2 to MT_DB_Insert)
    IM(MI_JDBC_async_abstract to MI_JDBC_async_in)
    Problem:
    However, after I executed the scneario, it appeared the step 2) didn't go through correctly(error message:<b>NO_RECEIVER_CASE_ASYNC</b>).  Did I set up the configuration wrong in Integration Process?
    Also, I went back to ID to create a Receiver Determination for step 2) (thought this may clear the problem), but in the Sender tab of Integration Process object, MI_async_abstract was not in there.  Please give me a hand on this problem.  Thanks.
    Regards,
    Steve
    Message was edited by: steve peng
    Message was edited by: steve peng

    Hi Steve,
    Below is the explanation for correlation by Anand Torgal which i think will be helpful to u....
    To explain you the correlation in simple terms...take a simple example of BPM with a send step(async request) and receive step(async response). I am sending a PO request using the send step and waiting for a PO response using the recieve step. Assume that i have two instances of this BPM running i.e two PO request's going simultaneously. when i get the response back for these two requests , there will be two recieve steps waiting for the response since there are two instances of BPM running. the response need to be assigned the corresponding requests. This is where correlation comes into picture. I can use PO number as my correlation field. i.e I activate my correlation in the send step and use this correlation in receive step (this is configurable in BPM).
    Example: PO number needs to be part both request and the response message structure.
    BPM instance1:
    send step -> activate correlation -> send message with PO Number1
    Receive step -> use correlation -> receive response message with PO Number 1.
    BPM instance1:
    send step -> activate correlation -> send message with PO Number2
    Receive step -> use correlation -> receive response message with PO Number 2.
    There are many different scenario's whre you can use the correlation..this is one of them...The weblog shows another way of using correlation.
    Also Refer SAP help...
    Correlating Messages
    Use
    You use a correlation to assign messages that belong together to the same process instance. A correlation joins messages that have the same value for one or more XML elements. A correlation is therefore a loose coupling of messages: at design time, it enables you to define which message a receive step must wait for, without knowing the message ID.
    For example, in a process, receivestep_1receives the message purchaseorder, while receivestep_2receives the message salesorder. Receivestep_1creates a correlation that defines that the corresponding sales order must have the same purchase order number. Receivestep_2uses this correlation. This means that an instance of the process processes a purchase order and the corresponding sales order, which has the same purchase order number.
    If it satisfies the relevant correlations, a message can be processed in multiple processes. However, a message is only delivered once per process.
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/64373f7853494fe10000000a114084/content.htm
    Regards,
    Abhy

  • BPM Error in Transformation Step: Interface Mapping not found

    Hi,
    Can you help me on this? I have a tranformation step in my BPM that combines a request and response message of a previous Send step to create a Source message for the next Send step. However, on my transformation step, I got the mapping error in workflow log: Interface mapping http://gl.euhreka.com/learning/skillsoft/catalogSy.YGLXI_OM_MergeRequestAndHandleResponseAB_To_PollFo (SWCV=DF8549309ECE11DFB58DF3570A341E0F) not found
    Do you have any idea about this error? My mapping program is working fine. I also checked if the container elements assigned to the transformation steps are correct. 
    Can you suggest of other way on how can I achieve on merging 2 messages (request and response) and set it to the Request for another send step?
    Thanks,
    Jenny

    Hello,
    I already solved the problem. The namespace and Operation mapping name is too long that's why it cannot be located at runtime.
    After the rename, another error appeared.
    "Incorrect XML format after mapping: Root-Tag expected instead of Messages"
    There are no useful information on the trace:
      <?xml version="1.0" encoding="utf-8" ?>
    - <MappingTrace>
      <Trace level="1" type="T">Mapping http://test YGLXI_OM_Merge , Software Component Version DF8549309ECE11DFB58DF3570A341E0F</Trace>
      <Trace level="1" type="T">Mapping Step 1 , Type XSLT , Program PollForReport_Merge</Trace>
      <Trace level="2" type="T">Call XSLT processor with stylsheet PollForReport_Merge.xsl.</Trace>
      <Trace level="2" type="T">Returned form XSLT processor.</Trace>
      </MappingTrace>
    Here is myXSLT program:
    <?xml version='1.0' encoding='utf-8' ?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  >
         <xsl:template match="/">
              <YGLXI_MT_PollForReportRequest>
                   <customerID>
                        <xsl:value-of select="//customerID"/>
                   </customerID>
                   <customerPassword>
                        <xsl:value-of select="//customerPassword"/>
                   </customerPassword>
                   <reportIDHandle>
                        <xsl:value-of select="//reportHandle"/>
                   </reportIDHandle>
              </YGLXI_MT_PollForReportRequest>
         </xsl:template>
    Here is my source message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:YGLXI_MT_InitiateFullCourseListingRequest xmlns:ns1="http://gl.euhreka.com/learning/skillsoft/catalogSynchronization">
             <customerID>ZZZ</customerID>
             <customerPassword>XXX</customerPassword>
             <reportFormat>VVV</reportFormat>
             <mode>VCC</mode>
             <userName>CC</userName>
          </ns1:YGLXI_MT_InitiateFullCourseListingRequest>
       </ns0:Message1>
       <ns0:Message2>
          <ns1:YGLXI_MT_InitiateFullCourseListingResponse xmlns:ns1="http://gl.euhreka.com/learning/skillsoft/catalogSynchronization">
             <reportHandle>SADA</reportHandle>
          </ns1:YGLXI_MT_InitiateFullCourseListingResponse>
       </ns0:Message2>
    </ns0:Messages>
    I tested my program in Operation mapping and it is working. How come it is not in BPM?
    Thanks,
    Jenny

Maybe you are looking for