Datatags, Error Handling, Formatting

I've build JSP Pages on BC4J components using Datatags. I was wondering when applying DML changes how can i get write my own error code? Do I have the posibility to get the state of the attribute out of the datatags? Can i ask if the attribute is mandatory, if so, put the mandatory items in bold and when an error is raised, put the focus back to that item on the page?
Does anybody know how to do this?

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Charles (JDev team) ([email protected]):
To know if an attribute is mandatory you can use the isMandatory() method on the AttributeDef interface. The following code bold the attribute name when mandatory using jsp tags and java scriplets:
<jbo:Datasource id="ds" appId="myAppModule" />
<%
// Retrieve the attribute information by name
AttributeDef attrDef = ds.getRowSet().getViewObject().findAttributeDefs("myAttributeName");
boolean isMandatory = attrDef.isMandatory();
if (isMandatory)
%><b>
<% } %>
<%=attrDef.getName()%>
<%
if (isMandatory)
%></b>
<% } %>
In the next release there is a new tag to handle the definition information for an attribute. It will make it easier to access this information.
<HR></BLOCKQUOTE>
Thank you for the answer but i was wondering that we can focus our attributes, for example the attribute that was wronlgy updated or inserted has to get focus en a custom error message.
How can we put the focus on our items and give custom errormessages?
null

