A new approach to JSF error handling?

Hi.
I would like to run an idea by the community to check that I am not being crazy in doing this stuff. I would appreciate any comments, criticism or ideas.
I was thinking about JSF's error processing mechanism, specifically about how label text gets associated with an input field. So, I am talking about this kind of stuff:
<h:outputLabel for="firstName" value='#{msgs["applicant.search.firstName"]}: ' />
<h:inputText id="firstName" value='#{applicantDetailsBackingBean.firstName}' required=�true�/>If the value is not entered into the input field, we will get an error message saying:
�First Name�: is required.
So HtmlMessageRenderer has replaced the field id in the FacesMessage with the label text by using the association set up with the 'for' attribute on the label. All of this message "decoration" work happens in the RENDER phase in a centralized location. I see a couple of weaknesses in this approach
1) It is too late for resolving label text data if the label is inside a data table
2) JSF establishes associations between label text and the input fields by using the label components to point to their input fields. Although this seems more natural, it limits label text sources to just the label components present on the current page (or whatever is nested under them), which makes it impossible to associate input field messages with label text that does not exist on the page in its entirety.
Let's look at a couple examples, both of which I ran into in my application:
1) Consider a situation in which we have a dataTable where every row consists of a student name and an input field for entering their assignment mark. The validation on the input field will be restricted to valid letter grades only. If the user enters an invalid grade, we want them to see an error message of the form: +�The mark entered for <student name> is invalid�.+ Since <student name> is dependent on the row in which the error occurred, this error message is not possible to generate with bare JSF functionality.
2) Another situation that gets us in trouble is when the label text we want in our error message is not on the page (or not in it's entirety). For example, your page could be split up into multiple parts with those parts having input fields with the same name. We would want the error message to include the page part as well as the field name. This is not easily achieved with the bare JSF functionality.
So to generalize, any situation where a label component with a static value throughout the lifecycle is not available will cause difficulty.
Please correct me if I am wrong on any of these points.
Since in my app I had a lot of complicated pages to deal with, I solved my difficulties by writing a very simple framework that I called Message Decorator Framework (MDF). It enabled me to easily construct much more detailed error messages than what the standard JSF approach seems to allows for. MDF provides a mechanism to specify the label text to be applied to a validation or a conversion message by either a literal, an el expression or via an id of another ValueHolder and all of these work in data tables.
The idea is a s such, and this is what i would like your opinion on:
MDF provides more flexible message decoration by adapting the opposite approach to the one used by the JSF:
1) Message decoration is decentralized. MDF wraps converters and validators on individual input fields and performs message text replacement right on the spot in the PROCESS_VALIDATIONS phase, when all of the pertinent data for resolving the label text is still available.(i.e the components in data tables would still have the correct values for the current row being validated)
2) The label text to be used is specified by the input field, not the label. This allows the developer to reference any text value, instead of tying them to a specific label component.
Pictures are better than words, so here is an architectural diagram:
http://www.imagehosting.com/out.php/i1259440_ArchitectureDiagram.png
The framework consists of two main classes, ConverterMessageDecorator and ValidatorMessageDecorator. I will just talk about the converter part, b/c the validator part is very similar but wraps a list of validators instead of one converter.
So ConverterMessageDecorator is a JSF converter. Its purpose is to wrap the converter that is going to do the actual conversion work and decorate the FacesMessage inside ConverterException if one was thrown.
The converter to wrap can be either determined automatically based on the type of the value reference of the input field or specified explicitly. This converter decorates the message by replacing all instances of the input field�s id with the resolved label text. The power of this approach is that not only do you get a much more flexible way to specify what the label text is (either fieldLabel or fieldLabelComponent attributes), but now data tables are no longer a problem.
Here are some usage examples:
<h:inputText value='#{section33SetupBackingBean.contribution.sampleGatePct}'>
   <md:decorateConverterMessage fieldLabel= '#{msgs["section.34.setup.contribution.initial.sampling.gate.max.size"]}' />
</h:inputText>
�etc�
<h:inputText value='#{section33SetupBackingBean.payment.sampleGatePct}'>
   <md:decorateConverterMessage fieldLabel= '#{msgs["section.34.setup.payment.initial.sampling.gate.max.size"]}' />
