Clarity

Expand all | Collapse all

Clarity Program save via XOG API

  • 1.  Clarity Program save via XOG API

    Posted 07-20-2015 09:23 AM

    I need help from you about Clarity Program save via XOG API. Clarity Project Id is auto numbering system. When you want to add an Clarity Program from Clarity Interface this Project Id will be automatically populated. Now if we want to save via XOG API, how can I get this Id. We tried with  addin <args name="overrideAutoNumbering" value="false"/> in Header section in XOG . But this is working for Clarity Custom Object. I tried to post with this section for Program Save. We are not able to save this. Can you help us how can I get next auto number to save an Program via XOG API.

     

    I got an option via MS SQL from the following. But how can I use this via XOG.

    https://communities.ca.com/thread/241692646

     

     

    <sql:query var="MAIN_A">

      select  NEXT_VALUE

      from CMN_AUTONUM_SCHEMES

      where OBJECT_CODE='project'

      and ATTRIBUTE_CODE='unique_code'

      </sql:query>

     

    Message was edited by: Tapas Mondal



  • 2.  Re: Clarity Program save via XOG API

    Posted 07-20-2015 09:21 PM

    You may need to provide more details and log a support case for this question.  There has been some issues with XOG and auto-numbering.  So to ensure that you get the right response, please log a support case.



  • 3.  Re: Clarity Program save via XOG API

    Posted 07-20-2015 11:38 PM

    Thank you for your response

    we are using the folloing xml via xog

    ===============================

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

    <Header version="13.2" action="write" objectType="project" externalSource="NIKU">

    <args name="overrideAutoNumbering" value="false"/>

    </Header>

    <Projects><Project name="Test Data"   status="0" program="true">

    <CustomInformation></CustomInformation></Project></Projects></NikuDataBus>

     

     

    ==============================

    output:

    ======================================

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

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

      <Object type="project"/>

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

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

      <ErrorInformation>

        <Severity>FATAL</Severity>

        <Description>[Error] :0:0: element "Project" is missing "projectID" attribute

    </Description>

        <Exception type="java.lang.Exception">Invalid xml data</Exception>

      </ErrorInformation>

    </XOGOutput>

    ====================================

     

    Please help me how to overcome this problem



  • 4.  Re: Clarity Program save via XOG API

    Posted 07-30-2015 12:55 PM

    Sorry for the delay.

    You need to specify the 'projectID' attribute with no value in the input file.

    Let me know if that helps.



  • 5.  Re: Clarity Program save via XOG API

    Posted 07-31-2015 04:16 PM


  • 6.  Re: Clarity Program save via XOG API

    Posted 07-31-2015 04:42 PM

    In his webinar

    XOG (XML Open Gateway) Best Practices Webinar UK Edition - Replay the Webinar with Q & A Transcript.

    around 37 min Federico talk about autonumbering.

    He is about the most posting contributor on XOG issues and knows the tips and tricks and catchas.

    Some of those are shared in his user friendly  power tool XQ/XOG Query Bridge.