Clarity

  • 1.  XOG with CA Process Automation Manager

    Posted Sep 22, 2016 10:08 AM

    Hi folks, i've built a .net application to create contacts and resources via XOG with success and right now i'm trying to create a Project via XOG from CA Process Automation.

     

    First step, login. Goes well. Get a SID looking like : 5695052__FEB6F157-5DA9-4128-BAF7-0E961F7DA846

     

    Second step, read project. 

     

    <tns:ReadProject xmlns:tns="http://www.niku.com/xog/Object">
      <tns:ReadProject>
         <!--xsd:Any Type Here-->
      </tns:ReadProject>
      <tns:Auth>
         <tns:SessionID>SessionID__</tns:SessionID>
         <tns:TenantID>TenantID__</tns:TenantID>
         <tns:Username>Username__</tns:Username>
         <tns:Password>Password__</tns:Password>
      </tns:Auth>
    </tns:ReadProject>

    Replace SessionID__ with 5695052__FEB6F157-5DA9-4128-BAF7-0E961F7DA846.

     

    XOG returns : 

    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
          <Status elapsedTime="0.0 seconds" state="FAILURE"/>
          <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
          <ErrorInformation>
            <Severity>FATAL</Severity>
            <Description>No active session.  Please login or provide a valid session identifier.</Description>
            <Exception/>
          </ErrorInformation>
        </XOGOutput>

     

    What am I doing wrong?

     

    Thanks



  • 2.  Re: XOG with CA Process Automation Manager

    Posted Sep 22, 2016 11:32 AM

    Do you think the duration between obtaining session ID and using it in XOG is greater than that set at system level for session inactivity?



  • 3.  Re: XOG with CA Process Automation Manager

    Posted Sep 22, 2016 11:56 AM

    I do not know where to set this options, but there is approx 1 sec between the login and the readProject.



  • 4.  Re: XOG with CA Process Automation Manager

     
    Posted Sep 27, 2016 03:20 PM

    Hi pier-olivier.tremblay - Did gcubed's response help answer your question? Thanks, Chris



  • 5.  Re: XOG with CA Process Automation Manager

    Posted Sep 27, 2016 03:34 PM

    Did not had time to test it. I'll mark it as answered and ask again if i can't make it work.

     

    Thanks guys for your answers.



  • 6.  Re: XOG with CA Process Automation Manager
    Best Answer

    Posted Sep 22, 2016 12:11 PM

    The request looks like this with a session.

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
       <soapenv:Header>
          <obj:Auth>
             <!--Optional:-->
             <obj:SessionID>30054733__4078E11E-6900-4302-8E80-F165CBB78F1B</obj:SessionID>
          </obj:Auth>
       </soapenv:Header>
       <soapenv:Body>
          <obj:ReadProject>
             <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Header version="13.2.0.472" externalSource="NIKU">
                   <!--you change the order by simply swap 1 and 2 number in the name attribute-->
                   <args name="order_by_1" value="name"/>
                   <args name="order_by_2" value="projectID"/>
                   <args name="include_tasks" value="false"/>
                   <args name="include_dependencies" value="false"/>
                   <args name="include_subprojects" value="false"/>
                   <args name="include_resources" value="false"/>
                   <args name="include_baselines" value="false"/>
                   <args name="include_allocations" value="false"/>
                   <args name="include_estimates" value="false"/>
                   <args name="include_actuals" value="false"/>
                   <args name="include_custom" value="false"/>
                   <args name="include_burdening" value="false"/>
                </Header>
                <Query>
                   <Filter name="name" criteria="EQUALS">ACCFS</Filter>
                </Query>
             </NikuDataBus>
          </obj:ReadProject>
       </soapenv:Body>
    </soapenv:Envelope>

     

    Or you can just login and do the read in a single request.

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
    <soapenv:Header>
    <obj:Auth>
    <obj:Username>admin</obj:Username>
    <obj:Password>password</obj:Password>
    </obj:Auth>
    </soapenv:Header>
    <soapenv:Body>
    <obj:ReadProject>
    <NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Header version="13.2.0.472" externalSource="NIKU">
    <!--you change the order by simply swap 1 and 2 number in the name attribute-->
    <args name="order_by_1" value="name"/>
    <args name="order_by_2" value="projectID"/>
    <args name="include_tasks" value="false"/>
    <args name="include_dependencies" value="false"/>
    <args name="include_subprojects" value="false"/>
    <args name="include_resources" value="false"/>
    <args name="include_baselines" value="false"/>
    <args name="include_allocations" value="false"/>
    <args name="include_estimates" value="false"/>
    <args name="include_actuals" value="false"/>
    <args name="include_custom" value="false"/>
    <args name="include_burdening" value="false"/>
    </Header>
    <Query>
    <Filter name="name" criteria="EQUALS">ACCFS</Filter>
    </Query>
    </NikuDataBus>
    </obj:ReadProject>
    </soapenv:Body>
    </soapenv:Envelope>

     

    V/r,

    Gene