Clarity

Expand all | Collapse all

XOG error while adding participants to project

  • 1.  XOG error while adding participants to project

    Posted Dec 01, 2015 05:33 AM

    Hi,

     

    I've created a process which collects the value of a field in odf_ca_project table and adds it as a participant through XOG. In fact, there are two processes, one for creation and another one for update. The update process works fine, but creation process always ends in an error. I copy the xml that is created (which is exactly the same than the one from update process) and the results of the  XOG.

     

    <?xml version="1.0" encoding="UTF-8"?> <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_project.xsd"> <Header action="write" externalSource="NIKU" objectType="project" version="13.3.0.286"/> <Projects> <Project name="Pruebas Marc 01/12 2" projectID="00404114"> <participants> <resource userName="JMMENG1"/> </participants> </Project> </Projects> </NikuDataBus>

     

     

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

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Header/>

      <soapenv:Body>

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

      <Object type="project"/>

      <Status elapsedTime="2.864 seconds" state="FAILURE"/>

      <Statistics failureRecords="1" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/>

      <Records>

      <Record>

      <KeyInformation>

      <column name="ID">6289041</column>

      <column name="name">Pruebas Marc 01/12 2</column>

      <column name="UNIQUE_NAME">00404114</column>

      </KeyInformation>

      <ErrorInformation>

      <Severity>FATAL</Severity>

      <Description>Project Object update failed</Description>

      <Exception><![CDATA[

    java.lang.Exception: 31

    at com.niku.schedulers.api.XOGProjectAPI.returnErrorMessage(XOGProjectAPI.java:472)

    at com.niku.schedulers.api.XOGProjectAPI.process(XOGProjectAPI.java:300)

    at com.niku.schedulers.api.XOGProjectAPI.eval(XOGProjectAPI.java:142)

    at com.niku.xql2.eval.XQLFunctionNode.eval(XQLFunctionNode.java:27)

    at com.niku.xql2.eval.XQLEvaluator.parse(XQLEvaluator.java:40)

    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1086)

    at com.niku.xql2.XQLVisitor.eval(XQLVisitor.java:1060)

    at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1292)

    at com.niku.xql2.XQLVisitor.process(XQLVisitor.java:1325)

    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:178)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)

    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)

    at com.niku.xql2.handlers.TryHandler.preProcess(TryHandler.java:54)

    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)

    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)

    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)

    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)

    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)

    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)

    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)

    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)

    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)

    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)

    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)

    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)

    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)

    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)

    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:51)

    at com.niku.xql2.handlers.LoopHandler.processObject(LoopHandler.java:384)

    at com.niku.xql2.handlers.LoopHandler.processSet(LoopHandler.java:255)

    at com.niku.xql2.handlers.LoopHandler.preProcess(LoopHandler.java:212)

    at com.niku.xql2.XQLVisitor.preProcess(XQLVisitor.java:1385)

    at com.niku.union.xml.dom.DOMWalker.preProcess(DOMWalker.java:194)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:74)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)

    at com.niku.union.xml.dom.DOMWalker.traverseIntern(DOMWalker.java:92)

    at com.niku.union.xml.dom.DOMWalker.traverse(DOMWalker.java:36)

    at com.niku.xog.service.XOGXBLHandler.processXBL(XOGXBLHandler.java:260)

    at com.niku.xog.service.XOGXBLHandler.process(XOGXBLHandler.java:167)

    at com.niku.xog.service.ObjectHandler.processRequest(ObjectHandler.java:198)

    at com.niku.xog.service.ObjectHandler.process(ObjectHandler.java:99)

    at com...

     

     

    Can you help me with this?

     

    Regards,

     

    Marc



  • 2.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 05:43 AM

    Anything in the logs ?

     

    NJ



  • 3.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 05:47 AM

    Absolutely nothing



  • 4.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 05:45 AM

    Could it just be "access rights" - i.e. the user you are using to run the XOG through does not have the "create" right, it only has the "update" right?

     

    (GUESSing here)



  • 5.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 05:50 AM

    Hi,

     

    Maybe I've explained myself wrong. I'm not creating or updating anything. There are two identical processes, the only difference between them is that the first one is being executed when creating a project, and the second one runs when a field is updated. The first one throws an error, the other one (with the same script exactly) works fine. The most strange thing is that if I I execute the xml (see above) via XOG client, it works fine too.

     

    Regards,

     

    Marc



  • 6.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 05:59 AM

    Really , check the access rights and the various authentication / users involved - the symptoms that you are describing (especially "it works differently when I use the XOG client") sound like problems that people have when different authentication (i.e. a different user) is being used under different scenarios.



  • 7.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 06:12 AM

    Hi,

     

    But if it's a problem of access rights, why the other process (the one that is executed when we update the field) works fine if users are the same?

     

    Regards,

     

    Marc



  • 8.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 06:37 AM

    Sorry - I'm really suggesting that the users are not the same when you are doing something different and that one of the users has "create and update" rights and the other only has "update".



  • 9.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 06:52 AM

    It's not this case. I'm using the same user.



  • 10.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 07:03 AM

    OK, sorry for the distraction.

     

    Adding participants through XOG has historically been "tricky", I don't think it worked at all in earlier Clarity versions, so there might be some underlying "features" in the way it works that are causing your problem? Is it possible to re-engineer your solution so you don't need the "create" process, only the "update" one.



  • 11.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 08:49 AM

    Yes, that's what I will have to do, but I find it really strange. I posted this issue in case someone would have encountered the same issue in adding participants through a "creation" process.

     

    Regards,

     

    Marc



  • 12.  Re: XOG error while adding participants to project

    Posted Dec 01, 2015 09:50 AM

    Well it might be a bug - worth raising with support?

     

    --

     

    Another thing that makes me wonder ; the process that is running the XOG (on creation) - is this trying to update (through XOG) the same project instance that is being created (i.e. the one triggering the process) - if so then there might be some confusion there as I would not know what state that "project" is in at the point that the XOG runs (whether it exists or not outside the logical transaction that is in progress). Not sure if that makes sense - I'm trying to say that the XOG is trying to create something that is also only just being created (and this is different to your "update" process-scenario and different to when you run the XML outside of the process).



  • 13.  Re: XOG error while adding participants to project

    Posted Jan 13, 2016 12:22 PM

    The one reason I can think of is that the project is not created when you are trying to add participants. There could be an order of operations in your process. Make sure you are first creating the project and the project is actually created THEN invoke a xog to add participants to the already created project. This is one reason your process may be working on update but not on creation

     

    Thanks