</h:inputText>The two input fields have exactly the same labels on the screen (they are in two different parts of the page), so if we used their respective labels, the error messages would look the same for these two input fields.
More complicated example:
<h:dataTable value="#{paymentCalcBackingBean.currentPaymentPercentages}" var="currentPercentage" >
<h:column>
  <ops:refDataDescription id="provinceLabelTextId" refDataType="provinceStateType"
            code="${currentPercentage.programProvince.provinceStateTypeCode}" />
</h:column>
<h:column>
  <h:inputText value="${currentPercentage.federalPercentage}">
<md:decorateConverterMessage fieldLabelComponent="provinceLabelTextId"  valueRequired="true" >
   <f:converter converterId="ops.PercentageConverter" />
</md:decorateConverterMessage>
<md:decorateValidatorMessage fieldLabelComponent="provinceLabelTextId" >
   <f:validator validatorId="ops.PercentageValidator" />
</md:decorateValidatorMessage>
</h:column>
�etc�
</h:dataTable>This would produce errors shown in this screenshot: http://www.imagehosting.com/out.php/i1259418_Example3.png
Here is another example that shows off what you can do by referencing other ValueHolders on the page.
The code is exactly the same as the snippet shown above, but the inputText component is referencing a text box, so the label text is going to be whatever the user types into the text box:
http://www.imagehosting.com/out.php/i1259467_Example4.png
Does this approach seem reasonable to people, or am I reinventing the wheel? Please let me know.
Val

Try restarting the DTR application and see if the problem persists.

