AnsweredAssumed Answered

CA PPM UPGRADE FROM 14.3 TO 15.1 SCRIPT GEL ERROR

Question asked by RnFernandez on Jan 8, 2017
Latest reply on Jan 9, 2017 by RnFernandez

The gel script here detailed, work at ca ppm version 14.3 but not work at 15.1

 

Error>

\

 

[XOG]<?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="9.454 seconds" state="FAILURE"/>

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

      <Records>

        <Record>

          <KeyInformation>

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

            <column name="name">FTK-000292 - Prueba 1 PPM 15</column>

            <column name="UNIQUE_NAME">FTK-000292</column>

          </KeyInformation>

          <ErrorInformation>

            <Severity>FATAL</Severity>

            <Description>Project Object insert failed</Description>

            <Exception><![CDATA[

com.niku.xql2.XQLInvalidElementException: tokenizer requires name (tok) and str () attributes to be non-null

         at com.niku.xql2.handlers.TokenizerHandler.postProcess(TokenizerHandler.java:30)

         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.LoopHandler.processObject(LoopHandler.java:388)

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

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

         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:388)

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

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

         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.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:388)

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

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

         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:388)

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

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

         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.processOb...

 

BG-CA.LOG

 

WARN  2017-01-05 11:34:53,772 [Custom script execution pool-8-thread-3] utils.Utils (clarity:admin:68029599__637BB7A9-45CF-4F2A-8860-9334E90DF7FB:none) ----> The exception trace is too big to be attached to the process error message. Only a truncated exception trace will be attaced to the process error message. Here is the complete exception trace: [XOG]<?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="9.454 seconds" state="FAILURE"/>

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

      <Records>

        <Record>

          <KeyInformation>

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

            <column name="name">FTK-000292 - Prueba 1 PPM 15</column>

            <column name="UNIQUE_NAME">FTK-000292</column>

          </KeyInformation>

          <ErrorInformation>

            <Severity>FATAL</Severity>

            <Description>Project Object insert failed</Description>

            <Exception><![CDATA[

com.niku.xql2.XQLInvalidElementException: tokenizer requires name (tok) and str () attributes to be non-null

         at com.niku.xql2.handlers.TokenizerHandler.postProcess(TokenizerHandler.java:30)

         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.LoopHandler.processObject(LoopHandler.java:388)

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

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

         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:388)

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

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

         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.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:388)

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

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

         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:388)

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

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

         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:388)

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

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

         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:259)

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

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

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

         at com.niku.xog.service.XOGDispatch.processMessage(XOGDispatch.java:133)

         at com.niku.xog.service.XOGSOAPServlet.processMessage(XOGSOAPServlet.java:585)

         at com.niku.xog.service.XOGSOAPServlet.doPost(XOGSOAPServlet.java:263)

         at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at com.niku.union.web.filter.ResponseHeaders.doFilter(ResponseHeaders.java:62)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at com.niku.union.web.filter.ClarityContentFilter.doFilter(ClarityContentFilter.java:153)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at com.niku.union.web.filter.XSSFilter.doFilter(XSSFilter.java:86)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at com.niku.union.web.filter.TenantSetupFilter.doFilter(TenantSetupFilter.java:50)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:45)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:88)

         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)

         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)

         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)

         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)

         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)

         at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:63)

         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)

         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)

         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)

         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)

         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)

         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)

         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)

         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

         at java.lang.Thread.run(Thread.java:745)

]]></Exception>

          </ErrorInformation>

        </Record>

        <Record>

          <KeyInformation>

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

            <column name="name">FTK-000292 - Prueba 1 PPM 15</column>

            <column name="UNIQUE_NAME">FTK-000292</column>

          </KeyInformation>

          <ErrorInformation>

            <Severity>WARNING</Severity>

            <Description>XOG-3923: Entity Code is read-only the value ITAU will be ignored.</Description>

          </ErrorInformation>

        </Record>

      </Records>

    </XOGOutput>

  </soapenv:Body>

</soapenv:Envelope>

 