Similar Messages

  • Log format of SAF error handler

    Is there any link/document available that gives an idea of the format to provide in the "log format" while creating SAF error handler?

    Here's a little more detail that should help:
    Using the same JMS module that contains the configuration for the original imported destination, create another imported destination with the exact same targets as the imported destination. Let’s call this destination the “SAF error dest”. Configure the remote destination for this SAF error destination so that it references some JMS Server queue (call it the “error queue”).
    Ideally for performance and simplicity, this error queue should run local to the "SAF error dest" -- so, for example, if there are 3 SAF Agents on three JVMs that host the imported destinations, there should also be three JMS servers on these same JVMs that use the same persistent store as the SAF agents, and the error Q should be a "uniform distributed queue" that's targeted to the three JMS servers (using advanced "subdeployment" targeting).
    Configure the original imported destination to use the “SAF error dest” as its error destination.

  • Report and Alert don't executed in the error handler with a JMS proxy service

    Hi,
    I'm working with OSB 11.1.1.4.0 and I'm facing a problem with the error handler of my JMS proxy service.
    My error handler contains two main elements :
    - a Report action
    - an Alert with a JMS destination defined
    When the business service failed the message remain in the queue. It's the expected behavior.
    The problem is :
    - the report is missing
    - the alert is raised but missing in the JMS destination defined in the Alert setting.
    I've noticed if I add a Reply with Failure or Success, Report and Alert are successfully executed.
    Unfortunately the message don't remain in the JMS queue.
    What can I do in order to have my report/alert done and the JMS transaction rollback in order to keep the message in the queue ?
    I've already met this problem in the past with alsb v3 and my solution was to add Service Callout in the error handler in order to externalize these actions.
    This solution is not convenient and I hope another solution is possible.

    Inventorying workgroups can be difficult, especially when it comes to remote access and network security. Because workgroups are not centrally managed, some of the items discussed in this
    wiki article on preparing your workgroup environment may require you to visit each machine individually.
    For non-domain credentials, you do not use the <systemname>\<user> format, you simply enter the user name. Regarding how to enter the credentials, if you have an account that uses the same username and password on all machines and is an administrator
    on all of those machines, then you can enter that in the All computers credentials page of the wizard. You can also do this if they are different user names. However, if some machines have an account with the same user name, such as Administrator,
    but different passwords on each machine, you will need to use the Manually enter computer names discovery method, and then enter the information for each group or each machine.
    As you can tell, workgroup environments can quickly negate any benefit that the agentless inventory nature of MAP provides.
    Please remember to click "Mark as Answer" on the post that helps you, and to click
    "Unmark as Answer" if a marked post does not actually answer your question. Please
    VOTE as HELPFUL if the post helps you. This can be beneficial to other community members reading the thread.

  • Error Handling in File Adapter

    I have been working on a requirement where the file adapter picks up the file and gives to the BPEL for processing the data.
    So, in order to do Error Handling for file adapter, i have been reading the Oracle documentation for technology adapters. In that, some of the
    points which i felt valuable for my error handling when using file adapter are the uniqueMessageSeparator property, fault-policies for rejected messages,
    and one of the action for rejected messages could be writing the payload to a file or invoking any other webservice.
    In my composite, i have configured the file adapter as a service for reading files, and i defined the xsd using the native format builder....If i put some data like 'aaaa' in the attribute of type integer , the .csv file is being picked up and its being passed to the BPEL without any error ? I believe there should be a translation error...right...
    But i am not getting the error, please tell me if anything is wrong in my xsd....
    Here is my xsd...
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/InboundService"
    targetNamespace="http://TargetNamespace.com/InboundService"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="US-ASCII"
    nxsd:hasHeader="true"
    nxsd:headerLines="1"
    nxsd:headerLinesTerminatedBy="${eol}"
    >
    <xsd:element name="names">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FirstName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
    <xsd:element name="LastName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," />
    <xsd:element name="Number" type="xsd:integer" nxsd:style="terminated" nxsd:terminatedBy="${eol}" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    And for DB Adapter, there is a property called SchemaValidation, i think that is not there for File adapter, by default it will take care of validation i guess....In another composite, my file adapter is picking up the .xml file and if i put any wrong data over there, that is working fine, i am getting the translation error, but only here in the case of csv file, i am not getting the error. Experts, please help me in this regard...I am using SOA 11G
    Thanks,
    Naresh

    Hi Yatan,
    Thanks for the reply. I did the same way, where my composite is picking up an XML file and translation error is coming. Even the fault policies are working fine, like writing to a file and even invoking other web service. Its really good that you have achieved the same thing in csv files. But the same thing i am unable to achieve when my file adapter is picking up the csv file. I really cant understand where i am doing wrong.
    here is my XSD which i defined through my native builder format...
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    xmlns:tns="http://TargetNamespace.com/FileRecv"
    targetNamespace="http://TargetNamespace.com/FileRecv"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    nxsd:version="NXSD"
    nxsd:stream="chars"
    nxsd:encoding="US-ASCII"
    nxsd:hasHeader="true"
    nxsd:headerLines="1"
    nxsd:headerLinesTerminatedBy="${eol}"
    >
    <xsd:element name="Roots">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="FirstName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="LastName" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;" />
    <xsd:element name="Number" type="xsd:integer" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    the jca file ..
    <adapter-config name="FileRecv" adapter="File Adapter" wsdlLocation="FileRecv.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter" UIincludeWildcard="n*.csv"/>
    <endpoint-activation portType="Read_ptt" operation="Read">
    <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
    <property name="DeleteFile" value="true"/>
    <property name="MinimumAge" value="0"/>
    <property name="PhysicalDirectory" value="C:\files"/>
    <property name="Recursive" value="false"/>
    <property name="PollingFrequency" value="5"/>
    <property name="IncludeFiles" value="n.*\.csv"/>
    <property name="UseHeaders" value="false"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    I told that the file will contain only 1 record while defining xsd and i kept a record whose values are John , Peter and akjdkjdskj.
    Now if the data is like above, the file is still getting picked up without any translation error and the BPEL is getting completed successfully...
    Is it possible for you to send your sample project and the csv file from which you have defined the xsd to me if you dont mind ?
    Thanks,
    Naresh

  • Error handling in XI

    Hi All,
    I am implementing several scenarios in XI. They are mainly dealing with RFC, JDBC adapter, file.
    The main communication is between SAP R/3 and Oracle via XI, both to and fro.
    Pls tell me what are the standard error handling mechanisms in XI.
    The main focus areas are as follows:
    1. If the sender XML format in XI has error, how to inform the sender system.
    2. If receiver Oracle system finds some error in the received msg, how to inform the sender system.
    This is urgent, pls help asap.
    Regards
    Neetu

    Hi Neetu,
    You can use Alerts for the same..... Please go through the information below to know more...
    For alerts take a look at this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    For CCMS monitoring, this document,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/42fb24ff-0a01-0010-d48d-ed27a70205a8
    From SP14 onwards, activation of end to end monitoring is not needed for Alerting. Refer to this note 870232 for this info.
    If you are blow SP14, then also check this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    To send an EMAIL, assign an EMAIL ID to the corresponding user in the transaction SU01 and then set up SCOT and you can send emails when the ALERT is triggered.
    Once you have configure Alerts, you will get the Alerts into ALERT INBOX in RWB of the user. To also get the email, the following needs to be done,
    1. In SU01 -- Assign the Email ID for the Recipient of the ALERT.
    2. In , RWB>ALERT INBOX> PERSONALIZATION--> Time Independent Delivery and Email are selected.
    3. Finally, SCOT needs to be set up to send Emails. Check this for the same. You can ask your BASIS team to do this step.
    http://help.sap.com/saphelp_nw04/helpdata/en/23/1edf098ea211d2b47300609419ed29/frameset.htm
    Also, to test your Alerts, execute the report RSALERTTEST in SE38.
    Regards,
    Abhy

  • Error Handling in Forms

    Dear all,
    we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003.
    Error handling is a very big issue.
    i try to do the following, just correct me, or make the trigger more efficient.
    i face unexpected messages, like a message two time displayed, sometime important message never displayed.
    i just set the :system.message_level =20 in the when-new-form-instance trigger.
    and create on-error trigger like below
    declare
    errcode number:=error_code;dbmserrcode number;dbmserrtext varchar2(200);
    formtxt varchar2(200);
    errtype varchar2(3);
    begin
    --------- user defined database exceptions errors raised by --RAISE_APPLICATION_ERROR
    IF DBMS_ERROR_CODE in (-20738,.......) then
    raise form_trigger_failure;
    end if;
    if error_code=50017 then
    message('duration must be between 0 and 23');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif
    error_code=40202 then
    clear_message;
    message('please provide the required fields.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif error_code=50022 then
    clear_message;
    message('time must be in the correct format.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    if error_code in (40509,40508) then
    dbmserrcode:=dbms_error_code; dbmserrtext:=dbms_error_text;
    if dbmserrcode=-1438 then
    clear_message;
    message('your number is too large.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1400 then
    clear_message;
    message('your forgot to provide a value.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-2291 then
    clear_message;
    message('header is not found for this insertion.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1 then
    clear_message;
    message('record already exists');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    exception
    when others then
    if dbms_error_code=-20738 then
    clear_message;
    message('Error: absent or later record errror from the database trigger.);
    raise form_trigger_failure;
    elsif .....
    esle
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    end;any suggession?
    Regards

    i must come with a plsql code which handle every error and suppress unnecessary messages.Good luck with that. No matter how well thought out or planned, you're not going to be able to take all scenarios into account. The design of an exception handler takes time to address all possible scenarios you want handled and even then, you're not likely to handle every situation in the beginning.
    could we implement the oracle ebusiness error handling procedures here in our application?if yes, then where could we find that procedure?>
    I've dug through that code and it is not a thorough as you think it is. It handles specific situations and then defaults the rest. It is a good model for your own exception handler, however. That is what I used it for. :) I don't recall which library it is in, but I'll look around and if I find it, I'll post it.
    I agree with Andreas's comment...
    Simply remove your ON-ERROR-trigger, then you have a default. That's nothing better or worse than what apex has.I'm not too familiar with Apex; I've worked with it, but it's been a little while. Even with Apex, you're going to have to develop a customized Exception Handler so more intuitive or application specific messages are displayed in response to an exception.
    As to Andreas's comment...
    For your own error-handling... The "simplest" way in my eyes is create your own error-table where you have appropiate columns for the error-code and the error-type (FRM,ORA,Whatever), then in your ON-ERROR-trigger read the appropiate record from that table and show the error. You could also have a flag in your table which decides what to do with a specific error (Show as Message, Show as Alert, Don't show at all) and react accordingly.This is exactly what we implemented in our application. We created a set of tables that contain all of the Oracle Runtime errors and their attributes (Error Type, Severity Level, etc). Then we wrote a standard On-Error trigger that is subclassed to all of our forms that calls a Library "On_Error" package. This package evaluates the exception raised, compares it to the database entry for the error and then displays an appropriate message depending on the Severity Level, Error Type (ORA or FRM) and Message Type (Informational, Error, Caution) and we display the message in either the Status Bar, Note Alert, Caution Alert or Stop Alert or it is supressed. If an error is not found in the table, then it is displayed in a Stop Alert as an "Unhandled Exception." The second table I mentioned contains all of the messages used by our application and is cross referenced with the table that contains the Oracle messages. By simply assigned one of our messages to an Oracle message - our package will display our message instead of the default Oracle Message. Yes, this took sometime to build and test and once implemented, we spent another couple of months perfecting it, but now it is pretty solid and we haven't had to modify it in over a year.
    While this level of complexity may be overkill for your application, it does offer the greatest flexibility in the long-run. Also, if your application must support multiple languages, having all of your messages in a table make internationalization extremely easy. :)
    The point of all this, is that no matter which system you use (Forms, Apex, or Java) you will still need to invest some time into designing an Excpeiton Handling method for your application and then implement it accross the application. This is not something you can develop in a short period of time and it will not be perfect in the beginning. However, in the long-run, you will be happy you spent the time up-front to build a flexible and robust Exception Handling system.
    Craig...

  • SAP NetWeaver Gateway and JSON Error Handling

    Hello All,
    I am developing a small test application using Netweaver Gateway to understand the error handling.  I am using Postman to test the Gateway service.  I have developed small RFC FM to read return list of deliveries for a shipment.  The RFC reads in a shipment number and returns the list of deliveries.  The RFC also has Return parameter of type BAPIRET2 that stores the error message if shipment is not found.  We want to use only JSON format for the application.  So, I have set the 'Accept' parameter at request header to 'content/json'.  I am also aware of the exception /IWBEP/CX_MGW_BUSI_EXCEPTION that allows to throw an error message from backend suite.  I have that by having a Return parameter of type BAPIRET2, the generated method automatically handles the error message and sets the correct HTTP status.
    Now the Problem:
    As mentioned earlier, we want to use JSON format.  When I set the header parameter or specify $format=json in the URI the HTTP status code is always set to 500 when there is an error.  The error message about invalid shipment also is not returned.
    When I remove the JSON format parameters, the XML format is returned and HTTP status is set to 400 with appropriate error message.
    How can we get the Gateway to set the HTTP status code to 400 along with error message in the event of an error in RFC.  I have tried with the exception /IWBEP/CX_MGW_BUSI_EXCEPTION and BAPIRET2 return parameter but still does not work.  Is this a known issue in Gateway/JSON?
    Please see attached screenshots.
    Thanks,
    Rutul Thakkar

    Anyone have encountered this issue?  Any suggestions?
    Thanks,
    Rutul Thakkar

  • Error handling : File( sender and receiver)

    Hi Experts,
    This is regarding some information i require in the Error Handling mechanisms we can use while picking up the file through File Sender Adapter and while placing the same on the receiver adapter :
    Scenarios like :
    a)  Validations we can put , on the file , should that be done in SAP XI or after placing in SAP ERP.
    b)  If the file is of a different format and isnt picked up how can that be handled ? ]
    c)  if the File contains wrong data , should  the alert be generated in SAP or SAP XI ?
    d)  If the file does not arrive in the folder itself what is the error handling meachanism ?
    e) diff
    thanks
    Dev

    a) Validations we can put , on the file , should that be done in SAP XI or after placing in SAP ERP
    Do validations on File mean perform a check on the file for its contents, format, structure? If yes, then these are performed in XI/ PI
    b) If the file is of a different format and isnt picked up how can that be handled ?
    The file channel will throw an error if it is not able to find the file (specified in sender channel) during its poll interval.
    c) if the File contains wrong data , should the alert be generated in SAP or SAP XI ?
    If SAP is the target system, then better the check and alert be done in SAP XI/ PI, as far as possible we should avoid sending wrong data to the target.
    d) If the file does not arrive in the folder itself what is the error handling meachanism ?
    Which folder are you talking about? If it is source folder then the error will be thrown as mentioned in point b.
    If it is target folder, then the error (if any) will be captured either in IE or AE of SAP XI/ PI and can be intimated using alerts.
    Regards,
    Abhishek.

  • Error handling in bdc Fb01along with erros in Idoc.

    Hi,
    Can any one send me the sample code for the error handling in bdc Fb01along with erros in Idoc. Actually, mail should be sent
    Thanks
    Avi.

    Hi,
    This may help you.
    <b>FORM send_mail USING   receiver.
      CLEAR: w_lines,tbl_packing_list,tbl_object_header,
                 tbl_contents_txt, tbl_receivers.
      REFRESH:tbl_packing_list, tbl_object_header,
               tbl_contents_txt,tbl_receivers.
      SORT tbl_err.
      DELETE ADJACENT DUPLICATES FROM tbl_err COMPARING ALL FIELDS.
      IF NOT tbl_err[] IS INITIAL.
    Preparing the email.
        PERFORM prepare_email.
      ELSE.
       If sy-subrc NE 0.
          MOVE sy-subrc TO w_code.
       ENDIF.
        EXIT.
      ENDIF.
    Get  the content of header e-mail document data
      PERFORM document_data.
    Get details of the error file attached (like type of file and format)
      PERFORM packing_list.
    Get receiver mail id's
      tbl_receivers-receiver = receiver.
      tbl_receivers-rec_type = 'C'.
      tbl_receivers-express  = c_flag.
      tbl_receivers-sap_body = c_flag.
      APPEND tbl_receivers.
    Call FM to send E-mails to receivers
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = st_document_data
                put_in_outbox              = 'X'
           TABLES
                packing_list               = tbl_packing_list
                object_header              = tbl_object_header
                contents_txt               = tbl_contents_txt
                receivers                  = tbl_receivers[]
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    ENDFORM.                    " send_mail
    *&      Form  prepare_email
          text
    -->  p1        text
    <--  p2        text
    FORM prepare_email.
    E-Mail body content
      IF NOT w_lifnr IS INITIAL.
        CONCATENATE text-015 w_docnum text-016
               INTO tbl_contents_txt-line
          SEPARATED BY space.
      ENDIF.
      APPEND tbl_contents_txt.
      CLEAR tbl_contents_txt.
    E-mail error file attachment header
      CONCATENATE text-063 text-064
                   text-065 text-066 c_comma
             INTO tbl_contents_txt-line
        SEPARATED BY c_comma.
      APPEND tbl_contents_txt.
      CLEAR tbl_contents_txt.
    E-mail error file attachment content
      LOOP AT tbl_err.
        CONCATENATE w_docnum tbl_err-v_segnum
                    tbl_err-msg tbl_err-type
          INTO tbl_contents_txt-line
          SEPARATED BY c_comma.
        CONCATENATE c_linefeed tbl_contents_txt-line c_comma
               INTO tbl_contents_txt-line.
        APPEND tbl_contents_txt.
        CLEAR tbl_contents_txt.
      ENDLOOP.
    ENDFORM.                    " prepare_email
    *&      Form  document_data
          text
    -->  p1        text
    <--  p2        text
    FORM document_data.
      CLEAR w_line.
      IF NOT w_lifnr IS INITIAL.
        CONCATENATE text-075 text-027 sy-datum sy-uzeit INTO w_line
        SEPARATED BY c_uscore.
      ENDIF.
      st_document_data-obj_name  = w_line.
      st_document_data-obj_descr = w_line.
      st_document_data-priority  = 1.
      st_document_data-obj_prio  = 1.
    ENDFORM.                    " document_data
    *&      Form  packing_list
          text
    -->  p1        text
    <--  p2        text
    FORM packing_list.
      CLEAR w_lines.
      DESCRIBE TABLE tbl_err LINES w_lines.
      READ TABLE tbl_contents_txt INDEX w_lines.
      tbl_packing_list-head_start = 1.
      tbl_packing_list-head_num   = 1.
      tbl_packing_list-body_start = 1.
      tbl_packing_list-body_num   = 1.
      tbl_packing_list-doc_type   = 'RAW'.
      APPEND tbl_packing_list.
      tbl_packing_list-head_start = 1.
      tbl_packing_list-head_num   = 0.
      tbl_packing_list-body_start = 2.
      tbl_packing_list-body_num   = w_lines + 1.
      tbl_packing_list-doc_type   = 'CSV'.
      tbl_packing_list-obj_descr  = 'Error_Attachment'(060).
      IF NOT w_lifnr IS INITIAL.
        tbl_packing_list-obj_name   = 'Idoc Number is'(072).
      ENDIF.
      tbl_packing_list-doc_size   = 255 * ( w_lines + 1 ).
      APPEND tbl_packing_list.
    ENDFORM.                    " packing_list
    </b>
    Thanks
    Manju.

  • Can error handling framework use fault policies and BPEL catch blocks

    As part of an integrated customer solution that makes substantial use of SOA Suite (including OSB, BPEL, Mediator, etc) we are in the process of designing an “Error Hospital” subsystem to expose a web service API specifically for BPEL services and/or the OSB layer to call whenever they encounter an exception which they cannot handle so that the appropriate user is notified of the error (via email) and the error is recorded (in an appropriate common fault format, with error codes elaborated into more meaningful descriptions, etc) within OEM, immediately prior to returning the exception to the caller.
    The problem we have experienced in our design is as follows:
    •     We have an error handling service to be called, inside the BPEL catch blocks, when an error occurs to notify the appropriate user, via email, that an error has occurred;
    •     We also use the error handling XML fault-policies so that we can recover from an error using OEM (via human intervention);
    •     The error service needs to be called before the process is suspended (waiting for human intervention) so the email notification and error message formatting occurs BEFORE the recovery action. Unfortunately the fault policies trigger BEFORE the error handler is able to transform the error into the appropriate format and notify the user so the error recorded is not the reformatted one and the user is never notified.
    The key question is how can a BPEL, upon catching an exception, invoke the error handling service and AFTER that send the error to OEM (and have the process suspended).
    It seems the two mechanisms "cannot play nicely together"

    As part of an integrated customer solution that makes substantial use of SOA Suite (including OSB, BPEL, Mediator, etc) we are in the process of designing an “Error Hospital” subsystem to expose a web service API specifically for BPEL services and/or the OSB layer to call whenever they encounter an exception which they cannot handle so that the appropriate user is notified of the error (via email) and the error is recorded (in an appropriate common fault format, with error codes elaborated into more meaningful descriptions, etc) within OEM, immediately prior to returning the exception to the caller.
    The problem we have experienced in our design is as follows:
    •     We have an error handling service to be called, inside the BPEL catch blocks, when an error occurs to notify the appropriate user, via email, that an error has occurred;
    •     We also use the error handling XML fault-policies so that we can recover from an error using OEM (via human intervention);
    •     The error service needs to be called before the process is suspended (waiting for human intervention) so the email notification and error message formatting occurs BEFORE the recovery action. Unfortunately the fault policies trigger BEFORE the error handler is able to transform the error into the appropriate format and notify the user so the error recorded is not the reformatted one and the user is never notified.
    The key question is how can a BPEL, upon catching an exception, invoke the error handling service and AFTER that send the error to OEM (and have the process suspended).
    It seems the two mechanisms "cannot play nicely together"

  • ADF Custom error handler not working.

    Hi All,
    i am using jdev version 11.1.1.5.0. i have created one custom error handler class in model layer which extend DcErrorHandlerImpl class.
    and do the entry in Databinding.cpx file
    *<Application ErrorHandlerClass="mypackage.classname"/>*
    i have override getDisplayMessage(BindingContext ctx, Exception ex) method to show SQL Exception which comes from database table trigger.
    code is following-
    package com.in.jagran.view.services;
        import java.sql.SQLException;
        import oracle.adf.model.BindingContext;
        import oracle.adf.model.binding.DCErrorHandlerImpl;
        import oracle.jbo.JboException;
        public class AclasErrorHandler extends DCErrorHandlerImpl {
          public AclasErrorHandler(boolean setToThrow) {
            super(setToThrow);
            System.out.println("Inside Error Handler class");
          public AclasErrorHandler() {
              super(true);
           // this(true);
           * Returns the message that will be reported to JSF for each error that occurs.
           * Returning "null" is the way the custom error handler signals that a given exception
           * should not be reported to the client.
          @Override
          public String getDisplayMessage(BindingContext ctx, Exception ex)
            if (ex instanceof oracle.jbo.ValidationException) {
              return super.getDisplayMessage(ctx, ex);
            else {
              // Extract and return the error message that has to be displayed
              Exception exception = ex;
              String message = "";
              // If this exception is an instance of JboException,
              // try to find the cause by recursing over the eventual causing exceptions
              if (exception instanceof JboException)
                Throwable[] exceptionList = ((JboException)exception).getExceptions();
                while (exception instanceof JboException
                        && exceptionList != null && exceptionList.length > 0)
                  exception = (Exception)exceptionList[0];
                  if (exception instanceof JboException) {
                    exceptionList = ((JboException)exception).getExceptions();
              // *** Special processing of SQLExceptions
              if (exception instanceof SQLException) {
                message = exception.getMessage();
                // Ignore the lines in the error message that indicate the line number in the PLSQL code that the error resulted on.
                int ind = message.indexOf("ORA-06512");
                if (ind > 0)
                  message = message.substring(0, ind);
              // *** If the the reason for the JboException was data creation exception then display the message
              // of the top JboException (i.e. JBO-*****: Invalid numeric value, date format or time format)
              else if (exception instanceof NumberFormatException || exception instanceof IllegalArgumentException) {
                // Report the top exception
                message = ex.getMessage();
              // Otherwise report the message of the lowest exception in the hierarchy
              else {
                message = exception.getMessage();
              return message;
        }but it is not working for me.
    thanks in Advance.

    yes i have used dubugger.
    i have set break point to following line-
    return super.getDisplayMessage(ctx, ex);
    if (ex instanceof oracle.jbo.ValidationException) {
            return super.getDisplayMessage(ctx, ex);   
    }when atttribute validation done like i have attribute of type number and i have done the validation "must be greater than 0" now when i have given negative value control go to above line.
    and i have added following code also in handler class
            @Override
               public void reportException(DCBindingContainer dCBindingContainer,
                                           Exception exception) {
    System.out.println(exception.getMessage());
                       super.reportException(dCBindingContainer, exception);
                   }now when i have done commit operation control go to here and println statement print follwoing error on log window.
    JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".

  • JMS adapters and error handling

    Dear all,
    1. I have a scenario in which XI will be getting messages from Two JMS servers located in different locations. The messages from the two servers have no relation but XI has to check if messages are present in any of the servers and poll them. So can anyone suggest me a better approach. I can use two sender adapters and use a BPM. Is there any other way to do it avoiding BPM?
    2. How do I delete the message from the JMS Queue once it is processed?
    3. In the Reciever side I have to send messages to two different target systems based on a condition. From the sender side a field (value) is passed which will check these conditions. If the value contains one of the target system names, the message has to go to that particular system and if the value contains both the target system names, the message has to go to both the target systems. I think this can be done in BPM but please recommend an approach for this.
    4. I need to do error handling both in the adapter side and in mapping level. Kindly give suggestions for the same.
    Expecting your replies soon,
    Harikumar. S

    Hi ,
    Refer to following blogs ,
    JMS Adapter
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cd/d85a9d6fab7d4dbb7ae421f710626c/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/how%20to%20use%20the%20content%20conversion%20module%20with%20the%20xi%203%20j2ee%20jms%20adapter
    /thread/217893 [original link is broken]
    JMS adapter -Message format pre-requisites
    /people/alessandro.guarneri/blog/2006/01/04/jms-sender-adapter-handling-too-short-lines
    /people/william.li/blog/2006/11/13/how-to-use-saps-webas-j2ees-jms-queue-in-exchange-infrastructure
    Thanks ,
    Suvarna
    Award pts if ans helps .

  • Custom Error Handling

    Hello,
    I would like to create a custom error handler in a model file similar to the ErrorHandlerExample.seq.
    In my case, I will be handing errors genereated in several different dlls.  We are trying to avoid writing wrappers around the dll functions to fill in the TestStand error strings.  However, this information is available by calling a "get error message" function in the dll.  Since I have more than one dll and more than one handle that I will need to check the errors for, I need to know the information about the step that caused the error.  Is there a way to get more information about the step that caused the error?  I might have a dll function call that had the format: 
    kiOpenVSA(StationGlobals.KiManager, StationGlobals.VsaSession, StationGlobals.VsaResourceString, StationGlobals.DisplayEnable, StationGlobals.SendInitCommands)
    Based on the parameters of the function call, I would be able to call the correct error handling function.
    Thanks,
    Mike
    Solved!
    Go to Solution.

    Hi Mike,
    If you want to pragmatically get the name of the DLL file, DLL function and parameters that were called in a previous step, you will first need to reference the step in which the DLL call was made and use the following TestStand API.
    Assuming that the DLL was called in the previous step you can use the following expressions using TestStand 4.1.
    Access the dll function expression
    RunState.PreviousStep.Module.CommonCModule.FunctionCall
    Access the dll function name
    RunState.PreviousStep.Module.CommonCModule.FunctionName 
      Access the parameters
    RunState.PreviousStep.Module.AsDllModule.Parameters.item(index)
    Note that if you are using an older version of TesStand, these functions may not work and you may have to use the ActiveX/COM steps to access this information.
    I hope this helps.  
    Message Edited by S_Hong on 02-10-2009 05:02 PM
    Message Edited by S_Hong on 02-10-2009 05:07 PM
    S_Hong
    National Instruments
    Applications Engineer

  • AIA Error Notification Format : HTML Tags

    Hi All,
    I am trying to customize the AIA Error notifications in AIAEHNotification.xml file to include the html tags such as &lt;font color="blue"&gt; etc. to change the look of the error message. But the same is not getting reflected in the error emails I receive.
    I'm sure the file AIAEHNotification.xml is getting updated as I can see my updated content every time but not html formatted in any case.
    Does default AIA Error handler support HTML tags inside the email body message or it just uses &lt;pre&gt; by default before sending the notification?
    AIA 3.0
    SOA Suite 11.1.1.3
    Regards,
    Neeraj sehgal

    Neeraj,
    html tags are not supported in the AIA EH notification framework as of now and I am not aware of any plans to support this in any of the next releases.
    Gerhard

  • OSB Error handling

    Hi,
    Could you point me to some OSB error handling examples? I am trying to understand how to handle errors at OSB. We are planning to build a number of message flows into OSB and trying to figure out the best way to handle errors.
    Thank you

    Hi
    From the main entry point of a proxy service you can create an error handler (as well as stages, routing nodes etc).
    In the Error Handlers you get the BEA error code which is sometimes helpful and sometimes not.
    For example, if I have a validate node in my main flow that cause an XML validation error, that is easy recognisable so an 'if then' node will be able to route to the appropriate error handling logic. If the proxy service calls another service which throws a SOAP fault back, things get a little trickier as all you get back from the container is a BEA-380001 error code - basically an 'Internal Server Error'. So to sort this out you need an 'if then' node to trap this error code and then include a nested 'if then' node to look for the real error. The nest if statement condition would look something like "$body/soap-env:Fault/detail/mf:MyFault/mf:MyFaultcode = ERROR_CODE". Notice here, the way to get the actual fault it to use XPath to traverse the actual message returned and not use the $fault variable provided by the container.
    I also suggest you create your own Fault type in an xsd so that the OSB always returns a consistent fault format.
    In each of the 'if then' condition branches in the error handler I have an assign which creates the SOAP fault using the user defined fault type, a sanitised example of which is shown below.
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:gn="http://www.mycompany.com/wsdl/path/notification/1.0">
         <soapenv:Fault>
              <faultcode>gn:MyException</faultcode>
              <faultstring/>
              <detail>
              <fault:Fault xmlns:fault="http://www.mycompany.com/schema/fault/1.0">
                   <fault:code>10000</fault:code>
                   <fault:message>System Returned Error:
                        Details are:
                        Error Code - {fn:string($body/soap-env:Fault/detail/ser:ServiceException/ser:faultCode)}
                        Error Message - {fn:string($body/soap-env:Fault/detail/ser:ServiceException/ser:message)}
                   </fault:message>
                   <fault:processId>{fn:string($body/ns1:Type/ns2:id)}</fault:processId>
                   <fault:shortMessage>system Returned Error</fault:shortMessage>
                   <fault:time>{fn:current-dateTime()}</fault:time>               
              </fault:Fault>
              </detail>
         </soapenv:Fault>
    </soapenv:Body>
    Notice how my fault type is populated in the detail stanza of the overall SOAP fault message.
    This XML just gets assigned to body.
    the very last thing in the error handler is to add a reply node "with failure" if you wish to return a soap fault or "with success" if you have handled the error and don't need tot return a fault.
    Hope this at least points you in the right direction.
    Cheers
    MAtt

Maybe you are looking for