Handling Execption in ccBPM.

Hello to All.
Recently I working with SAP XI (now SAP PI) since one month ago, I have a few experience with this module.
I need to handle execption and error. I read about that , some persons told me use BPM . and other said use Fault Message Type.
Please anybody help me?.
Thanks and Regards.

Hi Luis Ortiz,
Yes it is right that you can handle error in both the way.
In BPM you can handle exception(error) on any step by using block with exception branch. You have to define exception for that block and insert exception branch. Assign that exception to the exception branch.  And put your processing step inside block. In properties window of that step select exception. In exception branch you can do whatever you want to do in case of error e.g. you can send a message or you can terminate the processing by using control step etc.
Whereas in case of Fault  Message
If you define Message Interface using Fault message in any Synchronous or Inbound Asynchronous and use this MI in an interface. If any error occured in this interface, whether System Error or Application Error, Fault message will be return to XI.
But as per my knowledge you cannot send content of this fault messge to any system.
Regards,
Sami

Similar Messages

  • Need some examples how to handle execptions in bpm

    hi guys,
    can any one provide an link where i can get some examples how to handle exceptions and fork etc., in bpm
    regrds
    viswa

    Hi,
    Check this SAP help.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm</a>
    Regards,
    Sudharshan.

  • Show PDF document in Browser (Internet Explorer)

    Hi
    I need to show a PDF document in Internet Explorer.
    We have some static PDF documents in the application. Depending on user selection we determine the name of the PDF document and somehow we have to display in Browser.
    Refer below code, steps and problem.
    Step 1) I convert the PDF document to ByteArrayOutputStream using below code in a Java class and store this stream to a session variable.
    File pdfFile = new File("c:\\temp.pdf");
    byte[] data = new byte[(int) pdfFile.length()];
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    FileInputStream fileInputStream = new FileInputStream(pdfFile);
    int count = 0;
    while (fileInputStream.read(data) != -1)
    byteArrayOutputStream.write(data, 0, count);
    Step 2) After this the control is transferred to a servlet. It retrieves the stream from session variable and does following (Servelt is called such that it should open new browser window. This is OK.)
    response.setHeader( "Content-disposition", "inline; filename = avb.pdf");
    response.setContentType("application/pdf");
    response.setBufferSize(byteArrayOutputStream.size());
    response.setContentLength(byteArrayOutputStream.size());
    try
         byteArrayOutputStream.writeTo(response.getOutputStream());
         response.flushBuffer();
    catch (IOException e)
         //Handle execption               
    PROBLEM: It asks to save pdf document. But after saving I am not able to open document. It shows messge that the document is not of PDF type. But it is actually a PDF so my guess is that something is wrong in above code snippets.
    Please help.
    Thanks.

    FileInputStream fileInputStream = new FileInputStream(pdfFile);
    int count = 0;
    while (fileInputStream.read(data) != -1)
        byteArrayOutputStream.write(data, 0, count);
    }Poor unloved count variable.

  • Enterprise Service Orchestration in PI 7.1

    Hi All,
    I need some information on how to implement Service Orchestration in PI 7.1 using BPEL or Process Component Models. Kindly suggest some scenarios which I can implement for the same. I need the technical details and implementation steps to be followed.
    Thanks,
    Sonam.

    Transaction Handling option of ccBPM could be considered as one of the service orchestration option. If you are talking about the modelling related service orchestration through BPEL, then it could be designed in ARIS as shown
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b70c0449-0a01-0010-bbb0-b5001814caa3
    Regards,
    Prateek

  • How to handle an execption error???

    when i try to compile ,,,,,, i got this err msg.
    unreported execption something something: must be caught or declared
    to be thrown
    but i don't what it means what should i fix up??
    i was just trying to create an object
    my object is
    Card card = new Card()
    but actually my Card class has exception something like this....it is provided by tutor..
    Card() throws InvalidCardException
    and i just wanna create an object.....but....can't...
    i don't know what the problem is.........

    Here's a quick overview of exceptions:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.
    The Java� Tutorial - Lesson: Handling Errors with Exceptions
    http://java.sun.com/docs/books/tutorial/essential/exceptions/

  • Regarding Exception handling in ccBPM

    Hello all,
                  I am currently working on a scenario where I require to stop the ccBPM processing for the manual restart "SWF_XI_SWPR" once the data issues are fixed. for the ccBPM to stop I am raising the exception which in not handled in the available exception branches but when I restart after the data fixes it is not proceed rather it goes into state of in process and does not return.
    Any help on this is greatly appreciated....
    Thanks in advance,
    Mahamood.

    If there are any errored entries of your BPM in tcode SWWL then first clear them and then reprocess the message.
    for the ccBPM to stop I am raising the exception which in not handled in the available exception branches
    You seem to be abruptly ending the BPM.....any particular reason of having such a design approach....this may lead to failed instances in SWWL.
    Regards,
    Abhishek.

  • How to handle an execption occured in a particular activity

    Hello All,
    How can I handle the exception occured in a particular activity...so that I should be able to proceede with the rest of the activities in the bpel process.
    For eg: if an exception occured in an invoke activity..process should not terminate there...but..an handler should be called specific to this activity and rest of the flow should be exceuted intact.
    Thanks
    Saikrishna

    Krishna,
    Add a Scope activity in the BPEL flow and put the invoke activity inside this scope.
    You can add exception handlers at scope level, if any exception would occur while invoking a service it would be handled by the exception handlers of the Scope. The exception wont be propagated to the process level exception handler until you re-throw it.
    Adding activities in a scope and handling exceptions at scope level will help rest of the flow to execute without any problem.
    Thanks,
    Dharmendra
    http://soa-howto.blogspot.com

  • Discussion: Transaction Handling in ccBPM

    Regards
    Daniel

    This pdf give some background on transactions and error handling within esb 10g.
    http://www.oracle.com/technology/products/integration/esb/files/esb-transactions-errorhandling.pdf
    not very detailed

  • Handling the ASSIGN_TYPE_CONFLICT in a try catch block

    Hi,
    Post WAS 610 all system exceptions are handled by exception classes, I could not find the exception class for the runtime exception ASSIGN_TYPE_CONFLICT, if any body is in knowledge of the same or knows of a better way to handle the runtime exception kindly let me know.
    Thanks in advance.
    Aniruddha Gargya

    Hi Raja,
    I have already tried all teh exceptions listed for type conversion and assign. The help document also suggested that teh exception class name for a runtime exception will appear in the system trace.
    The issue still remains where it was, When i get this execption from a web page the same is not being caught.
    Thanks and Regards,
    Aniruddha Gargya

  • Handling of SOAP Faults in SOAP Clients consuming PI Web services

    Hi there,
    the following is in regards to SOAP fault error handling in a SOAP client that consumes a Web Service published by PI.
    I have been reading a number of threads and blogs in regards to this topic and I am still left with some open questions which I hope to get some final answersclarifications through this thread.
    In particular the blogs
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI      - Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
    XI: Propagation of meaningful error information to SOAP Client     - XI: Propagation of meaningful error information to SOAP Client
    have caused by attention.
    Both of these threads are realating to the Fault Message type one can use to return errors back to a SOAP Client (.Net, Java, etc.).
    In our scenario we published a number of Web Services through PI that provide functionality to integrate with an R3 back-end system using inbound ABAP Proxies.
    The services are standardised and will be consumed by a number of .NetJava applications and systems. The reason for the use of ABAP proxies is the customer specific application logic that is executed in the backend system. The Web services are synchronous and don't use ccBPM in the middle. Transformations are performed in PI combined with various lookups to set default values before the message is passed into the ABAP Framework of the R3 back-end system. The lookups are done against the R3 back-end system using the PI RFC Lookup feature.
    The inbound proxies currently return application errors as part of the response message back to the SOAP client. For more critical errors we introduced the use of Fault message types as the method to return the information back to the SOAP Client. This is all working satisfactory.
    The questions I have are as follows.
    1. When an error occurs at the IE level (e.g. mapping error), ABAP Proxy framework level (e.g. conversion from XML to ABAP format) or Adapter Framework level (Adapter releated error) a different SOAP fault message structure is returned to the SOAP Client than the one    used for the application errors. The SOAP fault message structure used in this case is the standard SOAP fault used by PI to return system errors back to the caller. For those SOAP fault messages there is no payload generated that could be mapped to the SOAP fault structure used for the application errors. This would be preferrable as there would be only one Fault message structure used for both inbound ABAP proxy generated fault messages and PI generated fault messages.
    Also the error messages generated by PI can be quite cryptic and difficult to interpret at the client end and could be filtered     ranslated during message mapping if the payload of the PI generated SOAP fault message could be accessed in a message mapping.
    Point 3 of the above thread 2759 indicates that this would be possible but doesn't outline how. Could somebody please clarify this for me as I don't believe that this is really possible ???.
    My idea instead was to use the PI SOAP fault message structure to also return application errors. Therefore I would create a Fault message type that matches the PI SOAP fault structure. This would enable the SOAP Client to handle only one SOAP Fault error structure. Would that be something to look into instead ?????.
    2. We have been looking at using the integrated WEB AS SOAP adapter instead of using the AF Sender SOAP adapter. While playing with this we encountered differences in the content returned through the SOAP fault generated by PI. A sample is below. Shouldn't the content of these SOAP faults be the same if the error that caused it is the same. Also the SOAP fault returned by the IE SOAP adapter is much more    useful in this particular case. Both errors below are the same, a conversion error from XML to ABAP took place in the inbound ABAP proxy framework of the back-end system.
    SOAP fault returned when using SOAP Sender adapter of AF
    <!see the documentation>
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>ADAPTER.JAVA_EXCEPTION</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
         at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    SOAP fault using integrated SOAP adapter of PI IE
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>System Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context/>
                   <code>ABAP.PARSE_APPLICATION_DATA</code>
                   <text>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXSBE20FF604BAFEF8D990A XML Bytepos.: 564  XML Path: ns1:CreatePORequest(1)POHEADER(2)COMP_CODE(1) Error Text: Data loss occurred when converting ############################## Kernel ErrorId: CONVT_DATA_LOSS))</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    I have been reading threads for hours without being able to find one that answers questions 1 or provides a blog that outlines the approach one should take for error handling in SOAP clients that consume PI Web Services (and covers both PISystem generated faults and faults raised in Proxies).
    There may already be a blog or thread and I just missed it.
    Any comments are welcome.
    Thanks. Dieter

    Hi Dieter,
    As Bhavesh already mentioned fault messages are used for application errors. The same is described in SAP XI help:
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    In case of system error (e.g. field length too long in proxy call or error in XI/PI mapping) there seems to be no standard way of handling it and propagating the response to the consumer of webservice.
    Each system error is not recognized by SOAP adapter and SOAP adapter exception is raised.
    The only bizzare solution that I can see is developing an adapter module and transport wrong message to standard fault message before delivering it to adapter engine:
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    Kind regards,
    Wojciech
    btw nice thread

  • Process multiple documents in zip file without using ccBPM in PI

    Hi,
    Is it possible for PI to handle multiple documents within a zipped source file without the use of ccBPM?
    For example, I have an incoming source zip file containing 0.pdf, a,xml, z.pdf respectively,  After having the sender communication channel uncompress the zip file, each pdf file should be pushed to a directory on a file server, and the xml file should go through a message mapping.
    Is this possible to process all of the files without the use of ccBPM?
    Regards,
    Jim

    Hi Michal,
    Thank you for your response.  The example I provided is just one potential case.  In general, the zip file will always contain 1 xml file and 0-n PDFs, Word docs, or other types of documents.  Also, the first file in the zip may not always be the xml file, which is what I was trying to portray by my example.  Since I am not sure how many non-xml files will be included, I did not know if I could handle all of them directly, without ccBPM.
    At this point, I am leaning towards using a script preprocessor to uncompress the zip, then for each file found, push the xml file to an NFS channel which will process/map the xml, and push every other file type to another NFS channel to copy these documents to a predetermined directory on a predetermined server.
    What are your thoughts on this approach?
    Thanks and Regards,
    Jim

  • Java mapping in ccBPM works in PI 7.0 but fails in PI 7.1

    Hi guys,
    at the moment we are upgrading form SAP PI 7.0 to SAP PI 7.11.
    In a scenario for processing of incoming orders we use an ccBPM.
    In this ccBPM there is an mapping where the original xml document of the order are combined with some
    additional information form an web service (multi mapping 2 => 1)
    The result of this mapping is processed further to create an sales order in the backend.
    The multi mapping an java mapping is used.
    Now we are testing the scenario with PI 7.11 and it fails at this mapping step.
    in the workflow log following error occurs.
    An exception with the type CX_ST_MATCH_ELEMENT occ urred, but was neither handled locally, nor de
    Message no. W8899
    I tested the same message on out SAP PI 7.0 system and the whole ccBPM works well.
    When I extract the 2 messages from workflow log and paste them into the test tab of the operation mapping of Enterprise Service Builder of SAP PI 7.11, surrounding by the envelope used by multi mappings
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
                   XML MESSAGE 1
       </ns0:Message1>
       <ns0:Message2>
                   XML MESSAGE 2  
       </ns0:Message2>
    </ns0:Messages>
    the mapping works without error, but at runtime it fails, throwing the error mentioned above.
    What could be the reason for this error?
    Does the multi mapping change in PI 7.11 at runtime?
    Could it be a problem parsing the multi message?
    Any help appreciated.
    Kind regards
    Jochen

    Hi Raja,
    thanks for your suggest.
    I know this issue, the java class files are compiled using jdk 1.5.
    We made some more tests.
    e.g. created an dummy ccBPM with two mappings, one two spilt the incoming message in two messages (graphical message mapping) and one to merge this two messages to one message again (java mapping)
    the mapping works at design time on test tab, but fails with the same error at rumtime.
    Also we tested one single operation mapping with this two mappings (split via graphical mapping and merge via java mapping)
    This works also at design time but fails at runtime with a similar error shown in smq2
    The error message is Error ST_MATCH_FAIL occured. P1=element-start P2=M
    we tried to add the whole incoming message to the trace by
    getTrace().addWarning()
    but an trace object is never created in for this step in the workflow log.
    it seem whether you can not add trace messages using the command or that the error occures before this command will be used.
    Kind regards
    Jochen

  • Exception handling in rfcs and bapis

    exception handling in rfcs and bapis

    Hi Jayakrishna,
    In General , there are non execptions in BAPIs, because of the reason, that the exception raised in a SAP envoronment may not mean anything for a non SAP initiator. All the exception situations would only fill the return table(TYpe BAPIRET2 or something like that). If you read that table after the call to the bapi, you can understand what has gone wrong.
    Regards,
    Ravi

  • Exception handling in ucm

    hi,
    I have created a custom component that has a service which invokes my custom java methods. I would like to redirect to two error pages depending on the exception thrown by the java method? How exception handling is done in UCM. I see a text box called error messages while creating the service and service actions. But that message is not printed when my java method throws application specific exceptions.
    Is there a way to handle the exception at Service configuraration / UI side and redirect to two different meaningful error pages dependinf upon the thye of exception
    Thanks,
    Siva

    Hi Jayakrishna,
    In General , there are non execptions in BAPIs, because of the reason, that the exception raised in a SAP envoronment may not mean anything for a non SAP initiator. All the exception situations would only fill the return table(TYpe BAPIRET2 or something like that). If you read that table after the call to the bapi, you can understand what has gone wrong.
    Regards,
    Ravi

  • Exception handling in workflow

    I've read few forums on exception handling in workflow, and tried working accordingly. Created a block and on normal branch, ive added "user decision" step, mail step...
    On the other (exception) branch, ive sent a mail to HR informin tht workflow went in error.
    My question is: Do i have to put "condition" step to check if email ID exists or not...or if agent is found or not, before i raise the exception? Is there no way the workflow detects any exception n incase its caught, it should raise it ?

    Try some thing like this
    1. Declare execption in the BOR method by using  the button EXCEPTIONs on the application tool bar and raise it by using the Macro EXIT_RETRUN inside the method., By doing like this whe you attach this BOR method to the Activity step a separate outcome is created , and add what ever steps you wanna do in this step.

Maybe you are looking for