Similar Messages

  • JSF error handling when the bean is not correctly loaded

    Hi,
    I am doing some error handling in JSF and I want to do it in an elegant way. I have the following scenario for error handling.
    When the bean is initialized I load the bean with values from DAO which give SQL Exceptions.
    Since the bean is not loaded I properly I have to send the user to an error page showing the error message why I am sending the user to this page.
    I can do it by [ FacesContext.getCurrentInstance.redirect("/error.jsf") ] doing so I will loose all the FacesMessages that are added by the exceptions.
    Instead I want to use the [ FacesContext.getCurrentInstance.dispatch("url") ] which will allow the transfer of the user but I get the following
    16:59:39,341 WARN [lifecycle] executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@8537f9) threw exception
    java.lang.ClassCastException: javax.faces.component.UIViewRoot
    and the method that I am calling is
    public static void programErrorEnd() {
    logger.info("in the prgmErrorEnd mehod");
    //intializing the contex object
    FacesContext ctx = FacesContext.getCurrentInstance();
    try {
    //ready to dispatch the url.
    //ctx.getExternalContext().redirect("app/error/prgmerror.jsf");
    ctx.getExternalContext().dispatch("error/prgmerror.jsf");
    } catch (IOException e) {
    //TODO what to do when there is an error at this stage.
    finally {
    ctx.responseComplete();
    }Thanks and Regarding
    Edited by: sgatl2 on Aug 28, 2008 2:32 PM
    Edited by: sgatl2 on Aug 28, 2008 2:45 PM

    Just let it throw the exception and define an error-page entry in the web.xml which catches the specified exception (or a superclass of it or a HTTP status code) and displays the error.jsf page accordingly.

  • New SOD and enhanced error handling?

    Hi,
    I have been studying the new SOD. It looks very good. The only thing I am missing is enhanced error handling. Has this been dropped or is it under "Numerous functional and performance improvements"?
    Being able to catch exceptions from database triggers etc. is the only bigger flaw I see in this great tool ;-)
    Regards Pete

    Pete,
    Yes we are still intending to enhance our error handling capabilities.
    We have not finalized exactly what enhancements we are making with these yet.
    Regards,
    David
    Message was edited by:
    dpeake

  • JSF error handling

    jsf impl version 1.1
    When loading a jsf with (http GET), I am sending a get-parameter (ID=123). When resolving this in the domain model, this might cause an exception which needs to be handled. How do I correctly redirect to an error page in this case?
    Regards
    tnilsen

    Depends on business requirements. You can define an error-page for specified exception (sub)classes in web.xml. But you can also invoke HttpServletResponse#sendRedirect() to the desired page. Or simply use h:message / h:messages to display a message.

  • Dml error handling in 10g

    i have a procedure with an insert statement that is using the new oracle 10g dml error handling LOG ERRORS INTO err$_dest ('INSERT') REJECT LIMIT UNLIMITED;
    i understand this will execute when you have a violation like not null columns etc.
    according to oracle website, this command will fail if there is a space problem and everything will roll back. will i get an error message in such scenario and can i use regular exception handling to handle this.
    example code
    begin
    insert into dest values(1, 'smith', 1234, 'dest')
    LOG ERRORS INTO err$_dest ('INSERT') REJECT LIMIT UNLIMITED;
    exception when others
    //login error cause by log errors command
    end;

    The inserts into the err$_dest table will NOT be rolled back as they are autonomous transactions. We were able to handle other errors such as tablespace sizing issues in the exception section.

  • Error Handling in OS 10gR3: How To's, Approaches, best practices

    I am trying to do error rhandling within OSB 10gR3 and looking for some guidance as to best practices and how to carry out the error handling based on my use-case as -
    Consumers ---> GenericProxyExt(WSDL based) ---> GenericProxyInt(Any SOAP) ---> Proxy (Any XML) ---> Business Service --------------> Target Service
    Since target web service will pass error in the SOAP:fault, where in the OSB should this error be handled? Also, how can I pass the custom error messages (instead of the one returned from the target service). Do I have to write error handlers in each of the proxy services?
    Any insight, sample code, approaches will be helpful
    Thanks,
    -J

    user2629959 wrote:
    I am trying to do error rhandling within OSB 10gR3 and looking for some guidance as to best practices and how to carry out the error handling based on my use-case as - Some customer has documented related info www.insemble.com/CustomExceptionHandlingwithOracleServiceBus.pdf
    >
    Consumers ---> GenericProxyExt(WSDL based) ---> GenericProxyInt(Any SOAP) ---> Proxy (Any XML) ---> Business Service --------------> Target Service
    Since target web service will pass error in the SOAP:fault, where in the OSB should this error be handled? Also, how can I pass the custom error messages (instead of the one returned from the target service). Do I have to write error handlers in each of the proxy services?Not sure if I understood your point of using that many proxies for invoking a Target Service.
    Since BS throws soap fault, and the last Proxy is AnyXML. You need to do bit of manipulations. First of all for AnyXML services, you have to manually copy $fault into $body. Reason behind this step, is For Any XML there is no concept of $fault being returned and reply with failure. Subsequent proxies will receive the $fault as originated in Target Service. If we want to control the $fault received by the consumers, we have to use error handlers and populate $fault accordingly.
    >
    Any insight, sample code, approaches will be helpful
    Thanks,
    -J

  • Error handling with selecting new lines

    Hi All,
    Please help me on this.
    Step 1 : Enter transaction MD07.
                   Material : 312507
                  MRP Area : w8prod
                   PLant : w8
    Step 2 : Double click on  "PurRqs".
    Step 3 : Click on -> Purchase order button.
    While recording i will follow this procedure,if i again execute the same scripts it will double click on same "PurRqs".
    But what i needed is that it has to click on next line.ie.,new "PurRqs".
    How will i solve this Error handling?
    Regards,
    Sam

    Hi kiran,
    Thanks for the reply.
    Now you can able to execute step 2.
    Double click on PurRqs(0013201371) and try to execute.
    My question is if i try to record with this PurRqs(0013201371) then if i again execute it has to take new PurRqs(0013201372).
    How to handle this parametrization.
    Script name : Z_MM_PACKAGING_27_TS
    Facing problem in this command : SAPGUI ( SAPGUI_9_1 ).
    So please help me on this.
    Regards,
    Sam

  • OSB 10gR3 Error handling and reporting action approach

    My use case:
    Simple Proxy service routes to an external web service created as Business service in OSB
    Whenever there is transport error/soap fault from the external web service, that error needs to be reported along with the original request received by the proxy service.
    What I have tried so far?
    Created a error handler/stage in the route node of my proxy service. Within that stage, added a report action to report $body which contains the error received from the external service. I created a report index key/value to report for this request, I used a specific element in the body of the original request sent to the proxy service.
    Within the route error handling stage, I realized that $body which had my original request to the proxy service lost its content and replaced by the fault from external WS. So I made a copy of $body in my request pipeline and tried to use an element from that copy to index my failed request. But the copied variable always seem to be empty within the error handling stage.
    So, my questions to the experts,
    1)What variables are visible within the error handling stage/scope?
    2)What is the best way(less overhead) to preserve my original request as $body context variable is already changed with fault by the time error handler is invoked? Remember I wanted to report the original request only incase of error, for success cases I don't care/I don't want to un-necessarily add an overhead of copying to a vairbale.
    3)Is there another proper way to simply report the original request received by proxy and fault received from external service for a given key in the request, say orderId
    Sample proxy request:
    <MyData>
    <OrderId>123</OrderId>
    </MyData>

    1)What variables are visible within the error handling stage/scope? $fault - http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1051816
    $body - http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1103311
    2)What is the best way(less overhead) to preserve my original request as $body context variable is already changed with fault by the time error handler is invoked? Remember I wanted to report the original request only incase of error, for success cases I don't care/I don't want to un-necessarily add an overhead of copying to a variable.Can you print $body and $fault variables in your error handler?. Are they different ? What I'm suspecting is the back-end webservice is faulting (returning soap-fault and http response =5xx). There is no other way I can think of than copying the contents of $body to a separate variable.
    Thanks
    Manoj

  • Error handling in overridden methods in AbstractPageBean

    Hi,
    I'm writing a small app in JSF. One of the pages populates a bunch of text fields from an XML file whose name is passed into the app as an initialization parameter. The purpose of the page is to allow editing of the fields.
    It seemed that the prerender() method was the right place to initialize the fields in the form. I have an application-scoped bean trying to open the XML file. I don't want the app to barf on initialization if the file doesn't exist, because the application contains the logic to create the file. So it just sets the appropriate forward target ("file does not exist" page, or maybe XML parse error) and lets the pages that use those bean properties decide when and if they need to display the initialization error page.
    I would like to throw an exception from the prerender() method in my page, and have the error handling specified in web.xml. The problem, of course, is that I can't throw my own exception from prerender().
    So, have I got the wrong place to initialize my form, or do I have to throw a javax.faces.FacesException, or have I got this whole error-handling thing wrong?
    Any advice would be gratefully received.
    Many thanks.
    Regards,
    Mike
    public void prerender(){
            // Get ApplicationBean1 to forward the request if we fail to
            // initialize properly.
            ApplicationBean1 ab1 = getApplicationBean1();
            HttpServletRequest req = (HttpServletRequest) this.getFacesContext().
                    getExternalContext().
                    getRequest();
            HttpServletResponse res = (HttpServletResponse) this.getFacesContext().
                    getExternalContext().
                    getResponse();
            if(!ab1.isInitialized()){
                //The initialization code for ApplicationBean1() sets the
                //target when it detects an error and then forwards the
                //request to that target upon invocation of the forwardRequest
                //method
                ab1.forwardRequest(req,res);
            // These are the input components
            tfClonebase.setValue(ab1.getClonebase());
            tfDhcpdconf.setValue(ab1.getDhcpdconf());
            tfNamedrev.setValue(ab1.getNamedrev());
            tfNamedzone.setValue(ab1.getNamedzone());
            tfPxelinux.setValue(ab1.getPxelinux());
            tfXmldir.setValue(ab1.getXmlDir());
        }

    Well, I'm certainly no expert, but prerender() is called, as you might expect, just before rendering takes place (but only if the page will actually be rendered). This means it won't be called for a page that handled a postback but then navigated to a different page. Good place to handle initializations that happen before rendering.
    So my thinking was that I could initialize stuff before there's anything in the response, making it easier to bail out if something goes bad.
    But I really can't work out the right way to bail out: I can't throw my own exception because the prerender() is overridden from AbstractPageBean. So I suppose I could create a MikesBadInitException e and throw it inside a new javax.faces.FacesException(e). But I'd like to specify an error-page in my web.xml for MikesBadInitException, and don't want to handle all javax.faces.FacesExceptions, if you get my drift.

  • LV7.1 Strange behavior with Automatic Error Handling occuring when it shouldn't [LV 7.1 Pro on WinXP for Tablet PC's]

    [LV 7.1 Pro on WinXP for Tablet PC's]
    I recently let a rather large LV app of mine run in the development environment while I was out for a couple of days. Upon returning I found that the app had hung for ~22 hours waiting for an answer to an Automatic Error Handling (AEH) dialog proclaiming an Error 7 in New File without any indication of the VI hierarchy that called New File.  I set about ensuring that AEH dialogs would not pop up and have not been able to discover how I could have possibly received one in the first place.
    Subsequent investigation revealed:
    Neither AEH option in Options>Block Diagrams were checked.
    Network problems had occurred around the time that the app had hung.  All file paths are network paths when running in the development environment, so the cause of the error was most likely valid, even if the AEH dialog appearance wasn't.
    My app has only one instance where the New File primitive is used by me. That subVI and all others above it in the hierarchy DO NOT have the AEH property enabled.  The error out cluster of New File in my subvi is wired.
    My app has three instances where New File is called from a vi.lib vi (Open/Create/Replace File.vi, Open Config Data.vi, and Prompt Web Browser Path.vi), none of which have the AEH property enabled.  Nor does any of their calling VI's.  All three instances also have their error out cluster wired.
    A utility to examine the AEH property of all VI's (with all top level and dynamic VI's loaded) in memory reported that only 1 of 308 vi's ( RGT Does File Exists.vi from the Report Generation Toolkit) had that property true.  That vi has no subVI's other than the File/Directory Info primitive and no calling VI's in common with any of the vi's that call New File, except a top level VI.
    As long as 'Enable automatic error handling dialogs' remains unselected in options>block diagram, I am unable to get an AEH dialog for either the New File or File/Directory Info primitives in a test VI with AEH property enabled and their error out clusters unwired no matter what invalid path I pass to the functions.  As soon as the options>block diagram>Enable AEH dialogs' is selected, both primitives fire AEH dialogs with no error out wired and don't when wired. i.e. works as advertised.
    In other words I can find no reason why I should have gotten the problem AEH dialog...
    I cannot afford for this app to hang because of a network problem, other portions of the app that were running concurrently correctly handled the error and, had the AEH dialog not appeared, the app would have made corrections or shutdown in an orderly fashion.
    Any ideas?

    Very good.
    Write Characters to File.vi>Open/Create/Replace File.vi>New File
    New File throws the error.  Open/Create/Replace strips the hierarchy from the source of the error.  Write Characters passes it to the General Error Handler.  I never looked above O/C/R file in the hierarchy except for enable automatic error handling property.  The tip-off should have been to realize that O/C/R file was stripping the hierarchy from the error and look above that. 
    The real irony is that Write Characters was being used to log error cluster data to an error log file...
    Save as... Copy without updating... the OEM 'Write Characters to File' is gone from this app.
    Thanx (a bunch)

  • Issue with SRDemo error handling

    Hi All,
    Glad the forums are back up and running. In debugging some error-handling issues in our own application, I found an issue in the error handling code of SRDemo. I thought I'd post the issue here, as many of us (myself included) use some SRDemo code as the basis for our own applications.
    The issue can be found in the oracle.srdemo.view.frameworkExt.SRDemoPageLifecycle class, specifically in the translateExceptionToFacesErrors method. I'll show the code that has the issue first, and explain the issue afterwards:
            if (numAttr > 0) {
                Iterator i = attributeErrors.keySet().iterator();
                while (i.hasNext()) {
                    String attrNameKey = (String)i.next();
                     * Only add the error to show to the user if it was related
                     * to a field they can see on the screen. We accomplish this
                     * by checking whether there is a control binding in the current
                     * binding container by the same name as the attribute with
                     * the related exception that was reported.
                    ControlBinding cb =
                        ADFUtils.findControlBinding(bc, attrNameKey);
                    if (cb != null) {
                        String msg = (String)attributeErrors.get(attrNameKey);
                        if (cb instanceof JUCtrlAttrsBinding) {
                            attrNameKey = ((JUCtrlAttrsBinding)cb).getLabel();
                        JSFUtils.addFacesErrorMessage(attrNameKey, msg);
                }Now, this bit of code attempts to be "smart" and only show error messages relating to attributes if those attributes are in fact displayed on the screen. It does so by using a utility method to find a control binding for the attribute name. There are two issues with this code, one obvious, and one that is a bit more subtle.
    The obvious issue: if there is a binding in the page definition, it doesn't necessarily mean that the attribute is shown on the screen. It's a good approximation, but not exact.
    The other issue is more subtle, and led to errors being "eaten," or not shown, in our application. The issue comes if you are using an af:table to display and update your data. In that case, the findControlBinding will not find anything for that attribute, since the attribute is contained within a table binding.
    Just posting this as a word to the wary.
    Best,
    john

    somehow, this message got in the wrong thread....
    Hi Frank,
    Yes, I simply scripted it out this way to contrast the behaviour if the first attribute was read-only vs not read-only. I found the issue on a page in our app that was simply drag-and-drop the VO from the data control on the page.
    It's quite annoying, because our particular use case that hit this error is a "save" button on the page. If the commit operation doesn't return any errors (and it doesn't in this use case!), we add a JSF message saying "save successful" - then the attribute errors are further added later in the page lifecycle, so we get 3 messages: "Save successful" and "Fix this error" and "Tried to set read-only attribute" - quite confusing to the end-user when the only message they should see is "fix this error."
    At any rate, the fix is to simply re-order the attributes in the page definition - that doesn't affect the UI at all, other than to fix this issue.
    John
    it was supposed to be something like:
    Hi Frank,
    Thanks for the reply. I was simply posting this here so that people who use the SRDemo application techniques as a basis for developing the same functionality in their own apps (like me) can be aware of the issue, and avoid lots of head-scratching to figure out "what happened to the error message?"
    John

  • Flex bug in global error handling

    My application's global error handler (uncaught error handler) works mostly, but I found a case where it doesn't work, but should.  Before I filed an official bug report I wanted to post the issue here.
    Here is the issue: in a module, ErrorEvents that are not listened for  and are dispatched by a Flex component are never caught in the application's uncaught error handler. 
    I have a sample project that demonstrates this.  Here is the module in my test case:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
                 xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
        <![CDATA[
            private function onClickSparkDispatch():void {
                dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );   // this isn't caught in the uncaught error handler
            private function onClickNonSparkDispatch():void {
                var nonSparkDispatcher:EventDispatcher = new EventDispatcher();
                nonSparkDispatcher.dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "test" ) );  // this is caught in the uncaught error handler
        ]]>
    </fx:Script>   
        <s:HGroup>
            <s:Button label="Module Spark Dispatch (broken)" click="onClickSparkDispatch()" />
            <s:Button label="Module Non-Spark Dispatch" click="onClickNonSparkDispatch()" />
        </s:HGroup>
    </s:Module>
    Using Flex 4.6
    My application statically links in the Flex SDK ("merged into code" in Flash Builder).
    My applications works around these two exsiting bugs:
         https://bugs.adobe.com/jira/browse/SDK-28018
         http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html
    Is this a bug?
    Thanks,
    Rick

    It’s been reported.  Here is more information and a workaround. http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html

  • Error Handling in File to Multiple IDOC Scenario?

    Hello Experts,
    My scenario is file with Multiple records and I want to send it to SAP system.If there will be 10 Records in my file I need to create 10 IDOC in Target system.
    I can use below of the two options.
    1) File to Multiple Idoc (1.N Mapping)
    2) Using BPM
    3)Directly place the file in SAP application server and process it via ABAP Program.
    However I am not clear in which option error handling will be more effective.Please suggest.
    Basically I want to handle If out of 10 records 9 are correct and 1 record is not correct then I should be able to report within PI without affecting 9 correct records.Is it possible 9 records will be sent to SAP system and PI will only show error for 1 incorrect record.
    Also I will be doing this scenrio for transaction data with huge size (1 Million Records).Which approach will be more effective in this case.
    Thanks,
    Pushkar

    Hi Patel,
    I want to handle If out of 10 records 9 are correct and 1 record is not correct then I should be able to report within PI without affecting 9 correct records.Is it possible 9 records will be sent to SAP system and PI will only show error for 1 incorrect record.
    when working on graphical mapping, the target structure is created when there are no errors in all records of source structure.
    suppose if we have validation error in 9th and 10th record, then we can not process the first eight records and inturn we can not store the two error records in XI for further.
    i suggest you the third option, you can directly place the file in SAP application server and process it via ABAP Program.
    this is far better because you can do more customizations as you have to deal with millions of records.
    Regards,
    Pradeep A.

  • DML error table intermittently fails to generate error handling in package

    Hi!
    In OWB 11gR2 (11.2.0.1), we're seeing an issue when setting the DML Error table name on a target table. Sometimes, mostly on older and complex mappings, the error handling logic does not get generated when we deploy the mapping, and nothing is populated in the error tables for error conditions, though the errors display as warnings in the OWB UI.
    When I create a new mapping that is very simple - one table loading another - setting the DML Error table name always results in errors being put in the error table. That's great, but that doesn't help us with our more-complex mappings that aren't logging errors.
    We can't determine the cause of the issue. I can't see a difference in the configuration of the mappings that work and don't work. Generation Mode is All Operating Modes. Default Operating Mode is Set based fail over to row based. We've generated the error table using DBMS_ERRLOG.CREATE_ERROR_LOG. The target tables do not have primary keys.
    I've tried synchronizing the target table operator in the mapping as another forum thread suggested. No change.
    Has anyone else seen this issue or know of a workaround?
    Thanks,
    Jayce

    Which logic did you talk about ?
    For the version 10, you will find the error table more on the insert statement such as:
    INSERT INTO "TSALES"
      ("PROD_ID",
      "SALES"."AMOUNT_SOLD" "AMOUNT_SOLD"
    FROM
      "SALES"  "SALES"
    LOG ERRORS INTO TSALES_ERR (get_audit_detail_id) REJECT LIMIT 50;Come from here:
    http://blogs.oracle.com/warehousebuilder/2007/08/set_based_errors_dml_error_log.html
    Then check the insert SQL generated.
    Cheers
    Nico

  • Transaction and Error handling in Mediator 11g

    Hi Experts/Gurus/All,
    We have following scenario in Mediators :-
    For Inbound Interfaces :-
    M1-->M2-->M3
    M1 calls M2 and M2 calls M3
    There are 3 mediators, Mediator#1(M1),Mediator#2(M2) and Mediator#3(M3)
    M1 performs a FIle Read and do a ABO-->OAGIS conversion
    M2 performs routing
    M3 performs a OAGIS -->ABO(JDE E1) conversion.
    Now,we are in middle to decide the Fault Handling Mechanism for this case.
    M1 is Asynchronous , M2 is Synchronous and M3 is also Synchronous.
    Question is :
    1. M1 will start a new Transaction,Do M1 will propogate the same transaction to M2 which,as being Synch,propogates the same transaction to M3 ?
    2. How will the commit and Roll back will be taken care of?
    3. What if M1 errors out?
    4. Whatif M2 errors out?
    5. What if M3 errors out?
    In question 3,4 and 5:
    What will happen will the Full Transaction ? If M3 erros out,would the Entire Transaction Propogated by M1 will be roll back?
    Also ,How about Error handling in this case:
    Do I need to create seperate fault-policy.xml and fault-binding.xml for M1,M2 and M3 ?
    Another Scenario is of OUTBOUND interfaces :-
    M1-->M2-->M3
    M1 calls M2 and M2 calls M3
    However , M1,M2 and M3 are all Asynchronous.
    In this scenarios how would I handle following :-
    1. If M2 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
    2. If M3 Errors out,I need the entire Interface which comprises of M1-->M2-->M3 to roll back?
    3. Seperate Transactions means I have to create seperate fault-policy.xml and fault-mapping.xml to handle errors?

    Hi,
    You could create a package, and use the OdiSqlUnload to export the data into a flat file (csv) from snp_check_tab, then amend it. Then create an interface to load the data from the flat file to your tables, either via external tables or SQL Loader.
    Question is, why are you amending data going from source to target? there surely has to be something wrong with the Architecture (especially if you are getting errors in production). If you amend data, so that it is different in source as it is in target, then when it comes to regression testing, this will never match.
    The errors should go be fixed at source, and either you, or the business should have access to do so.
    Cheers
    Bos

Maybe you are looking for

  • When I try to create a new event in iCal on my iPod Touch I cannot select "done" or "cancel" to save it?

    However when I sync my Mac and my iPod it will show up fine on my Mac. It just drives me crazy and if I had to create more than one event in iCal I probably couldn't. Any fix to this? Thanks.

  • Import data to User defined table

    Dear All I created a user define table , it is so simple . and I make it as master object and also define it as a form. I am going to import data from excel file, I also prepared import template form DTW (maintenance interface) but I cannot import da

  • How to display current context while opening a todo entry from main menu

    Hi, I want to display the current context(account,sp details for customer) while opening a todo entry from main menu while searching through To do entry id. Can any body guide me on this ? Thanx. Sunil

  • In list LIMIT

    Is there a limit on number of values you can put in "IN" Clause? select * from emp Where deptno in (10,20,30,.....n) Thanks in Advance

  • ****DT130: DRIVER ERRORS

    Hi everyone, I am getting error wile printing my reports from a client machine. Reports are developed in Developer 6i and they are running in a client/server environment. Printing is OK with windows 98 but it is giving error on systems which are usin