Clarity

Expand all | Collapse all

bulk deletion of custom sub-object instances

  • 1.  bulk deletion of custom sub-object instances

    Posted Feb 05, 2010 09:54 AM
    I'm looking for a way to do a bulk deletion of multiple instances of a custom sub-object.   A GEL script that i'm testing generates a number of instances of a custom project sub-object across multliple projects.   in between testing iterations, I need to wipe the instances out.    The only way I know of now, is to delete them via the sub-object's list view within each project, but that only shows me the list of instances within that project.  I created an object based portlet, based on that sub-object, which shows all the instances at the global level, but the check box and delete button are not available to object portlets.  I tried using the delete="true" tag in a XOG, but that didn't.  The last thing i'm left with is wiping them out in the odf_ca_ table.   Normally, manipulating data in the back-end is a no-no, but you all know that it's not an absolute rule.   Can anyone think of any reason why deleting instances of a custom sub-object would cause any problems?   nothing is linked to it.   there are no objects sub- to this sub-object.   there are no initiated processes against any of the instances.   auto numbering and system ID are unaffected because we're deleting, not adding.      I've worked with Clarity since 7.5 and have done a lot of things directly to the database (with the blessings, or at the direction, of SE's or tech support), especially with regard to custom (sub-)objects, but I haven't gone down the deletion path before.  ThanksB    


  • 2.  Re: bulk deletion of custom sub-object instances

     
    Posted Feb 08, 2010 09:43 AM
    Hi All,  Any input here for Brian?  Thanks,Chris


  • 3.  Re: bulk deletion of custom sub-object instances

    Posted Feb 08, 2010 10:52 AM
    The option seems to be custom db script with CA support.  Martti K.


  • 4.  Re: bulk deletion of custom sub-object instances

    Posted Feb 10, 2010 05:04 AM
    You should be able to delete those instances from the database. I have not seen any impact.


  • 5.  Re: bulk deletion of custom sub-object instances

    Posted Feb 10, 2010 11:37 AM
    I would agree.   my analysis would suggest the same thing.   I'd feel more comfortable if anyone from CA can weigh in on this.  deleting custom sub-object instances, with no dependency linkages, in bulk (covering several parent object instances).  ThanksB


  • 6.  RE: Re: bulk deletion of custom sub-object instances

    Posted Oct 07, 2011 03:42 PM
    Another user mentioned that it might be possible to perform deletions via XOG.

    Granted, you'd have to cycle through the instances rather than do a bulk delete, but it would still be nifty.

    Anyone ever used it and gotten it to work?

    20324780


  • 7.  Re: RE: Re: bulk deletion of custom sub-object instances

    Posted Aug 01, 2014 10:58 AM

    Hi all.

      Bumping this before I explore bulk delete statements of sub object instances. Any hidden list page links in the UI or XOG capability? I'd sleep better knowing Clarity was handling the referential integrity of the bulk delete...

     

    It would be nice if something like this worked:

    <?xml version="1.0" encoding="UTF-8"?>

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">

      <Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="13.2.0.472"/>

      <customObjectInstances objectCode="cop_prj_statusrpt">

        <instance instanceCode="SR10OU" objectCode="cop_prj_statusrpt" parentInstanceCode="PRJ007837" parentObjectCode="project" delete="true">

        </instance>

      </customObjectInstances>

    </NikuDataBus>

     

    Or if one could 'back door' into a full list with delete capability (similar to an idea or project list) like :https://<your clarity server>/niku/nu#action:odf.cop_prj_statusrptList



  • 8.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 03:02 AM

    Hi Robert,

     

    I came across scenario in which I needed to do bulk custom object instances deletion.

     

    I tried using ur above mentioned xml but that did not worked.

     

    <?xml version="1.0" encoding="UTF-8"?>

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">

      <Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="13.2.0.472"/>

      <customObjectInstances objectCode="cop_prj_statusrpt">

        <instance instanceCode="SR10OU" objectCode="cop_prj_statusrpt" parentInstanceCode="PRJ007837" parentObjectCode="project" delete="true">

        </instance>

      </customObjectInstances>

    </NikuDataBus>

     

    I received below mentioned fatal error in output.

     

        <Severity>FATAL</Severity>
        <Description>[Error] :0:0: unexpected attribute "delete"

        Invalid attribute in input document. Please remove all instances of attribute from document elements and try again.

        [Element : instance, Attribute : delete ].



  • 9.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 06:41 AM

    Check if a process instance is running/in error for related to the object/ sub-object. Once that process instance is deleted, you should be able to delete the sub-object instance

     

    NJ



  • 10.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 06:42 AM

    Check the logs for any errors pertaining to the deletion of the sub-object

     

    NJ



  • 11.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 06:45 AM


  • 12.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 07:08 AM

    Hi NJ,

     

    Thanks for providing the links.

    I've checked both links but the XML created for deleting custom object instance is getting failed with error

    <Description>[Error] :0:0: unexpected attribute "action"

        Invalid attribute in input document. Please remove all instances of attribute from document elements and try again.

        [Element : instance, Attribute : action ].

     

    - Sandeep



  • 13.  Re: bulk deletion of custom sub-object instances

    Posted Feb 15, 2016 06:46 AM

    Hi NJ,

     

    There was no running process instance for related to the object.

    Were you able to delete the custom object instance using XOG mentioned above? If yes please confirm?

     

    Another approach of deleting the custom object instances directly from database,

    Can anyone guide me where it would be impacting ?