Clarity

  • 1.  Delete InvestmentAssociations Hierarchies via XOG

    Posted Nov 14, 2012 08:38 AM
    Hi!

    I am not able to remove an item in the hierarchies of the investmentassociations.
    I am using the hierarchy among product, but when I try to remove via xog a given relation it simply update the object without removing the child:

    Let suppose I xog this product instance:
     <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_product.xsd">
       <Header action="write" externalSource="NIKU" objectType="product" version="8.0"/>
         <Products>
             <Product name="${opp_name}" objectID="${opp_code}" >
    
    
    
    <InvestmentAssociations>
    
    
    
            <Allocations/>
    
    
    
    
    <Hierarchies>
    
    
    
                 <ChildInvestment InvestmentID="00000018" InvestmentType="product">
    
    
                
    
    
    <CustomInformation/>
    
    
              
        </ChildInvestment>
    
    
    
            <Hierarchies/>
    
    
    
    </InvestmentAssociations>
    
    </Product>
     </Products>
    </NikuDataBus>
    and I remvoe the childinvestment and xog it again
     <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_product.xsd">
       <Header action="write" externalSource="NIKU" objectType="product" version="8.0"/>
         <Products>
             <Product name="${opp_name}" objectID="${opp_code}" >
    
    
    
    <InvestmentAssociations>
    
    
    
            <Allocations/>
    
    
    
    
    
    
    
    
    
    
            <Hierarchies/>
    
    
    
    </InvestmentAssociations>
    
    </Product>
     </Products>
    </NikuDataBus>
    the system leave the child in the structure.
    It looks like I am missing an attribute such as "delete=true" but I did not find anything on the documentation...

    please
    help!


  • 2.  RE: Delete InvestmentAssociations Hierarchies via XOG
    Best Answer

    Posted Nov 14, 2012 08:55 AM
    Can you try with this (has the addition of the following attribute and value: isComplete="true"):
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_product.xsd">
    <Header action="write" externalSource="NIKU" objectType="product" version="8.0"/>
     <Products>
      <Product name="${opp_name}" objectID="${opp_code}" >
       <InvestmentAssociations isComplete="true">
        <Allocations/>                             
        <Hierarchies/>
       </InvestmentAssociations>
      </Product>
     </Products>
    </NikuDataBus>


  • 3.  RE: Delete InvestmentAssociations Hierarchies via XOG

    Posted Nov 14, 2012 09:38 AM
    Thanks!

    I have just tried to do what you recommended:
    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_product.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
             <Header action="write" externalSource="NIKU" objectType="product" version="8.0"/>
             <Products>
                <Product name="GA-TEST-SPOSTA-OPP-001" objectID="00001984">
                   <Allocations/>
                   <scenarioDependencies/>
                   <InvestmentAssociations isComplete="true">
                      <Allocations/>
                      <Hierarchies>
                         <ChildInvestment InvestmentID="00001985" InvestmentType="product">
                            <CustomInformation/>
                         </ChildInvestment>
                      </Hierarchies>
                   </InvestmentAssociations>
                </Product>
             </Products>
             
          </NikuDataBus>
    It succeded but I still see the item within the Hierarchy

    Sorry I changed the post because the second code section was wrong...


  • 4.  RE: Delete InvestmentAssociations Hierarchies via XOG

    Posted Nov 14, 2012 09:49 AM
    Which investment do you still see in the hierarchy?

    00001985?

    If so, it was present in the XOG file written in. The isComplete="true" flag is an indicator to say 'ignore what is in the DB and replace it with all that I am providing now', so if that investment was already associated, with this file and attribute you've reinforced it.

    You should, when using that flag, exclude any investments that you no longer want to have associated. So to remove them all, you would use the empty example like mine that has no associations at all, but does have that flag.

    By example:

    If you have an investment with associations to other investments that we'll call A, B, and C.

    If you then XOG in with isComplete="true" and associations to investments B and D, these actions will take place.

    - Investment associations A, B, and C will be removed from the investment.
    - Investment associations B and D will be added to the investment.

    Without the isComplete="true" this would happen instead:

    - All existing investment associations will be left intact
    - It would be seen that B already exists and would be ignored/skipped.
    - Investment association D would be added to the investment.

    So my understanding of the example you gave, is that the XOG write removed the association as per the flag, but then re-added it again because it was present in the file.


  • 5.  RE: Delete InvestmentAssociations Hierarchies via XOG

    Posted Nov 14, 2012 10:25 AM
    Thanks a lot!!

    I removed all the child via xog with isComplete option and I see an empty list now (yeah!) within the hierarchies tag
    I did it also on the childobject in order to remove the "parentInvestment"

    Now via xog there is no relation between these two objects, nevertheless accessing the GUI and clicking on "Hierarchy" the child is still there...

    it looks weird, isnt'it?