java.lang.Exception: Stack Trace

         at com.niku.union.persistence.utils.Utils.truncateExceptionTrace(Utils.java:1768)

         at com.niku.bpm.utilities.PersistenceUtils.addError(PersistenceUtils.java:225)

         at com.niku.bpm.utilities.BpmErrors.setError(BpmErrors.java:409)

         at com.niku.bpm.utilities.BpmErrors.setRuntimeMessage(BpmErrors.java:272)

         at com.niku.bpm.utilities.BusinessProcessUtilsImpl.setProcessInstanceMessage(BusinessProcessUtilsImpl.java:577)

         at com.niku.union.gel.tags.LogTag.doTag(LogTag.java:135)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at org.apache.commons.jelly.tags.core.OtherwiseTag.doTag(OtherwiseTag.java:41)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at org.apache.commons.jelly.tags.core.CatchTag.doTag(CatchTag.java:44)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)

         at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)

         at com.niku.union.gel.tags.ScriptTag.doTag(ScriptTag.java:20)

         at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)

         at com.niku.union.gel.GELScript.run(GELScript.java:67)

         at com.niku.union.gel.GELController.invoke(GELController.java:74)

         at com.niku.bpm.services.ExecuteCustomAction.run(ExecuteCustomAction.java:207)

         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

         at java.lang.Thread.run(Thread.java:745)

 

Gel Script>

