FIM Modification type

We're using FIM to bring over attributes from account forests into an exchange 2010 resource forest.  Over the past few weeks we noticed that updates to existing users in the accounts domain are not coming through.  When looking under Management
Agent Operations we noticed that when changes to existing users in the accounts domain are trying to sync the modification type is set to Add instead of None.  This results in the attribute changes not coming across b/c FIM thinks this is a new user in
resource forest.  How do I change it so the modification type goes back to none instead of add.

1. Make sure you have such user in metaverse - in a console, pick Metaverse Search and search such user.
2. Check your join rules in Management Agent's properties - if user exists in a metaverse, find attribute or attributes that could say if userA in metaverse is exactly the same person as User15 from DomainB (maybe use UserPrincipalName or adGuid ?)
3. Pick one of adds and generate full synchronization preview. Check if it has joined to existing metaverse object. If so, invoke Full Synchronization on this agent. There should be a lot of "Joins".
Once joined, users would be "updated" instead of "added".
If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

Similar Messages

  • Error message in WAD: "No name is specified for modification type 'Module'"

    Hi All,
    We have created a WAD template with one analysis item and a button and have single module of type generic module in it.
    While executing it  following error message is displayed "No name is specified for modification type 'Module'"
    Please Can anyone help with this error.
    Regards,
    Shweta.

    Hello,
    I am currently facing same issue and I have no idea how to get rid of this message on top of the page.
    I'm pretty sure that this error message comes from the ANALYSIS_ITEM define in my Web Template but I have defined alias name for the different modules I created:
    Who is able to help ?

  • Business objects FIM (Financial Information Management)

    Hello.
    I would like to know if a forum to talk about FIM?
    I have some doubt in certain configurations and I dont know where I question them.
    by the way, the my problem is:
    I installed the data services 3.1 and boe xi 3.0, then i installed fim, the problem is when I execute
    http://servername:8080/fim/client/fim.jsp
    HTTP Status 404 - /fim/client/fim.jsp
    type Status report
    message /fim/client/fim.jsp
    description The requested resource (/fim/client/fim.jsp) is not available.
    Apache Tomcat/5.5.20
    this is a message appear. And I dont know how to solve this.
    The BOE Xi30 Console works pretty good and is working above tomcat/apache.
    I really need your guys help
    Thanks,
    My Best Regards
    Amit

    Hello Amit,
    I recommend to post this query to the [Enterprise Information Management|Data Services and Data Quality; forum.
    This forum is dedicated to topics related to Data Integration (Data Integrator, Data Federator, Text Analysis for Data Integrator, Rapid Marts, and Integration for PeopleSoft Enterprise), Data Quality (Data Quality and Data Insight), and Metadata Management.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Enterprise Information Management queries remain in one place and thus can be easily searched in one place.
    Thanks a lot,
    Falk

  • Can I make two differents selection screen in my program?

    Hi experts!!
    I don't know how to male this, the problem is that I need to make two differents selection screen in my program because I have two differents kinds of button,
    BUTTON1         BUTTON2          BUTTON3
    When I press button1 I received.
    BUTTON4         BUTTON5          BUTTON6
    Now If I press on button4, how can I pick up the event? the name or something associate to this button4?
    Thanks a lot and regards
    Rebeca

    Hi and thanks,
    I've tried with your code,  Velu Lakshmanan,  and I only received another screen with the buttons... I need to put this button in the same screen, now I've this, but I can't receive the event associate to the second's buttons,
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON  1(79) DTP USER-COMMAND DTP
    VISIBLE LENGTH 25.
    SELECTION-SCREEN PUSHBUTTON 28(79) EMP USER-COMMAND EMP
    VISIBLE LENGTH 25.
    SELECTION-SCREEN PUSHBUTTON 55(79) ABS USER-COMMAND ABS
    VISIBLE LENGTH 25.
    PARAMETERS: PROC_TYP TYPE I DEFAULT 1 NO-DISPLAY.
    SELECTION-SCREEN END OF LINE.
    * Informes de datos de tiempo.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-FED USER-COMMAND FED MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-DCH USER-COMMAND DCH MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-ACH USER-COMMAND ACH MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-FII USER-COMMAND FII MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-PTB USER-COMMAND PTB MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-PTS USER-COMMAND PTS MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-ACI USER-COMMAND ACI MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-FIM USER-COMMAND FIM MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-LDH USER-COMMAND LDH MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    * Informes de empleados
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-LDP USER-COMMAND LDP MODIF ID EM1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-PDF USER-COMMAND PDF MODIF ID EM1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-LDT USER-COMMAND LDT MODIF ID EM1.
    SELECTION-SCREEN END OF LINE.
    * Informes de bajas
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-BAJ USER-COMMAND BAJ MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-VMA USER-COMMAND VMA MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-SDE USER-COMMAND SDE MODIF ID AB1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-LDB USER-COMMAND LDB MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-LDA USER-COMMAND LDA MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-DHT USER-COMMAND DHT MODIF ID AB1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    * Pintamos los botones que necesitemos mostrar según la opción seleccionada
    AT SELECTION-SCREEN.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'DTP'. PROC_TYP = 1.
        WHEN 'EMP'. PROC_TYP = 2.
        WHEN 'ABS'. PROC_TYP = 3.
      ENDCASE.
    AT SELECTION-SCREEN OUTPUT.
      CASE PROC_TYP.
    * Cuando el botón que ha seleccionado es "Datos de tiempo"
        WHEN 1.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-DTP
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = DTP.
          EMP = TEXT-EMP.
          ABS = TEXT-ABS.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        WHEN 2.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-EMP
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = EMP.
          DTP = TEXT-DTP.
          ABS = TEXT-ABS.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        WHEN 3.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-ABS
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = ABS.
          DTP = TEXT-DTP.
          EMP = TEXT-EMP.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    Help please... I don't know how can I make this.....
    If I use screen...how can I put this screen in the correct place?
    Thanks a lot
    Regards,
    Rebeca

  • Getting invalid-attribute-value Error during Delta Import on Call-based ECMA2

    I'm developing an ECMA2 MA to which supports delta imports.  I have found very few samples of working code to do delta imports, so my attempts are created
    using a lot of trial and error... Any samples of working Call based MA's with delta support would be much appreciated :-)
    The data is located in a SQL server and the schema (for delta) is like this (simplified):
    EmpID string
    Status string
    UPDATESTATUS string (<-- This is the update column with values New/Update/Delete)
    For each EmpID, there may be multiple Status values, i.e. Status should be imported into a multi value attribute in FIM.
    For the full import this is working as expected, but I run into issues when attempting to do the delta imports
    The code for the delta import
    private
    GetImportEntriesResults GetImportEntries_Delta(GetImportEntriesRunStep importRunStep)
    GetImportEntriesResults importReturnInfo;
    List<CSEntryChange> csentries =
    new List<CSEntryChange>();
    string employeeID =
    null;
    string appStatus =
    null;
    string currEmployeeID =
    CSEntryChange csentry =
    null;
    List<string> appStatusList =
    new List<string>();
    string changeMode =
    for (int i = currentReadRecord; i <= da.Tables["AppStatus"].Rows.Count - 1; i++)
    if (currEmployeeID != da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim())
    if (currEmployeeID !=
    "") // this should be true except for the first run
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    appStatusList = new
    List<string>();
    if (csentries.Count >= m_importPageSize)
                  currentReadRecord = i;
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = (i <= da.Tables["AppStatus"].Rows.Count - 1);
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    changeMode = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(2).ToString().Trim();
    csentry = CSEntryChange.Create();
    csentry.ObjectType = "ApplicationIdentity";
    employeeID = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
    currEmployeeID = (string)employeeID;
    switch (changeMode)
    case "New":
    csentry.ObjectModificationType = ObjectModificationType.Add;
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("EmployeeID", employeeID));
    break;
    case "Update":
    csentry.ObjectModificationType = ObjectModificationType.Update;
    csentry.DN = employeeID;
    break;
    case "Delete":
    csentry.ObjectModificationType = ObjectModificationType.Delete;
                         csentry.DN = employeeID;
    break;
    default:
    throw new
    UnexpectedDataException(string.Format("Unknown modification type: {0}", changeMode));
    appStatus = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(1).ToString().Trim();
    appStatusList.Add(appStatus);
    // save the last object
    if (csentry != null)
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = false;
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    The code compiles and executes, but the delta import fails with the "invalid-attribute-value" message per csentry.
    From the eventlog I have the following message
    The server encountered an unexpected error while performing an operation for a management agent.
    "System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String'.
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.AddAttributeToDImage(CDImage* pdimage, String attributeName, AttributeModificationType
    attributeModificationType, IList`1 attributeValueChanges, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.ConvertToDImage(CSEntryChange csEntryChange, CDImage** ppDImage, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeExtMA_ImportEntry(UInt32 cBatchSize, UInt16* pcszCustomData, UInt32 cFullObject,
    _OCTET* rgoctFullObject, UInt32* rgomodt, UInt32* pcpcszChangedAttributes, UInt16*** prgpcszChangedAttributes, Int32 fIsDNStyleNone, UInt16** ppszUpdatedCustomData, _OCTET* rgoctCSImage, Int32* rgextec, UInt16** rgpszErrorName, UInt16** rgpszErrorDetail, Int32*
    pfMoreToImport)"
    To me it seems as if FIM is unable to process the List of strings that is returned when processing the delta. Remember that this works OK when doing the full import. 
    Do you have any suggestions as to why this fails?
    Kjetil

    Hi,
    Thank you Søren! I got some good clues for the right direction from your answer. If anyone would be looking same answers the correct solution would be down below. I hope it would be help for someone else too.
    Get-Shema.ps1
    $obj
    = New-Object
    -Type PSCustomObject
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "Anchor-Id|String"
    -Value 1
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "objectClass|String"
    -Value "user"
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "IsLicensed|Boolean"
    -Value $true
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "FirstName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "LastName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "mail|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "immutableId|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "DisplayName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "UsageLocation|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "ProxyAddresses|String[]"
    -Value ("","")
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "Licenses|String[]"
    -Value ("","")
    $obj
    Import.ps1
    #Always pass objects as hash table in pipeline
    foreach ($User
    in $Users)
    $obj = @{}
    $obj.Add("Id",
    $User.UserPrincipalName)
    $obj.Add("objectClass",
    "user")
    $obj.Add("IsLicensed",
    $User.IsLicensed)
    $obj.Add("FirstName",
    $User.FirstName)
    $obj.Add("LastName",
    $User.LastName)
    $obj.Add("mail",
    $User.UserPrincipalName)
    $obj.Add("immutableId",
    $User.immutableId)
    $obj.Add("DisplayName",
    $User.DisplayName)
    $obj.Add("UsageLocation",
    $User.UsageLocation)
    $obj.Add("ProxyAddresses", ($User.ProxyAddresses
    -ne ""))
    $obj.add("Licenses", ($User.Licenses.AccountSkuId))
    $obj
    Marti

  • Pricing, Modifiers in Sales Order Form

    Hi Gurus,
    Please help me to resolve the issue with Pricing, Modifier to Sales Order:
    I have created Master price List for Item A - $40
    Modifer 1 - Dealer Discount Price is 20% (Created Modifier as Dealer Discount - 20%)
    Modifer 2 - Order Header discount is 10% on total Order Value (Created Modifer with Discount : Level - Order; Modifer Type - Discount; Pricing Phase - Header Level Adjustments, Application Method - Percentage; Value - 10%
    Assgined to respective Qualifers (Customers), set as Automatic
    Ran Build Attribute mapping values concurrent program in Pricing Module. Status : sucess
    After doing All above steps created Sales order for respective Customer, system is applying Modifer 1 Automatically but MODIFIER 2 not able to apply at order header leverl, Not able to see this Modifier list under SO form
    Action->View Adjustment.
    Can you please check and let me know the problem to achieve this issue.
    Highly appreciate your response.
    Regards
    AK

    Check below options in sequence
    1) Is your order qualifies for both the modifiers ?
    2) If you need to apply both modifiers put them in different incompatibility level.

  • SPWebConfigModifications Duplicate entries, applying to all Web Applications and not removing entries

    Hi,
    Hopefully someone can offer some advice, I may be missing something obvious here.
    I'm currently trying to write a feature event receiver to apply web.config modifications that are required by a recent project. 
    The feature is web application scoped & it doesn't activate by default on deployment, currently testing with a very small addition isn't working at all, I've followed numerous posts about duplicate entries & items being removed, none of which have
    helped.
    Here is my code;
    public override void FeatureActivated(SPFeatureReceiverProperties properties)
                SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;
                    SPWebConfigModification Modification = new SPWebConfigModification();
                    Modification.Owner = "ConfigUpdater";
                    Modification.Path = "configuration/appSettings";
                    Modification.Name = "add[@key='Test']";
                    Modification.Sequence = 0;
                    Modification.Value = "<add key='Test' value='Server=TestServer;Database=TestDB;Trusted_Connection=True;' />";
                    Modification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode;
                    if (!webApp.WebConfigModifications.Contains(Modification))
                        webApp.WebConfigModifications.Add(Modification);
                        webApp.Update();
                        webApp.WebService.ApplyWebConfigModifications();
            // Uncomment the method below to handle the event raised before a feature is deactivated.
            public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
                SPWebApplication webApp = properties.Feature.Parent as SPWebApplication;
                Collection<SPWebConfigModification> modsCollection = webApp.WebConfigModifications;
                int count = modsCollection.Count;
                for (int i = count - 1; i >= 0; i--)
                    SPWebConfigModification mod = modsCollection[i];
                    if (mod.Owner == "ConfigUpdater")
                        modsCollection.Remove(mod);                   
                webApp.Update();
                webApp.WebService.ApplyWebConfigModifications();          
    Upon activation on 1 web app, the entry gets added twice to the web.config of every web application in the farm & upon deactivation the entries remain in the web.config files.
    On activation, after this line, webApp.WebConfigModifications.Add(Modification); the webApp is updated to include the entry & only once, however 2 entries for it appear in the web.config files & as mentioned for every web application.
    On deactivation, after updating the web app, the modification is removed, however it remains in the web.config files.
    I'm wondering if the code actually works, as I can't see anything wrong & if there is some caching occurring somewhere which is applying the extra line/s upon calling ApplyWebConfigModifications.
    Any help on this would be much appreciated.
    Thanks,
    James

    Hi James,
    Per my understanding, there is an entry gets added twice to the web.config file of every web application in the FeatureActivated event.
    As a common practice, I suggest you debug your code to see how it works during the process, it will provide more information for a better troubleshooting.
    Also, you can test the code in a Console Application to see if it will work as expected.
    Thanks         
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Detecting Change in Elements between Versions of XML Doc

    Hi There
    I have a structured XML Schema based table in XMLDB 9.2.0.4 and am trying to detect when a non-repeating element off the root element changes (audit).
    I have created a row level update trigger and each time one element is changed via UPDATEXML two or three other elements are detected as changed. I am wondering if I have some sort of DOM fidelity issue here and perhaps my trigger is not the best for detecting this. we use XS:ANY elements in the XML schema and I know that there appears to be space injection into the element tag content and also extraneous namespace tags on tags in the XS:ANY elements.
    Can you give me any advice on my schema XSD and perhaps my trigger. Maybe what I am trying to do is not possible until 10g version of XMLDB.
    XSD
    ====
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSpy v2005 U (http://www.xmlspy.com) by Martyn J Ricks (University of Tasmania) -->
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Grant John Hyland (University of Tasmania) -->
    <xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns="http://www.utas.edu.au/cu" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.utas.edu.au/cu" elementFormDefault="qualified" attributeFormDefault="unqualified" xdb:storeVarrayAsTable="true">
         <xs:element name="UnitSetYear" type="UnitSetYearType" xdb:defaultTable="CU_UNIT_SET_YEARS_XML">
              <xs:annotation>
                   <xs:documentation>Comment describing your root element</xs:documentation>
              </xs:annotation>
         </xs:element>
         <xs:complexType name="OfferedInCoursesType" xdb:SQLType="CU_UN_OFFEREDINCRSS_TYP">
              <xs:sequence>
                   <xs:element name="Course" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="OFFERED_IN_COURSE" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_OFFERED_IN_CRS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Unit set is involved in these courses, as specified in the quality assurance manual.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="3"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextType" mixed="true" xdb:SQLType="CU_UN_RECOMMENDEDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RecommendedTextsType" xdb:SQLType="CU_UN_RECOMMENDEDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RecommendedText" type="RecommendedTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLCollType="CU_UN_RECOMMEND_TEXT_COLTYP" xdb:SQLName="RECOMMENDED_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextType" mixed="true" xdb:SQLType="CU_UN_REQUIREDTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequiredTextsType" xdb:SQLType="CU_UN_REQUIREDTEXTS_TYP">
              <xs:sequence>
                   <xs:element name="RequiredText" type="RequiredTextType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUIRED_TEXT" xdb:SQLCollType="CU_UN_REQUIRED_TEXT_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Prescribed texts</xs:documentation>
                        </xs:annotation>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="BAMajorsType" xdb:SQLType="CU_UN_BAMAJORS_TYP">
              <xs:sequence>
                   <xs:element name="BAMajor" maxOccurs="unbounded" xdb:SQLName="BA_MAJOR" xdb:SQLType="VARCHAR2" xdb:SQLCollType="CU_UN_BA_MAJORS_COLTYP">
                        <xs:annotation>
                             <xs:documentation>Majors that this unit applies to in the BA degree course</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="AssessType" mixed="true" xdb:SQLType="CU_UN_ASSESS_TYPE">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="ReqTextType" mixed="true" xdb:SQLType="CU_UN_REQTEXT_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisiteType" xdb:SQLType="CU_UN_REQUISITE_TYP">
              <xs:sequence>
                   <xs:element name="ReqType" xdb:SQLName="REQUISITE_TYPE" xdb:SQLType="VARCHAR2">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="6"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ReqText" type="ReqTextType" xdb:SQLName="REQUISITE_TEXT"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="RequisitesType" xdb:SQLType="CU_UN_REQUISITES_TYP">
              <xs:sequence>
                   <xs:element name="Requisite" type="RequisiteType" minOccurs="0" maxOccurs="unbounded" xdb:SQLName="REQUISITE" xdb:SQLCollType="CU_UN_REQUISITE_COLTYP"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="TeachPatternType" mixed="true" xdb:SQLType="CU_UN_TEACHPATTERN_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded" xdb:SQLType="VARCHAR2"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="DescType" mixed="true" xdb:SQLType="CU_UN_DESC_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="SpecialNoteType" mixed="true" xdb:SQLType="CU_UN_SPECIALNOTE_TYP">
              <xs:sequence>
                   <xs:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:complexType name="UnitSetYearType" xdb:SQLType="CU_UN_UNITSETYEAR_TYP">
              <xs:sequence>
                   <xs:element name="UnitSetID" xdb:SQLName="UNITSET_ID">
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:minInclusive value="10000000"/>
                                  <xs:totalDigits value="8"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Year" xdb:SQLName="YEAR">
                        <xs:annotation>
                             <xs:documentation>The academic year of the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:integer">
                                  <xs:totalDigits value="4"/>
                                  <xs:fractionDigits value="0"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetLabel" xdb:SQLName="SET_LABEL" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The label that will be used as terms of reference for the unit set</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="20"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="UnitSetTitle" xdb:SQLName="UNIT_TITLE" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>The Unit Set Title for the Year</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="100"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Offered" xdb:SQLName="OFFERED" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Is the unit on offer this year (Y/N). Defaults to Y.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SpecialNote" type="SpecialNoteType" xdb:SQLName="SPECIAL_NOTE"/>
                   <xs:element name="InWeb" xdb:SQLName="IN_WEB" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Should this Unit Set appear on the web.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:length value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="Desc" type="DescType" xdb:SQLName="DESCRIPTION" xdb:SQLType="CLOB">
                        <xs:annotation>
                             <xs:documentation>Short description of Unit content</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Staff" xdb:SQLName="STAFF" xdb:SQLType="VARCHAR2">
                        <xs:annotation>
                             <xs:documentation>Staff teaching this unit.</xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="500"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="TeachPattern" type="TeachPatternType" xdb:SQLName="TEACHING_PATTERN">
                        <xs:annotation>
                             <xs:documentation>Number of lectures , tutorials, laboratories and workshops</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="Requisites" type="RequisitesType" xdb:SQLName="REQUISITES"/>
                   <xs:element name="Assess" type="AssessType" xdb:SQLName="ASSESSMENT">
                        <xs:annotation>
                             <xs:documentation>Mode of assessment and percentages</xs:documentation>
                        </xs:annotation>
                   </xs:element>
                   <xs:element name="BAMajors" type="BAMajorsType" minOccurs="0" xdb:SQLName="BA_MAJORS"/>
                   <xs:element name="RequiredTexts" type="RequiredTextsType" xdb:SQLName="REQUIRED_TEXTS"/>
                   <xs:element name="RecommendedTexts" type="RecommendedTextsType" xdb:SQLName="RECOMMENDED_TEXTS"/>
                   <xs:element name="OfferedInCourses" type="OfferedInCoursesType" xdb:SQLName="OFFERED_IN_COURSES"/>
              </xs:sequence>
         </xs:complexType>
    </xs:schema>
    Trigger
    ========
    CREATE OR REPLACE TRIGGER CU_UNITSETYR_XML_AUDR_TRG
    AFTER DELETE OR UPDATE
    ON CU_UNIT_SET_YEARS_XML
    FOR EACH ROW
    DECLARE
    v_user VARCHAR2(30);
    v_old_xml_doc xmltype;
    v_new_xml_doc xmltype;
    v_old_unitset_id cu_unit_sets.unitset_id%TYPE;
    v_old_offered VARCHAR2(1);
    v_new_offered VARCHAR2(1);
    v_old_inweb VARCHAR2(1);
    v_new_inweb VARCHAR2(1);
    v_old_title VARCHAR2(100);
    v_new_title VARCHAR2(100);
    v_old_staff VARCHAR2(500);
    v_new_staff VARCHAR2(500);
    v_old_special_note xmltype;
    v_new_special_note xmltype;
    v_old_unit_desc xmltype;
    v_new_unit_desc xmltype;
    v_old_teach_pattern xmltype;
    v_new_teach_pattern xmltype;
    v_old_assess xmltype;
    v_new_assess xmltype;
    v_old_offered_in_courses xmltype;
    v_new_offered_in_courses xmltype;
    v_old_BA_Majors xmltype;
    v_new_BA_Majors xmltype;
    v_old_req_texts xmltype;
    v_new_req_texts xmltype;
    v_old_reco_texts xmltype;
    v_new_reco_texts xmltype;
    v_old_year INTEGER;
    v_mod_type VARCHAR2(1);
    BEGIN
    -- Establish the username from the CUM_PORTAL_APP context
    v_user := sys_context('CUM_PORTAL_APP','CURRENT_USER');
    IF (v_user IS NULL) THEN
    -- Means that CUM Portal App did not make the change
    v_user := USER;
    END IF;
    -- Determine modification type
    IF (updating) THEN
    v_mod_type := 'U';
    ELSIF (deleting) THEN
    v_mod_type := 'D';
    END IF;
    v_old_xml_doc := :OLD.sys_nc_rowinfo$;
    v_new_xml_doc := :NEW.sys_nc_rowinfo$;
    SELECT extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetID'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Year'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Offered'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/UnitSetTitle'),
    extract(v_old_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_new_xml_doc, '/UnitSetYear/SpecialNote'),
    extract(v_old_xml_doc, '/UnitSetYear/Desc'),
    extract(v_new_xml_doc, '/UnitSetYear/Desc'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/Staff'),
    extractvalue(v_old_xml_doc, '/UnitSetYear/InWeb'),
    extractvalue(v_new_xml_doc, '/UnitSetYear/InWeb'),
    extract(v_old_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_new_xml_doc, '/UnitSetYear/TeachPattern'),
    extract(v_old_xml_doc, '/UnitSetYear/Assess'),
    extract(v_new_xml_doc, '/UnitSetYear/Assess'),
    extract(v_old_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_new_xml_doc, '/UnitSetYear/OfferedInCourses'),
    extract(v_old_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_new_xml_doc, '/UnitSetYear/BAMajors'),
    extract(v_old_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RequiredTexts'),
    extract(v_old_xml_doc, '/UnitSetYear/RecommendedTexts'),
    extract(v_new_xml_doc, '/UnitSetYear/RecommendedTexts')
    INTO v_old_unitset_id,
    v_old_year,
    v_old_offered,
    v_new_offered,
    v_old_title,
    v_new_title,
    v_old_special_note,
    v_new_special_note,
    v_old_unit_desc,
    v_new_unit_desc,
    v_old_staff,
    v_new_staff,
    v_old_inweb,
    v_new_inweb,
    v_old_teach_pattern,
    v_new_teach_pattern,
    v_old_assess,
    v_new_assess,
    v_old_offered_in_courses,
    v_new_offered_in_courses,
    v_old_BA_Majors,
    v_new_BA_Majors,
    v_old_req_texts,
    v_new_req_texts,
    v_old_reco_texts,
    v_new_reco_texts
    FROM dual;
    IF (v_old_unitset_id IS NOT NULL AND v_old_year IS NOT NULL) THEN
    -- Had to do this to avoid problems with create resource statement which on insert appears
    -- to manifest itself as an update of a null document????
    IF (updating OR deleting) THEN
    -- Audit the XML document
    INSERT INTO cu_unit_set_years_xml_audit
    (unitset_id, YEAR, xml_doc, mod_type, mod_by, mod_date)
    VALUES
    (v_old_unitset_id,
    v_old_year,
    v_old_xml_doc.getclobval(), -- convert to clob
    v_mod_type,
    USER,
    SYSDATE);
    END IF;
    IF (updating AND v_old_offered != v_new_offered) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered">'||v_old_offered||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_inweb != v_new_inweb) THEN
    cu_events_pkg.log_event(p_event_type => 'USINWEB',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Publish on Web">'||v_old_inweb||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_title != v_new_title) THEN
    cu_events_pkg.log_event(p_event_type => 'USTIT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="UnitSet Title">'||v_old_title||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_special_note.getClobVal() != v_new_special_note.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USSPECN',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Special Note">'||NVL(v_old_special_note.getStringVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_unit_desc.getClobVal() != v_new_unit_desc.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USDESC',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Description">'||NVL(v_old_unit_desc.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_staff != v_new_staff) THEN
    cu_events_pkg.log_event(p_event_type => 'USSTAFF',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Staff">'||NVL(v_old_staff,'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_teach_pattern.getClobVal() != v_new_teach_pattern.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USTEACHP',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Teaching Pattern">'||NVL(v_old_teach_pattern.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_assess.getClobVal() != v_new_assess.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USASSESS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Asessment">'||NVL(v_old_assess.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_offered_in_courses.getStringVal() != v_new_offered_in_courses.getStringVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USOFFCRS',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Offered in Courses">'||NVL(v_old_offered_in_courses.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND ((v_old_BA_Majors IS NULL) OR (v_old_BA_Majors.getStringVal() != v_new_BA_Majors.getStringVal()))) THEN
    -- Special Treatment here because the BAMajors tag is optional.
    -- If missing this causes an error with the getClobVal() method.
    IF (v_old_BA_Majors IS NULL) THEN
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">NULL</Col>
    </Row>
    </RowSet>'));
    ELSE
    cu_events_pkg.log_event(p_event_type => 'USBAMAJ',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="BAMajors">' || v_old_BA_Majors.getStringVal() ||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    IF (updating AND v_old_req_texts.getClobVal() != v_new_req_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USREQTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Required Texts">'||NVL(v_old_req_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    IF (updating AND v_old_reco_texts.getClobVal() != v_new_reco_texts.getClobVal()) THEN
    cu_events_pkg.log_event(p_event_type => 'USRECOTXT',
    p_enacted_by => v_user,
    p_subject_type => 'UNITSETX',
    p_subject_id => to_char(v_old_unitset_id),
    p_subject_year => v_old_year,
    p_previous_values =>
    xmltype('<RowSet>
    <Row>
    <Col ColName="Recommended Texts">'||NVL(v_old_reco_texts.getClobVal(),'NULL')||'</Col>
    </Row>
    </RowSet>'));
    END IF;
    END IF;
    END;

    Be aware that you could also do an ALTER SESSION instead of a ALTER SYSTEM. This would prevent to shutdown the database to make the change, within the session, active.
    M

  • Query failed after insert

    Hi everybody
    I'm using Oracle 11g Release 11.2.0.3.0.
    I have created this table (the schema also) :
    CREATE TABLE DATA_XML (
    NOUVEAUX_CODES_DATA XMLTYPE)
    XMLTYPE NOUVEAUX_CODES_DATA STORE AS BINARY XML
    XMLSCHEMA "chgt_codes_clients.xsd" ELEMENT "codes_clients"
    DISALLOW NONSCHEMA;
    I have inserted this row :
    update snf_xml set nouveaux_codes_data = XMLType('<codes_clients><modif><ancien_code>TOTO - 000</ancien_code><nouveau_code>UNTEL - 000</nouveau_code><date>2008-07-23</date> <user>P.DUPONT</user><commentaire>PREMIER CHANGEMENT</commentaire></modif></codes_clients>');
    No problem
    I make this query :
    select XMLQuery('for $i in /codes_clients/modif where $i/user="P.DUPONT" return <ok>{$i/date}</ok>'
    passing nouveaux_codes_data returning content) DATE_MODIF from data_xml;
    No problem, data is returned
    I insert a new record, like this :
    update snf_xml set nouveaux_codes_data = XMLQuery('copy $p := .modify (for $i in $p/codes_clients return insert node <modif><ancien_code>UNTEL - 000</ancien_code><nouveau_code>MACHIN - 000</nouveau_code><date>2008-07-23</date><user>J.DURAND</user><commentaire>DEUXIEME CHANGEMENT</commentaire></modif> into $i) return $p' passing nouveaux_codes_data returning content)
    No problem
    But the query : select XMLQuery('for $i in /codes_clients/modif where $i/user="J.DURAND" return <ok>{$i/date}</ok>'
    passing nouveaux_codes_data returning content) DATE_MODIF from data_xml;
    failed, no result
    But the first query is still OK.
    Where is the problem ?
    Thanks in advance

    Sounds like "déjà-vu", unfortunately...
    This is not the first time we see bugs related to fragment insertion in schema-based documents.
    I can reproduce the problem now :
    begin
      dbms_xmlschema.registerSchema(
        schemaURL => 'chgt_codes_clients.xsd'
      , schemaDoc => '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="codes_clients" type="modif_code"/>
    <xs:complexType name="modif_code">
    <xs:sequence>
    <xs:element name="modif" type="new_code" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="new_code">
    <xs:sequence>
    <xs:element name="ancien_code" type="xs:string"/>
    <xs:element name="nouveau_code" type="xs:string"/>
    <xs:element name="date" type="xs:date"/>
    <xs:element name="user" type="xs:string"/>
    <xs:element name="commentaire" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>'
      , local => true
      , genTypes => false
      , genTables => false
      , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
      , options => dbms_xmlschema.REGISTER_BINARYXML
    end;
    CREATE TABLE DATA_XML of xmltype
    XMLSCHEMA "chgt_codes_clients.xsd" ELEMENT "codes_clients" ;
    insert into data_xml
    values (
      xmlparse(document
      '<codes_clients>
      <modif>
        <ancien_code>TOTO - 000</ancien_code>
        <nouveau_code>UNTEL - 000</nouveau_code>
        <date>2008-07-23</date>
        <user>P.DUPONT</user>
        <commentaire>PREMIER CHANGEMENT</commentaire>
      </modif>
    </codes_clients>')
    commit;
    SQL> alter session set nls_date_format = "DD/MM/YYYY";
    Session altered.
    SQL> select XMLCast(
      2           XMLQuery(
      3             'for $i in /codes_clients/modif
      4              where $i/user="P.DUPONT"
      5              return $i/date'
      6             passing object_value
      7             returning content
      8           )
      9           as date
    10         ) DATE_MODIF
    11  from data_xml;
    DATE_MODIF
    23/07/2008
    SQL> update data_xml
      2  set object_value =
      3      XMLQuery(
      4        'copy $p := .
      5         modify (
      6           insert node $modif into $p/codes_clients
      7         )
      8         return $p'
      9        passing object_value
    10              , xmlparse(content
    11  '<modif>
    12    <ancien_code>UNTEL - 000</ancien_code>
    13    <nouveau_code>MACHIN - 000</nouveau_code>
    14    <date>2013-04-25</date>
    15    <user>J.DURAND</user>
    16    <commentaire>DEUXIEME CHANGEMENT</commentaire>
    17  </modif>') as "modif"
    18        returning content
    19      )
    20  ;
    1 row updated.
    SQL> select XMLCast(
      2           XMLQuery(
      3             'for $i in /codes_clients/modif
      4              where $i/user="J.DURAND"
      5              return $i/date'
      6             passing object_value
      7             returning content
      8           )
      9           as date
    10         ) DATE_MODIF
    11  from data_xml;
    DATE_MODIF
    ----------Checking the serialized document shows that the new item is really there :
    SQL> set long 5000
    SQL> set pages 100
    SQL> select xmlserialize(document object_value) from data_xml ;
    XMLSERIALIZE(DOCUMENTOBJECT_VALUE)
    <codes_clients>
      <modif>
        <ancien_code>TOTO - 000</ancien_code>
        <nouveau_code>UNTEL - 000</nouveau_code>
        <date>2008-07-23</date>
        <user>P.DUPONT</user>
        <commentaire>PREMIER CHANGEMENT</commentaire>
      </modif>
      <modif>
        <ancien_code>UNTEL - 000</ancien_code>
        <nouveau_code>MACHIN - 000</nouveau_code>
        <date>2013-04-25</date>
        <user>J.DURAND</user>
        <commentaire>DEUXIEME CHANGEMENT</commentaire>
      </modif>
    </codes_clients>Workaround : disable XQuery DML rewrite...
    It'll prevent Oracle from using a piecewise update on the underlying storage. I suppose you won't see the difference on small docs.
    SQL> roll;
    Rollback complete.
    SQL> update /*+ no_xml_dml_rewrite */
      2         data_xml
      3  set object_value =
      4      XMLQuery(
      5        'copy $p := .
      6         modify (
      7           insert node $modif into $p/codes_clients
      8         )
      9         return $p'
    10        passing object_value
    11              , xmlparse(content
    12  '<modif>
    13    <ancien_code>UNTEL - 000</ancien_code>
    14    <nouveau_code>MACHIN - 000</nouveau_code>
    15    <date>2013-04-25</date>
    16    <user>J.DURAND</user>
    17    <commentaire>DEUXIEME CHANGEMENT</commentaire>
    18  </modif>') as "modif"
    19        returning content
    20      )
    21  ;
    1 row updated.
    SQL> select XMLCast(
      2           XMLQuery(
      3             'for $i in /codes_clients/modif
      4              where $i/user="J.DURAND"
      5              return $i/date'
      6             passing object_value
      7             returning content
      8           )
      9           as date
    10         ) DATE_MODIF
    11  from data_xml;
    DATE_MODIF
    25/04/2013

  • Requirements gateway & regular expressions

    I'm trying to create a regular expression that will match a Requirement ID type in a MS Word document using Requirements Gateway.
    Our syntax for a Requirement ID is as follows:
        '* shall [::requirement id] *'
    An example would be
        'The system shall [::requirement1] self destruct after 1 minute of use.'
    I'm using the following RE.
        shall[ \t]*\[[ \t]*(.*):.+)\]
    I've been able to get it to match 'most' of Requirement ID's ,but a few aren't caught...most noteably those Requirement ID's that run past the end of the
    line.
    When 'shall' is on one line and '[::requirement1]' is on the next, the Requirement ID isn't matched.
    Are there any limitations to the RE engine that Requirements Gateway uses?
    If not, any help with the RE would be MUCH appreciated.
    thanks
    Pat

    Allen,
    Thanks for the advice.  Unfortunately it didn't help
    Again, our requirements are identified by a 'shall' followed by a tag in brackets. 
    Ie  The unit shall [<optional source>::requirement id] be expensive.
    The RE, "shall\[(.*):.+)\]" doesn't always work. (Sorry for the embedded emoticon)
    Most of the time it identifies the tag but says
    Requirement ' : XYZ' can't be covered.
    Error: Requirement defined several times
    Other times is combines two tags into one.
    I'm attaching the modifed type and the doc thats causing the problems.
    Thanks for your continued help,
    Pat

  • Hit Or Miss Mac Flash Player

    I have wasted an inordinate amount of time trying to find a solution for this...
    I'm working on an Intel iMac, Mac OSX v.10.5.8, browsers Safari 4.0.5 (5531.22.7) and Firefox v.3.6.3. I've carefully uninstalled and reinstalled the latest Mac version of both the Flash and Shockwave players with the recommended Adobe installers and uninstallers, repaired permissions, rebooted, etc.
    The odd part of my mystery is that before this most recent Flash update installation, I never had a problem at ANY site.
    Now, videos play as expected at some sites, like http://youtube.com , but not at all at other sites, like http://vids.myspace.com/
    Perhaps a related new development is that when I enter the fullscreen mode at youtube, the gray-bordered "Pres Esc to exit full screen mode" alert stays fixed in the middle of the screen... very distracting.
    In some cases, I see a blank pop-up screen (whether or not "Block Pop-Up Windows" is selected in Safari's menu) or, as is the case at http://vids.myspace.com — a blank screen with a circular light-gray *snake* chasing its tail clockwise. (I'm beginning to feel much the same trying to remedy this problem.)
    If I CONTROL-click on the blanks for the "Settings" I see the Settings Manager, but it is entirely non-functional. When I try to make changes suggested in the Forums on the Adobe site's representation of that Settings Manager –
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man ager03.html  I can move the slider value from a "setting other than zero," but the "Allow third-party Flash content to store data on your computer" checkbox cannot be enabled.
    I installed the recommended flash debugger and got this result from a *no-show* video's pop-up blank:
    Error: Error #2134: Cannot create SharedObject.
    at flash.net::SharedObject$/getLocal()
    at com.jeroenwijering.utils::Configger/loadCookies()
    at com.jeroenwijering.utils::Configger/load()
    at com.jeroenwijering.player::Player/loadConfig()
    A knowledgeable website guru/friend suggested this might indicate a conflict with an earlier flash version, but a thorough search and examination reveals no previous versions lurking anywhere.
    The one remaining item I've removed is the Flash Player folder – user/library/caches/Adobe/Flash Player — which had some items dating back to 2009. It didn't help. Other than that, I'm at a loss to fix this problem.
    Any suggestions?
    Thanx. 

    Re: Re-installed debugger reports...
    Here's what a visit to the same website detailed in my original post reports in the debugger dialog box:
    Error: Error #2134: Cannot create SharedObject.
    at flash.net::SharedObject$/getLocal()
    at com.jeroenwijering.utils::Configger/loadCookies()
    at com.jeroenwijering.utils::Configger/load()
    at com.jeroenwijering.player::Player/loadConfig()
    myspace.com problem:
    http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=5704280
    Error: Error #2134: Cannot create SharedObject.
    at flash.net::SharedObject$/getLocal()
    at com.FIM.utils::LocalData()
    at com.FIM.utils::LocalData$/getInstance()
    at com.FIM.media.types::VideoContainer/_init()
    at com.FIM.media.types::VideoContainer()
    at com.FIM.factory::MediaContainerFactory/getMediaContainer()
    at com.FIM::MediaPlayer/init()
    at Application/allLoaded()
    at Application/checkAllLoaded()
    at Application/onLanguageLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.FIM.services.media::VideoService/onGetLocalizedStringsResult()
    at com.FIM.utils::NetUtils$/executeCallbacks()
    at com.FIM.utils::NetUtils$/resultCallback()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    dailymotion.com problem:
    http://www.dailymotion.com/video/xejgt7_how-to-use-drop-io-to-share-and-rev_tech#hp-v-v14
    Error: Error #2134: Cannot create SharedObject.
    at flash.net::SharedObject$/getLocal()
    at com.dm::Player/connectSharedObject()
    at com.dm::Player/addedToStageHandler()
    metacafe.com problem:
    http://www.metacafe.com/watch/5108290/training_camp_party_scott_fujita/
    Error: Error #2134: Cannot create SharedObject.
    at flash.net::SharedObject$/getLocal()
    at com.metacafe.video::VideoController/setModel()
    at com.metacafe.mvc::Controller()
    at com.metacafe.video::VideoController()
    at com.metacafe.video::VideoPlayer/init()
    at com.metacafe.video::VideoPlayer/onAddedToStage()
    at flash.display::DisplayObjectContainer/addChild()
    at com.metacafe.base::CommonVideoPlayer/initVideoPlayer()
    at com.metacafe.base::CommonVideoPlayer/init()
    at com.metacafe.portal::PortalVideoPlayerBase/init()
    at com.metacafe.portal::Player/init()
    at com.metacafe.portal::Initializer/init()
    at com.metacafe.portal::Initializer()
    (Clicked *Continue* button on debugger dialog box and got this:)
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com.metacafe.video::VideoPlayer/set allowSeekAhead()
    at com.metacafe.base::CommonVideoPlayer/initVideoPlayer()
    at com.metacafe.base::CommonVideoPlayer/init()
    at com.metacafe.portal::PortalVideoPlayerBase/init()
    at com.metacafe.portal::Player/init()
    at com.metacafe.portal::Initializer/init()
    at com.metacafe.portal::Initializer()
    yahoo!Video.com problem:
    http://video.yahoo.com/
    "Snake Chasing Its Tail"... but no debugger dialog.

  • PDF Export with fixed column widths ignores page break on Analysis item

    Hi experts,
    we use the column width modification to define fixed column width in a analysis item. On the same Web template we want to export the whole template including the analysis item to PDF format. First of all everything worked properly, but the fixed widths have not been applied to the PDF. According to [SAP Support Note 1336188|https://service.sap.com/sap/support/notes/1336188] and additional explainations from [SDN Thread 1558536|Column Width Modification not working in Print Version; we solved the problem.
    Unfortunately another problem arises. Our Analysis item delivers a big number of rows which extent multiple pages. By applying the export fix width parameter all page breaks are ignored, meaning that the analysis item is never shown completely in the PDF. We tried all parameter options of the Export Function without success. It seems that the EXPORT_FIX_WIDTH is just working for analysis items, which fit on one single page by length.
    Any ideas how to solve this?
    FYI, our XHTML code (Version SAP BW 7.0 SP 19):
    <bi:ANALYSIS_ITEM name="ANALYSIS_ITEM_1">
    <bi:DATA_PROVIDER_REF value="DP_1" />
    <bi:MODIFICATION type="CHOICE" value="MOD_SINGLE_MODULE" >
      <bi:MOD_SINGLE_MODULE type="COMPOSITE" index="1" >
      <bi:ACTIVE value="X" />
      <bi:MOD_SELECT type="CHOICE" value="MOD_GENERIC_MODULE" >
      <bi:MOD_GENERIC_MODULE type="COMPOSITE" >
      <bi:MOD_REFERENCE value="com.sap.ip.bi.rig.ColumnWidth" />
      <bi:MOD_PARAMETER_LIST type="ORDEREDLIST" >
        <bi:MOD_PARAMETER type="COMPOSITE" index="1" >
          <bi:MOD_PARAM_NAME value="COLUMN_DEFAULT" />
          <bi:MOD_PARAM_VALUE type="CHOICE" value="INTEGER" >
            <bi:INTEGER value="50" />
          </bi:MOD_PARAM_VALUE>
        </bi:MOD_PARAMETER>
        <bi:MOD_PARAMETER type="COMPOSITE" index="2" >
          <bi:MOD_PARAM_NAME value="EXPORT_FIX_WIDTH" />
          <bi:MOD_PARAM_VALUE type="CHOICE" value="BOOLEAN" >
            <bi:BOOLEAN value="X" />
          </bi:MOD_PARAM_VALUE>
        </bi:MOD_PARAMETER>
      </bi:MOD_PARAMETER_LIST>
      </bi:MOD_GENERIC_MODULE>
      </bi:MOD_SELECT>
      </bi:MOD_SINGLE_MODULE>
    </bi:MODIFICATION>
    </bi:ANALYSIS_ITEM>
    Any help and comments will be appreciated. Thank you!
    Best regards,
    Sebastian

    Thank you!
    Unfortunately I didn't find any work around.
    Thanks,
    Federico

  • NI Requirements Gateway - How to add picture to the Report?

    This question not related to LabVIEW, but I unable to find best place, sorry. If more suitable place exist - please let me know.
    The question about pictures in the requrement spec.
    In NIRG in standard Word example I added picture to the requirement:
    But when Requirement Detail View created (Reports->Library Reports->Requirements Detail View), then is appear without my picture:
    I was sure, that the text transferred from Word doc to the Report as Rich text and should include pictures as well, but seems to be not.
    How can I get generated report with pictures?
    Thank you.

    Well, finally got it. Just manually added the following lines to the *.types file:
    Variable1Name=withImages
    Variable1Label=With images
    Variable1Type=boolean
    Variable2Name=withCharacterStyles
    Variable2Label=With Character styles
    Variable2Type=boolean
    Variable3Name=withBookmarks
    Variable3Label=With Bookmarks
    Variable3Type=boolean
    Variable4Name=withAnnotations
    Variable4Label=With Annotations
    Variable4Type=boolean
    Variable5Name=tabCellsFolding
    Variable5Label=One Cell Per Line
    Variable5Type=boolean
    (They taken from Reference Attribute and Filter example)
    Now I have pictures in my report:
    Strange that these variables aren't available by default when Word type is selected (user manual assumed that they should be there), but anyway trick with manual modification *.types file does the job.
    Another way to get this - just copy/paste Maturity Level type from Reference Attribute and Filter example - this also works.

  • Oracle Payable Invoice Approval with AME issue

    Hello,
    This is on r12.
    We are using AME for Oracle Payables Invoice Approval.
    We have a requirement that if the supplier type is of Audit, then Person "John Johny" is the final authority on that invoices. That means such invoices will have one and only one approver - "John Johny"
    To incorporate this, I did following AME setup
    1. Created a List Modifiers Conditions of type "HR People" and "FND User" and explicitly assigned John Johny in the condition.
    2. Created an Action Type of "Final Authority"
    3. Created a rule of "List Modification" type
    4. Attached appropriate conditions
    5. Attached List Modifier ConditionsMy probelm is #5 from above. Even after creating conditions of List modifiers #1, It is simply not showing up in list of values when setting up the step #5. Not sure what is missing. Any advise?
    Thanks,
    Darsh

    The AME does not apply any item class when list modifications rule type with final authority is applied.
    The drop down box for item class remains grayed out
    Thanks
    Darsh

  • To get the PO data changed on a particular given date.

    hi,
        i want to get the PO data of all PO's changed on a particular day.
    when i am selecting from CDHDR
    SELECT objectclas
             objectid
             changenr
        FROM cdhdr INTO TABLE i_cdhdr
       WHERE objectclas = 'EINKBELEG'  AND
             udate      = p_date.
    1.Are the above condtions enough.?
    2.with the above conditions give me all the changes(Create,Change,Release,Delete..etc...)
    and as i will be getting multiple records...i can delete the adjacent duplicates..please confirm.
    2.Should i fetch CDPOS also...or can i ignore if i am not interested in type the change made to a PO?

    Hi Sravan,
    You can also think about using the field CHANGE_IND (Modification type) which I believe in your case would be 'U' (Update). This way you will exclude also those POs created, deleted, etc. and you will consider only those ones changed.
    If you are not interested in the type of the change it has been done through those POs, you don't need to consider the CDPOS table.
    Hope it helps you.
    Regards,
    Daniel

Maybe you are looking for