Clarity

 View Only
  • 1.  Error when transport Custom Scripts

    Posted Jul 12, 2017 02:24 PM

    Hi,

      I'm trying to transport processes between distinct environments, using the bpm_process content_pack read XOGs.

     

    I read the processes in an environment (development) and when I try to write these processes in the other environment (QA) I get the following error:

     <Record>
    <KeyInformation>
    <column name="ProcessCode">eb_atu_nome_prod</column>
    </KeyInformation>
    <ErrorInformation>
    <Severity>FATAL</Severity>
    <Description>Problem while inserting/updating processes</Description>
    <Exception>
    org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 54; The prefix "xog" for element "xog:Login" is not bound.
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)

     

    I developed a very simple GEL Script, using the XOG documentation as guidance, to test this transport and it also did not work. The GEL Script below was used in the process I'm trying to transport:

     

    <gel:script xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:core="jelly:core"
    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
    xmlns:file="jelly:com.niku.union.gel.FileTagLibrary"
    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:sql="jelly:sql"
    xmlns:x="jelly:xml"
    xmlns:xog="http://www.niku.com/xog"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <gel:parameter default="http://localhost" var="XOGURL"/>
    <gel:parameter default="uxog" var="XOGusername"/>
    <gel:parameter secure="true" var="XOGpassword"/>

    <soap:invoke endpoint="${XOGURL}/niku/xog" var="xog_login">
    <soap:message>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Body>
    <xog:Login xmlns="http://www.niku.com/xog">
    <xog:Username>${XOGusername}</xog:Username>
    <xog:Password>${XOGpassword}</xog:Password>
    </xog:Login>
    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>

    <gel:set asString="true" select="$xog_login/soap-env:Envelope/soap-env:Body/xog:SessionID/text()" var="sessionID"/>

    <core:choose>

    <core:when test="${sessionID == null}">
    <gel:out>Couldn't Log in. Check the username/password.</gel:out>
    </core:when>

    <core:otherwise>
    <core:catch var="errorVar">
    <gel:setDataSource dbId="Niku"/>
    </core:catch>

    <sql:query var="rs">

    <![CDATA[
    select i.code
    , i.name
    from inv_investments i
    inner join odf_ca_project o on o.id = i.id
    where i.odf_object_code = 'PROJECT'
    and o.eb_cron_autom = 1
    and i.code = '00002648'
    ]]>

    </sql:query>

    <core:forEach items="${rs.rowsByIndex}" trim="true" var="row">

    <soap:invoke endpoint="${XOGURL}/niku/xog" var="XOG_result">
    <soap:message>
    <soap-env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Header>
    <xog:Auth>
    <xog:SessionID>${sessionID}</xog:SessionID>
    </xog:Auth>
    </soap-env:Header>

    <soap-env:Body>

    <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.1.1.1208"/>
    <Projects>
    <Project name="${row[1]}" projectID="${row[0]}">
    </Project>
    </Projects>
    </NikuDataBus>

    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>

    <gel:set asString="true" select="$XOG_result/soap-env:Envelope/soap-env:Body/XOGOutput/Status/@state" var="XOG_STATUS"/>
    <core:switch on="${XOG_STATUS}">
    <core:case value="SUCCESS">
    <gel:log level="INFO"> Sucesso no XOG. Projeto ${row[0]}</gel:log>
    </core:case>
    <core:case value="FAILURE">
    <gel:log level="ERROR">
    Erro no XOG.
    <gel:expr select="$XOG_result"/>
    </gel:log>
    </core:case>
    </core:switch>

    </core:forEach>

    </core:otherwise>
    </core:choose>

    <soap:invoke endpoint="${XOGURL}/niku/xog" var="xog_logout">
    <soap:message>
    <soap-env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Header>
    <xog:Auth>
    <xog:SessionID>${sessionID}</xog:SessionID>
    </xog:Auth>
    </soap-env:Header>
    <soap-env:Body>
    <xog:Logout/>
    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>

    </gel:script>

     

    Has anyone ever experienced this ?



  • 2.  Re: Error when transport Custom Scripts

    Posted Jul 12, 2017 02:56 PM

    The error implies the XML you are trying to XOG in is badly formatted. Honestly I moved over to the Xog Bridge tool (search the boards for some posts, or just google), its so much easier than dealing with the official XOG client that I haven't looked back. I'd recommend giving that a shot, as I'm sure would many others around here.



  • 3.  Re: Error when transport Custom Scripts

    Posted Jul 12, 2017 03:30 PM
    Hi Elias,
      Thanks for the reply.
      I'm using the XOG Bridge to run the XOGs.   Why do you understand it is badly formatted?   I'm using this GEL Script and running successfully on a process. The problem only happens when I run the bpm_process writing XOG.



  • 4.  Re: Error when transport Custom Scripts

    Posted Jul 12, 2017 03:48 PM

    The error given is "The prefix "xog" for element "xog:Login" is not bound" which implies a malformed XML, but I also think I misunderstood the issue. Are you trying to XOG out and in a process that contains the posted GEL script, or are you using the GEL script to create an XML document that you then are XOGging in to another environment? Can you post the XML you are trying to XOG?



  • 5.  Re: Error when transport Custom Scripts

    Posted Jul 13, 2017 07:53 AM

    Hi Elias,

      I'm trying to take the definition of a process, which contains a GEL, from one environment to another through a writing XOG. The XOG is as follows:

     

    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_bpm_process.xsd">
    <Header action="write" externalSource="NIKU" objectType="bpm_process" version="15.2.0.213"/>
    <Processes>
    <Process allowOneRunningInstance="true" code="eb_test" createdBy="0000050989" endStep="Término" source="customer" startOption="ON_DEMAND" startStep="Início">
    <nls languageCode="ca" name="Teste Ricardo"/>
    <nls languageCode="cs" name="Teste Ricardo"/>
    <nls languageCode="da" name="Teste Ricardo"/>
    <nls languageCode="de" name="Teste Ricardo"/>
    <nls languageCode="en" name="Teste Ricardo"/>
    <nls languageCode="es" name="Teste Ricardo"/>
    <nls languageCode="fi" name="Teste Ricardo"/>
    <nls languageCode="fr" name="Teste Ricardo"/>
    <nls languageCode="hu" name="Teste Ricardo"/>
    <nls languageCode="it" name="Teste Ricardo"/>
    <nls languageCode="ja" name="Teste Ricardo"/>
    <nls languageCode="ko" name="Teste Ricardo"/>
    <nls languageCode="nl" name="Teste Ricardo"/>
    <nls languageCode="no" name="Teste Ricardo"/>
    <nls languageCode="pl" name="Teste Ricardo"/>
    <nls languageCode="pt" name="Teste Ricardo"/>
    <nls languageCode="ru" name="Teste Ricardo"/>
    <nls languageCode="sv" name="Teste Ricardo"/>
    <nls languageCode="tr" name="Teste Ricardo"/>
    <nls languageCode="zh" name="Teste Ricardo"/>
    <nls languageCode="zh_TW" name="Teste Ricardo"/>
    <Security>
    <UserSecurity rightCode="PROCESS-DEF-INST-INITIATE" userName="RJUNIOR"/>
    <UserSecurity rightCode="PROCESS-DEF-INST-WRITE" userName="RJUNIOR"/>
    </Security>
    <Objects>
    <Object manualStart="false" name="thisXmlDocument" objectType="xml_document" partitionCode="NIKU.ROOT" partitionModeCode="PARTITION_ONLY" type="BPM_POT_PRIMARY"/>
    </Objects>
    <Steps>
    <Step id="Início" isMileStone="false" sequenceNo="1">
    <nls languageCode="ca" name="Início"/>
    <nls languageCode="cs" name="Início"/>
    <nls languageCode="da" name="Início"/>
    <nls languageCode="de" name="Início"/>
    <nls languageCode="en" name="Início"/>
    <nls languageCode="es" name="Início"/>
    <nls languageCode="fi" name="Início"/>
    <nls languageCode="fr" name="Início"/>
    <nls languageCode="hu" name="Início"/>
    <nls languageCode="it" name="Início"/>
    <nls languageCode="ja" name="Início"/>
    <nls languageCode="ko" name="Início"/>
    <nls languageCode="nl" name="Início"/>
    <nls languageCode="no" name="Início"/>
    <nls languageCode="pl" name="Início"/>
    <nls languageCode="pt" name="Início"/>
    <nls languageCode="ru" name="Início"/>
    <nls languageCode="sv" name="Início"/>
    <nls languageCode="tr" name="Início"/>
    <nls languageCode="zh" name="Início"/>
    <nls languageCode="zh_TW" name="Início"/>
    <Notifications notifyOwner="false">
    <NotifyWhen stepCompleted="false" stepInError="false" stepStarted="false"/>
    <Assignees/>
    </Notifications>
    <Operations>
    <Action code="eb_gel_teste_ricardo" synchronized="true" type="BPM_SAT_CUSTOM">
    <nls languageCode="ca" name="GEL Teste Ricardo"/>
    <nls languageCode="cs" name="GEL Teste Ricardo"/>
    <nls languageCode="da" name="GEL Teste Ricardo"/>
    <nls languageCode="de" name="GEL Teste Ricardo"/>
    <nls languageCode="en" name="GEL Teste Ricardo"/>
    <nls languageCode="es" name="GEL Teste Ricardo"/>
    <nls languageCode="fi" name="GEL Teste Ricardo"/>
    <nls languageCode="fr" name="GEL Teste Ricardo"/>
    <nls languageCode="hu" name="GEL Teste Ricardo"/>
    <nls languageCode="it" name="GEL Teste Ricardo"/>
    <nls languageCode="ja" name="GEL Teste Ricardo"/>
    <nls languageCode="ko" name="GEL Teste Ricardo"/>
    <nls languageCode="nl" name="GEL Teste Ricardo"/>
    <nls languageCode="no" name="GEL Teste Ricardo"/>
    <nls languageCode="pl" name="GEL Teste Ricardo"/>
    <nls languageCode="pt" name="GEL Teste Ricardo"/>
    <nls languageCode="ru" name="GEL Teste Ricardo"/>
    <nls languageCode="sv" name="GEL Teste Ricardo"/>
    <nls languageCode="tr" name="GEL Teste Ricardo"/>
    <nls languageCode="zh" name="GEL Teste Ricardo"/>
    <nls languageCode="zh_TW" name="GEL Teste Ricardo"/>
    <customScript languageCode="gel">
    <scriptText>
    <gel:script 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:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sql="jelly:sql" xmlns:x="jelly:xml" xmlns:xog="http://www.niku.com/xog" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <gel:parameter default="http://localhost" var="XOGURL"/>
    <gel:parameter default="uxog" var="XOGusername"/>
    <gel:parameter secure="true" var="XOGpassword"/>
    <soap:invoke endpoint="${XOGURL}/niku/xog" var="xog_login">
    <soap:message>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Body>
    <xog:Login xmlns="http://www.niku.com/xog">
    <xog:Username>${XOGusername}</xog:Username>
    <xog:Password>${XOGpassword}</xog:Password>
    </xog:Login>
    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>
    <gel:set asString="true" select="$xog_login/soap-env:Envelope/soap-env:Body/xog:SessionID/text()" var="sessionID"/>
    <core:choose>
    <core:when test="${sessionID == null}">
    <gel:out>Couldn't Log in. Check the username/password.</gel:out>
    </core:when>
    <core:otherwise>
    <core:catch var="errorVar">
    <gel:setDataSource dbId="Niku"/>
    </core:catch>
    <sql:query var="rs">
    select i.code
    , i.name + ' TESTE'
    from inv_investments i
    inner join odf_ca_project o on o.id = i.id
    where i.odf_object_code = 'PROJECT'
    and o.eb_cron_autom = 1
    and i.code = '00002648' 
    </sql:query>
    <core:forEach items="${rs.rowsByIndex}" trim="true" var="row">
    <soap:invoke endpoint="${XOGURL}/niku/xog" var="XOG_result">
    <soap:message>
    <soap-env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Header>
    <xog:Auth>
    <xog:SessionID>${sessionID}</xog:SessionID>
    </xog:Auth>
    </soap-env:Header>
    <soap-env:Body>
    <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.1.1.1208"/>
    <Projects>
    <Project name="${row[1]}" projectID="${row[0]}"/>
    </Projects>
    </NikuDataBus>
    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>
    <gel:set asString="true" select="$XOG_result/soap-env:Envelope/soap-env:Body/XOGOutput/Status/@state" var="XOG_STATUS"/>
    <core:switch on="${XOG_STATUS}">
    <core:case value="SUCCESS">
    <gel:log level="INFO"> Sucesso no XOG. Projeto ${row[0]}</gel:log>
    </core:case>
    <core:case value="FAILURE">
    <gel:log level="ERROR"> 
    Erro no XOG. 
    <gel:expr select="$XOG_result"/>
    </gel:log>
    </core:case>
    </core:switch>
    </core:forEach>
    </core:otherwise>
    </core:choose>
    <soap:invoke endpoint="${XOGURL}/niku/xog" var="xog_logout">
    <soap:message>
    <soap-env:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
    <soap-env:Header>
    <xog:Auth>
    <xog:SessionID>${sessionID}</xog:SessionID>
    </xog:Auth>
    </soap-env:Header>
    <soap-env:Body>
    <xog:Logout/>
    </soap-env:Body>
    </soap-env:Envelope>
    </soap:message>
    </soap:invoke>
    </gel:script>
    </scriptText>
    <scriptParameter isSecure="false" name="XOGURL" value="http://localhost"/>
    <scriptParameter isSecure="false" name="XOGusername" value="rjunior"/>
    <scriptParameter isSecure="true" name="XOGpassword" value="[AES]lSI4bWegDwwTStpUHjzi+A=="/>
    </customScript>
    <Notifications notifyOwner="false">
    <NotifyWhen stepActionInError="false" stepActionPerformed="false" value="0"/>
    <Assignees/>
    </Notifications>
    </Action>
    </Operations>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Join type="BPM_JT_NONE">
    <Condition sequencNo="1" type="BPM_SCT_PRECONDITION"/>
    </Join>
    </TransitionRestriction>
    <TransitionRestriction>
    <Split type="BPM_ST_SEQUENCE">
    <Condition sequencNo="1" type="BPM_SCT_POSTCONDITION">
    <Transitions>
    <Transition to="Término"/>
    </Transitions>
    </Condition>
    </Split>
    </TransitionRestriction>
    </TransitionRestrictions>
    </Step>
    <Step id="Término" isMileStone="false" sequenceNo="2">
    <nls languageCode="ca" name="Término"/>
    <nls languageCode="cs" name="Término"/>
    <nls languageCode="da" name="Término"/>
    <nls languageCode="de" name="Término"/>
    <nls languageCode="en" name="Término"/>
    <nls languageCode="es" name="Término"/>
    <nls languageCode="fi" name="Término"/>
    <nls languageCode="fr" name="Término"/>
    <nls languageCode="hu" name="Término"/>
    <nls languageCode="it" name="Término"/>
    <nls languageCode="ja" name="Término"/>
    <nls languageCode="ko" name="Término"/>
    <nls languageCode="nl" name="Término"/>
    <nls languageCode="no" name="Término"/>
    <nls languageCode="pl" name="Término"/>
    <nls languageCode="pt" name="Término"/>
    <nls languageCode="ru" name="Término"/>
    <nls languageCode="sv" name="Término"/>
    <nls languageCode="tr" name="Término"/>
    <nls languageCode="zh" name="Término"/>
    <nls languageCode="zh_TW" name="Término"/>
    <Notifications notifyOwner="false">
    <NotifyWhen stepCompleted="false" stepInError="false" stepStarted="false"/>
    <Assignees/>
    </Notifications>
    <Operations/>
    <TransitionRestrictions>
    <TransitionRestriction>
    <Join type="BPM_JT_NONE">
    <Condition sequencNo="1" type="BPM_SCT_PRECONDITION"/>
    </Join>
    </TransitionRestriction>
    <TransitionRestriction>
    <Split type="BPM_ST_SEQUENCE">
    <Condition sequencNo="1" type="BPM_SCT_POSTCONDITION">
    <Transitions/>
    </Condition>
    </Split>
    </TransitionRestriction>
    </TransitionRestrictions>
    </Step>
    </Steps>
    <Groups/>
    <OBSAssocs complete="false"/>
    </Process>
    </Processes>
    <XOGOutput>
    <Object type="bpm_process"/>
    <Status state="SUCCESS"/>
    <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="1" updatedRecords="0"/>
    <Records/>
    </XOGOutput>
    </NikuDataBus>



  • 6.  Re: Error when transport Custom Scripts
    Best Answer

    Posted Jul 13, 2017 08:47 AM

    Hi Elias,

      I get to run this XOG successfully on the XOG Client now.

      I could not figure out why it is not working on XOG Bridge.

      I have already contacted IT ROI to try to understand the problem.

     

      Thank you for your attention.



  • 7.  Re: Error when transport Custom Scripts

    Posted Oct 26, 2017 02:06 PM

    Hi Balbi and Elias, I saw that the new release the XQ 1.5.0 resolved the issue that was reported here, and resolve this error for me, please let me know if it was successfully address in your case??