<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:core="jelly:core" xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"

  xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary" xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"

  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sql="jelly:sql" xmlns:xog="http://www.niku.com/xog"

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

  <!-- DATASOURCE -->

  <gel:setDataSource dbId="niku"/>

  <!-- PARAMETROS -->

  <!-- ========== -->

  <gel:parameter default="http://localhost" var="p_XOGURL"/>

  <gel:parameter default="admin" var="p_XOGUsername"/>

  <gel:parameter default="admin" secure="true" var="p_XOGPassword"/>

  <gel:parameter default="" var="p_verbose"/>

  <gel:parameter default="1" var="p_status"/>

  <gel:parameter default="1" var="p_progress"/>

  <gel:parameter default="e1" var="p_stageCode"/>

  <gel:parameter default="linea04" var="p_itau_linea_servicio"/>

  <gel:parameter default="linea02" var="p_itau_linea_ppto"/>

  <gel:parameter default="sub03" var="p_itau_sublinea_ppto"/>

  <gel:parameter default="itau_n3_a1" var="p_creator_branch"/>

  <gel:out>[Crea Fastrack] Inicio de Paso de Creación de Objeto</gel:out>

  <gel:log category="XOG" level="INFO">Inicio de Paso de Creación de Objeto</gel:log>

  <!-- QUERY SQL -->

  <!-- ========== -->

  <sql:query escapeText="false" var="v_query_1"><![CDATA[

                SELECT     FT.code,

                                                    FT.code + ' - ' + FT.itau_nombre_ft nombreFT,

                                                    FT.itau_alcance DescFT,

                                                    CONVERT(varchar,FT.itau_fecha_inicio,127) inicio,

                                                    CONVERT(varchar,FT.itau_fecha_fin,127) fin,

                                                    FT.itau_esfuerzo estimado,

                                                    APP.code CodApp,

                                                    RES.UNIQUE_NAME Creador,

                                                    UNIT.path UnitPath,

                                                    INV_FT.NAME Inv_ft_name,

                                                    getDate() Fecha

                                   FROM niku.ODF_CA_ITAU_SOLICITUD_FT FT

                                   INNER JOIN niku.ODF_CA_ITAU_EJECUCION_FT EFT ON (FT.id = EFT.ODF_PARENT_ID)

                                   INNER JOIN niku.SRM_RESOURCES RES on (RES.ID = FT.itau_enviada_por)

                                   LEFT OUTER JOIN niku.INV_INVESTMENTS APP ON (APP.ID = FT.itau_aplicacion)

                                   LEFT OUTER JOIN niku.INV_INVESTMENTS INV_FT ON (INV_FT.code = FT.code)

                                   LEFT OUTER JOIN (SELECT A.record_id,

                                                                                       A.unit_id,

                                                                                        SUBSTRING(D.path,4,9999999) +

                                                                                                 CASE WHEN DEP2.itau_asignar_dep_dif is null

                                                                                                          THEN ''

                                                                                                          ELSE '/' + (SELECT DEP3.SHORTDESC

                                                                                                                                    FROM niku.DEPARTMENTS DEP3

                                                                                                                                    WHERE DEP3.ID = DEP2.itau_asignar_dep_dif

                                                                                                                                   )

                                                                                                  END path

                                                                      FROM niku.PRJ_OBS_ASSOCIATIONS A

                                                                      INNER JOIN niku.DEPARTMENTS DEP ON (A.unit_id = DEP.obs_unit_id )

                                                                      INNER JOIN niku.ODF_CA_DEPARTMENT DEP2 ON (DEP.id = DEP2.id)

                                                                      INNER JOIN niku.PRJ_OBS_UNITS U ON A.unit_id = U.id

                                                                      INNER JOIN niku.PRJ_OBS_TYPES T ON (U.type_id = T.id

                                                 AND T.unique_name = 'itau_departments_obs')

                                                                      INNER JOIN niku.NBI_DIM_OBS D ON U.id = D.obs_unit_id

                                                                      WHERE A.table_name = 'SRM_RESOURCES'

                                                                      ) UNIT ON RES.id = UNIT.record_id

                                   WHERE EFT.id = ${gel_objectInstanceId}

                                   ]]></sql:query>

  <core:if test="${p_verbose != '0'}">

    <gel:out>[Crea Fastrack] Query Ejecutado</gel:out>

    <gel:log category="XOG" level="INFO">Query Ejecutado</gel:log>

  </core:if>

  <!-- HACE LOGIN -->

  <!-- ========== -->

  <core:catch var="v_xog_exception">

    <soap:invoke endpoint="${p_XOGURL}/niku/xog" var="auth">

      <soap:message>

        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">

          <soapenv:Header/>

          <soapenv:Body>

            <xog:Login>

              <xog:Username>${p_XOGUsername}</xog:Username>

              <xog:Password>${p_XOGPassword}</xog:Password>

            </xog:Login>

          </soapenv:Body>

        </soapenv:Envelope>

      </soap:message>

    </soap:invoke>

    <gel:set asString="true" select="$auth/soapenv:Envelope/soapenv:Body/xog:SessionID/text()" var="sessionID"/>

    <core:choose>

      <!-- VALIDA QUE EL LOGIN SE HAYA HECHO BIEN -->

      <!-- ====================================== -->

      <core:when test="${sessionID == null}">

        <gel:out>[Crea Fastrack] No se pude realizar el Log in. Chequee el usuario y el password.</gel:out>

        <gel:log category="XOG" level="ERROR"> No se pude realizar el Log in. Chequee el usuario y el password.</gel:log>

      </core:when>

      <core:otherwise>

        <!-- PARA CADA REGISTRO SE ASIGNAN LAS VARIABLES PARA EL OBJETO -->

        <!-- ========================================================== -->

        <core:forEach items="${v_query_1.rows}" var="row">

          <!-- ASIGNACION DE VARIABLES -->

          <core:set var="v_project_code">${row.code}</core:set>

          <core:set var="v_project_name">${row.nombreFT}</core:set>

          <core:set var="v_description">${row.descFT}</core:set>

          <core:set var="v_inc_asg_res_code">${row.Creador}</core:set>

          <core:set var="v_fecha_envio">${row.fecha}</core:set>

          <core:set var="v_inicio">${row.inicio}</core:set>

          <core:set var="v_fin">${row.fin}</core:set>

          <core:set var="v_estimado">${row.estimado}</core:set>

          <core:set var="v_unit_path">${row.UnitPath}</core:set>

          <core:set var="v_cod_app">${row.CodApp}</core:set>

          <core:set var="v_nombre_inv_ft">${row.Inv_ft_name}</core:set>

          <core:if test="${p_verbose != '0'}">

            <gel:log category="XOG" level="INFO">Parámetros leídos correctamente</gel:log>

            <gel:log category="XOG" level="INFO">Solicitud FT=${v_project_name}</gel:log>

            <gel:log category="XOG" level="INFO">Solicitud Code=${v_project_code}</gel:log>

            <gel:log category="XOG" level="INFO">Creado por=${v_inc_asg_res_code}</gel:log>

            <gel:log category="XOG" level="INFO">Fecha de Envío=${v_fecha_envio}</gel:log>

            <gel:log category="XOG" level="INFO">CodeApp=${v_cod_app}</gel:log>

            <gel:out>[Crea Fastrack] Parámetros leídos correctamente</gel:out>

            <gel:out>[Crea Fastrack] Solicitud FT=${v_project_name}</gel:out>

            <gel:out>[Crea Fastrack] Solicitud Code=${v_project_code}</gel:out>

            <gel:out>[Crea Fastrack] Fecha de Envío=${v_fecha_envio}</gel:out>

          </core:if>

          <!-- CREACION DE XOG WRITE CON DATOS DEL OBJETO -->

          <gel:parse var="xogwrite">

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

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

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

              </Header>

              <Projects>

                <Project description="${v_description}" entityCode="ITAU" finish="${v_fin}" managerResourceID="${v_inc_asg_res_code}"

                  name="${v_project_name}" openForTimeEntry="true" progress="${p_progress}" projectID="${v_project_code}" stageCode="${p_stageCode}"

                  start="${v_inicio}" status="${p_status}" trackMode="2" financialStatus="H">

                  <Resources>

                    <Resource projectRoleID="itau_tl" resourceID="${v_inc_asg_res_code}"/>

                  </Resources>

                  <Tasks>

                    <Task finish="${v_fin}" key="true" milestone="false" name="Resolver FT ${v_project_code}" openForTimeEntry="true" orderID="1"

                      outlineLevel="1" start="${v_inicio}" summary="false">

                      <Assignments>

                        <TaskLabor remainingWork="${v_estimado}" resourceID="${v_inc_asg_res_code}" roleID="itau_tl" start="${v_inicio}"/>

                      </Assignments>

                      <CustomInformation>

                        <ColumnValue name="partition_code">itau_n2_p1</ColumnValue>

                      </CustomInformation>

                    </Task>

                  </Tasks>

                  <CustomInformation>

                    <ColumnValue name="partition_code">itau_n2_p1</ColumnValue>

                    <ColumnValue name="itau_clasif_est_oe">2</ColumnValue>

                    <ColumnValue name="itau_un_negocio_usr">${p_creator_branch}</ColumnValue>

                    <ColumnValue name="itau_linea_servicio">${p_itau_linea_servicio}</ColumnValue>

                    <ColumnValue name="itau_linea_ppto">${p_itau_linea_ppto}</ColumnValue>

                    <ColumnValue name="itau_sublinea_ppto">${p_itau_sublinea_ppto}</ColumnValue>

                    <ColumnValue name="itau_id_solic_clrty">${gel_objectInstanceId}</ColumnValue>

                    <ColumnValue name="itau_aplicaciones">

                      <Value>${v_cod_app}</Value>

                    </ColumnValue>

                  </CustomInformation>

                  <OBSAssocs completed="false">

                    <OBSAssoc id="itau_departments_obs" name="ITAU Departments" unitPath="${v_unit_path}"/>

                  </OBSAssocs>

                </Project>

              </Projects>

            </NikuDataBus>

          </gel:parse>

          <!-- ESCRITURA DEL OBJETO -->

          <core:catch var="v_xog_exception">

            <soap:invoke endpoint="${p_XOGURL}/niku/xog" var="runresult">

              <soap:message>

                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">

                  <soapenv:Header>

                    <xog:Auth>

                      <xog:SessionID>${sessionID}</xog:SessionID>

                    </xog:Auth>

                  </soapenv:Header>

                  <soapenv:Body>

                    <gel:include select="$xogwrite"/>

                  </soapenv:Body>

                </soapenv:Envelope>

              </soap:message>

            </soap:invoke>

          </core:catch>

          <gel:set asString="true" select="$runresult//Status/@state" var="XOG_STATUS"/>

          <gel:set asString="true" select="$runresult//Statistics/@totalNumberOfRecords" var="XOGtotalrecords"/>

          <gel:set asString="true" select="$runresult//Statistics/@insertedRecords" var="XOGinsertedrecords"/>

          <gel:set asString="true" select="$runresult//Statistics/@updatedRecords" var="XOGupdatedrecords"/>

          <gel:set asString="true" select="$runresult//Statistics/@failureRecords" var="XOGfailurerecords"/>

          <core:if test="${XOGfailurerecords == '1'}">

            <gel:out>[Crea Fastrack] <gel:expr select="$runresult"/>

            </gel:out>

            <gel:log category="XOG" level="ERROR">

              <gel:expr select="$runresult"/>

            </gel:log>

          </core:if>

          <core:if test="${p_verbose != '0'}">

            <gel:out>[Crea Fastrack] <gel:expr select="$runresult"/>

            </gel:out>

            <gel:log category="XOG" level="INFO">

              <gel:expr select="$runresult"/>

            </gel:log>

          </core:if>

        </core:forEach>

      </core:otherwise>

    </core:choose>

  </core:catch>

  <core:if test="${v_xog_exception != null}">

    <gel:out>[Crea Fastrack] Fallo de Proceso: ${v_xog_exception}</gel:out>

    <gel:log category="XOG" level="ERROR">Fallo de Proceso: ${v_xog_exception}</gel:log>

  </core:if>

  <!-- LOGOUT -->

  <!-- ====== -->

  <soap:invoke endpoint="${p_XOGURL}/niku/xog" var="logoutresult">

    <soap:message>

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">

        <soapenv:Header>

          <xog:Auth>

            <xog:SessionID>${sessionID}</xog:SessionID>

          </xog:Auth>

        </soapenv:Header>

        <soapenv:Body>

          <xog:Logout/>

        </soapenv:Body>

      </soapenv:Envelope>

    </soap:message>

  </soap:invoke>

  <core:if test="${p_verbose != '0'}">

    <gel:out>[Crea Fastrack] Fin proceso</gel:out>

    <gel:log category="XOG" level="INFO">Fin proceso</gel:log>

  </core:if>

  <!-- FIN BUCLE DE ASIGNACION DE VARIABLES Y EJECUCION XOG -->

</gel:script>

Outcomes