Clarity

 View Only
Expand all | Collapse all

XOG transactions failing

  • 1.  XOG transactions failing

    Posted Nov 06, 2015 03:01 PM

    Hi, I am trying to xog in transactions using the following code

     

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

    <Header version="12.0" action="write" objectType="transaction" externalSource="ORACLE-FINANCIAL" />

    <Transactions>

      <Transaction actualCostRate="4444" actualCostRateCurrency="USD" billRate="4444" billRateCurrency="USD" chargeCode="billable" chargeable="1" inputTypeCode="Billable" projectID="103000" externalID="200005" resourceID="braden" roleID="BC" taskID="5000953" transactionDate="2015-01-23" transactionType="L" units="10" >

      </Transaction>

    </Transactions>

    </NikuDataBus>

     

     

    However, I am get the following XML error:

     

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

      <Object type="transaction"/>

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

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

      <Records>

        <Record>

          <KeyInformation>

            <column name="externalID">200005</column>

            <column name="projectID">103000</column>

            <column name="transactionDate">2015-01-23T00:00:00</column>

          </KeyInformation>

          <ErrorInformation>

            <Severity>FATAL</Severity>

            <Description>Inbound Transaction Object Insert failed</Description>

            <Exception><![CDATA[

    java.lang.Exception:  The Task ID 5000953 Provided is Invalid.

    at com.niku.xog.util.XOGContinueHandler.postProcess(XOGContinueHandler.java:36)

    at com.niku.xql2.handlers.BaseHandler.postProcess(BaseHandler.java:48)

    at com.niku.xql2.XQLVisitor.postProcess(XQLVisitor.java:1419)

    at com.niku.union.xml.dom.DOMWalker.postProcess(DOMWalker.java:210)

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

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

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

     

     

    Any idea how to fix this?

     

    Thanks

     

    Joost



  • 2.  Re: XOG transactions failing

    Posted Nov 06, 2015 04:23 PM

    What are the results of running this query on the same schema?

     

    select PRID from PRTASK where PRID = 5000953

     

    And also this query?

     

    select PRID from PRTASK where PRID = '5000953'

     

    Thanks.



  • 3.  Re: XOG transactions failing

    Posted Nov 06, 2015 04:33 PM

    Thanks, but i am not so much of a query specialist. How do I do that?

     

    Op 6 nov. 2015 om 22:23 heeft nick_darlington <communityadmin@communities-mail.ca.com<mailto:communityadmin@communities-mail.ca.com>> het volgende geschreven:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

    XOG transactions failing

     

    reply from Nick Darlington<https://communities.ca.com/people/nick_darlington?et=watches.email.thread> in CA PPM - View the full discussion<https://communities.ca.com/message/241839002?et=watches.email.thread#241839002>



  • 4.  Re: XOG transactions failing

    Posted Nov 06, 2015 04:45 PM

    You would need (and I perhaps assumed) access to the database to run the queries against it; are you an On Demand customer or does your system have a database administrator (DBA) who can perform that for you?

     

    If the former (On Demand / SaaS) I may be able to check on your behalf if needed, if the latter (On Premise) you should only need to provide the DBA the query texts above and have them run it against the Clarity / PPM schema.

     

    I would be wanting to know if either (or both) of the queries do not return any results, or if they just return a single value/result as normally expected.



  • 5.  Re: XOG transactions failing
    Best Answer

    Posted Nov 06, 2015 04:54 PM

    There is another way to check that without a query.

     

    I take you are trying to write the transaction on an existing task.in an existing project. If not then you would have to create those first.

    In the GUI open the properties of that project.

    Look at the URL

    does it say that the project ID is 103000 or is that the Id the that is displayed in the properties.

    THen do the same with the task for which you are going to write the transaction, open the the properties and look what task ID is in the URL.

    That would have to be 5000953 for writing the transaction with that ID. in the XML.



  • 6.  Re: XOG transactions failing

    Posted Nov 06, 2015 05:14 PM

    True but there are two queries for a reason in this specific case, in the event that the data is there but not being returned due to the way the parameter is bound to the query (as a string type rather than numeric).

     

    So if the task is found via the UI, we would still want/need the queries to be executed.



  • 7.  Re: XOG transactions failing

    Posted Nov 07, 2015 01:27 AM

    Can't disagree with that nick_darlington but you know that all of the users are not that technical and do not have accesses to the system and do not have an ear in the IT but still got to do what you gotto do.

    You are not gonna teach how to use Dynamic lookups here?



  • 8.  Re: XOG transactions failing

    Posted Nov 06, 2015 05:40 PM

    Got it, this works now... So my next question. Is it possible to import transactions on tasks not yet known in clarity?

     

    Joost

     

    Op 6 nov. 2015 om 22:55 heeft urmas <communityadmin@communities-mail.ca.com<mailto:communityadmin@communities-mail.ca.com>> het volgende geschreven:

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

    XOG transactions failing

     

    reply from urmas<https://communities.ca.com/people/urmas?et=watches.email.thread> in CA PPM - View the full discussion<https://communities.ca.com/message/241839017?et=watches.email.thread#241839017>



  • 9.  Re: XOG transactions failing

    Posted Nov 07, 2015 01:31 AM

    IMHO you might get better responses if you make a habit of posting the outcomes when you have asked a question.

     

    "Is it possible to import transactions on tasks not yet known in clarity"

    The short answer is yes.

    You've got two options to meet the perquisites that the task must exist in Clarity before you can XOG in a transaction.

    1. Create the task in GUI

    2. Create the task with XOG.

     

    If the task ain't there you'll get an error similar to the one you already had.



  • 10.  Re: XOG transactions failing

    Posted Nov 07, 2015 04:14 AM

    Thanks, outcome was indeed the lookup of the exact taskid. I guess the read I did was not automatically the same as writing it back in clarity. I found the taskid by looking at the URL and add that one in the XML.

     

    As for you answer on the import of tasks when they don't exist. Not sure if this works for me. I assume now that you have to xog in the tasks first, then retrieve all taskid's and then do another xog importing the transactions. I guess there is not one XML that can do it all?

     

    Joost



  • 11.  Re: XOG transactions failing

    Posted Nov 07, 2015 06:10 AM

    No I don't thgink there is a single xml file that can do that. As you say the problem is when you create a task with XOG you do not know what the ID will be.'