Clarity

Expand all | Collapse all

Running a Process using SOAP

  • 1.  Running a Process using SOAP

    Posted Jun 21, 2010 03:47 PM
    Hi,

    I am trying to run a Process using SOAP envelope.

    I saw that the InvokeAction feature allow us to run processes and pass as parameter the object that the Process requires.

    This is my code:
    <gel:script xmlns:x="jelly:xml"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    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:core="jelly:core"
    xmlns:sql="jelly:sql"
    xmlns:xog="http://www.niku.com/xog">
    
    <gel:parameter default="***" var="XOGUsername"/>
    <gel:parameter default="yyy" secure="true" var="XOGPassword"/>
    
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>${XOGUsername}</xog:Username>
    
    
    
    
    
    
    <xog:Password>${XOGPassword}</xog:Password>
    
    
    
    
    
    </xog:Login>
    
    
    
    
    </soapenv:Body>
    
    
    
    </soapenv:Envelope>
    
    
    </soap:message>
    
    </soap:invoke>
    
    <gel:out><gel:expr select="$auth"/></gel:out>
    
    <gel:set asString="true" select="$auth/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:otherwise>
    </core:choose>
    
    <gel:out>SessionID: ${sessionID}</gel:out>
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>
    <Process xmlns="http://www.niku.com/xog/InvokeAction">>
    <code>fbdm_test_gel</code>
    <request>
    <thiSDLC_PRJ_Quest
    ID="5011660"
    NAME="ENV.1"
    CODE="SDLC001"
    ODF_PARENT_ID="5006495"
    DELL_SDLC_DESC="TEST557"/>
    
    </request>
    </Process>
    
    
    
    </soapenv:Body>
    
    
    </soapenv:Envelope>
    
    </soap:message>
    </soap:invoke>
    
    
    <gel:out><gel:expr select="$result"/></gel:out>
    <gel:out>${result}</gel:out>
    
    </gel:script>
    That code is able to log in Clarity and then fires up the Process, but the process errors out with the following message (found it in the Processes tab using the Clarity admin user:
    BPM-0513: Internal Process Engine Error. Contact your site administrator (The following object(s) are not initialized: 'thisSDLC PRJ Questions').
    I am going to try and change the master object name, since now it contains spaces in the name and this might be the cause of the issue. I will let you know if that works.

    In the meantime, has anyone done it before? Would you care to post your example?

    Thanks,

    Fabricio


  • 2.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 06:38 AM
    Is this just a typo?

    On line 54 of your code it says;

    thiSDLC_PRJ_Quest

    but your error message says;

    'thisSDLC PRJ Questions'

    (missing "s")

    ??


  • 3.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 08:23 AM
    Hi,

    I did change the name of the Master object this process uses, it is now called 'thisSDLC'.

    So here is my latest code:
    <gel:script xmlns:x="jelly:xml"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    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:core="jelly:core"
    xmlns:sql="jelly:sql"
    xmlns:xog="http://www.niku.com/xog">
    
    <gel:parameter default="xogadmin" var="XOGUsername"/>
    <gel:parameter default="Claritydev" secure="true" var="XOGPassword"/>
    
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>${XOGUsername}</xog:Username>
    
    
    
    
    
    
    <xog:Password>${XOGPassword}</xog:Password>
    
    
    
    
    
    </xog:Login>
    
    
    
    
    </soapenv:Body>
    
    
    
    </soapenv:Envelope>
    
    
    </soap:message>
    
    </soap:invoke>
    
    <gel:out><gel:expr select="$auth"/></gel:out>
    
    <gel:set asString="true" select="$auth/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:otherwise>
    </core:choose>
    
    <gel:out>SessionID: ${sessionID}</gel:out>
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>
    <Process xmlns="http://www.niku.com/xog/InvokeAction">>
    <code>fbdm_test_gel</code>
    <request>
    <thiSDLC
    ID="5011660"
    NAME="ENV.1"
    CODE="SDLC001"
    ODF_PARENT_ID="5006495"
    DELL_SDLC_DESC="TEST557"/>
    
    </request>
    </Process>
    
    
    
    </soapenv:Body>
    
    
    </soapenv:Envelope>
    
    </soap:message>
    </soap:invoke>
    
    
    <gel:out><gel:expr select="$result"/></gel:out>
    <gel:out>${result}</gel:out>
    
    </gel:script>
    I am running that script using the gel.bat file:
    gel test.xml

    Since I cannot put images here (apparently the image has to be available in the internet for this to work), I did check the Processes list in Clarity and I can see my process as Running, so the XML is starting the process.

    I got the background log files and I found this error several time for my process:
    ERROR 2010-06-22 07:04:46,448 [Action Execution Pipeline 0] bpm.engine (process_admin:14983584__74471e5a:none) Error (will retry) caused by Step Instance: com.niku.bpm.engine.objects.StepInstance@17f3d0c [Id: 6140713 Process Instance Id: 6457010 Step Id: 5002787 State: BPM_SIS_READY_TO_EXEC_ACTION Step Name: null Start Date: 2010-06-21 15:27:01.0 Expected End Date: null Percent Complete: 0.5 Warned: false Retry Count: 188 No of Pre Conditions: 1 No of Post Conditions: -1 Last Condition Eval Time: 1277152022143 Pre Condition Wait Events: null Post Condition Wait Events: null Pass Conditions: null Error Id: -1
     Process Thread: com.niku.bpm.engine.objects.ProcessThread@80fc51 [Id: 6458010 Parent Step Instance Id: -1 Join Step Instance Id: -1]
     Split Threads: null
     Join Threads:null]
    com.niku.bpm.BpmException: java.lang.NullPointerException
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:106)
    
    at com.niku.bpm.engine.rules.Pipeline.run(Pipeline.java:221)
    Caused by: java.lang.NullPointerException
    
    at com.niku.bpm.services.ProcessEngine.executeStepAction(ProcessEngine.java:111)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.processActions(ActionExecutionPipeline.java:140)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:70)
    
    ... 1 more
    As you can see, there is an error in the process execution.

    It might have something to do with the values I am putting in the <request> since I only select a few of them not all of them. I will try putting all the attribute values in there and see if it works.

    I would appreciate any insights you might have.

    Thanks,

    Fabricio


  • 4.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 08:34 AM
    You still have a typo in line #54!

    "thiSDLC" should be "thisSDLC" :blink:


  • 5.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 08:52 AM
    Hehe
    Yeap, I've fixed that. The issue remains:
    ERROR 2010-06-22 07:49:45,800 [Action Execution Pipeline 1] bpm.engine (process_admin:14983585__74471e5a:none) Error (will retry) caused by Step Instance: com.niku.bpm.engine.objects.StepInstance@f28ae7 [Id: 6140715 Process Instance Id: 6457011 Step Id: 5002787 State: BPM_SIS_READY_TO_EXEC_ACTION Step Name: null Start Date: 2010-06-22 07:45:01.0 Expected End Date: null Percent Complete: 0.5 Warned: false Retry Count: 1 No of Pre Conditions: 1 No of Post Conditions: -1 Last Condition Eval Time: 1277210701569 Pre Condition Wait Events: null Post Condition Wait Events: null Pass Conditions: null Error Id: -1
     Process Thread: com.niku.bpm.engine.objects.ProcessThread@17d5bc5 [Id: 6458011 Parent Step Instance Id: -1 Join Step Instance Id: -1]
     Split Threads: null
     Join Threads:null]
    com.niku.bpm.BpmException: java.lang.NullPointerException
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:106)
    
    at com.niku.bpm.engine.rules.Pipeline.run(Pipeline.java:221)
    Caused by: java.lang.NullPointerException
    
    at com.niku.bpm.services.ProcessEngine.executeStepAction(ProcessEngine.java:111)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.processActions(ActionExecutionPipeline.java:140)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:70)
    
    ... 1 more
    It seems to be related to the process itself, since it is saying that the "Step Name: null".

    I will double check the Process.

    Thanks,

    Fabricio


  • 6.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 09:31 AM
    I am not an expert on GEL but the line below has an extra ">" at the end.

    <Process xmlns="http://www.niku.com/xog/InvokeAction">>

    Is this correct? Also, in Clarity Application, for your process, you may want to view the Flow Chart. Just check whether the steps are connected properly.

    Thanks
    ~D


  • 7.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 09:46 AM
    Thanks, I had already corrected the double ">>" and in the process the steps are connected.


  • 8.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 09:50 AM
    Alright. So has your issue been resolved or it still remains ?


  • 9.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 10:00 AM
    Hi,

    I had also recreated the process since the previous errors seems to be related to the Process itself.

    In this new process I getting this error:
    >
    BPM-0513: Internal Process Engine Error. Contact your site administrator (The following object(s) are not initialized: 'thisSDLC2').


    I had defined the master object with this ID "thisSDLC2". I've checked the Initiated Processes and I can see the process running after I execute the test.xml file:
    <gel:script xmlns:x="jelly:xml"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    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:core="jelly:core"
    xmlns:sql="jelly:sql"
    xmlns:xog="http://www.niku.com/xog">
    
    <gel:parameter default="xogadmin" var="XOGUsername"/>
    <gel:parameter default="Claritydev" secure="true" var="XOGPassword"/>
    
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>${XOGUsername}</xog:Username>
    
    
    
    
    
    
    <xog:Password>${XOGPassword}</xog:Password>
    
    
    
    
    
    </xog:Login>
    
    
    
    
    </soapenv:Body>
    
    
    
    </soapenv:Envelope>
    
    
    </soap:message>
    
    </soap:invoke>
    
    <gel:out><gel:expr select="$auth"/></gel:out>
    
    <gel:set asString="true" select="$auth/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:otherwise>
    </core:choose>
    
    <gel:out>SessionID: ${sessionID}</gel:out>
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>
    <Process xmlns="http://www.niku.com/xog/InvokeAction">
    <code>fbdm_test_gel2</code>
    <request>
    <thisSDLC2
    code="SDLC001"
    name="ENV.1"
    partition_code="Dell_IT"
    dell_sdlc_desc="TEST444"
    dell_sdlc_phase="1"
    dell_sdlc_proc_area="4"
    dell_sdlc_id="ENV.1"
    dell_sdlc_status="4"
    id="5011660"
    odf_parent_id="5006495"
    >
    </thisSDLC2>
    </request>
    </Process>
    
    
    
    </soapenv:Body>
    
    
    </soapenv:Envelope>
    
    </soap:message>
    </soap:invoke>
    
    
    <gel:out><gel:expr select="$result"/></gel:out>
    <gel:out>${result}</gel:out>
    </gel:script>
    But, for some reason the process it is saying I have not initialized the "thisSDLC2" object, which is clearly defined in the above source code.

    I am trying to change the master object name to something different and see if the error is fixed.

    Thanks,

    Fabricio


  • 10.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 10:13 AM
    Hi everyone,

    I did change the Master object name to "thisSDLCA" and now when I run the test.xml file above (I've also changed the tag with the master object name to thisSDLCA) I am getting the following error in the background log file:
    ERROR 2010-06-22 09:05:00,636 [Action Execution Pipeline 0] bpm.engine (process_admin:14983584__74471e5a:none) Error (will retry) caused by Step Instance: com.niku.bpm.engine.objects.StepInstance@97259d [Id: 6140727 Process Instance Id: 6457015 Step Id: 5002791 State: BPM_SIS_READY_TO_EXEC_ACTION Step Name: null Start Date: 2010-06-22 09:05:00.0 Expected End Date: null Percent Complete: 0.5 Warned: false Retry Count: 0 No of Pre Conditions: 1 No of Post Conditions: -1 Last Condition Eval Time: 1277215500605 Pre Condition Wait Events: null Post Condition Wait Events: null Pass Conditions: null Error Id: -1
     Process Thread: com.niku.bpm.engine.objects.ProcessThread@1269d16 [Id: 6458015 Parent Step Instance Id: -1 Join Step Instance Id: -1]
     Split Threads: null
     Join Threads:null]
    com.niku.bpm.BpmException: java.lang.NullPointerException
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:106)
    
    at com.niku.bpm.engine.rules.Pipeline.run(Pipeline.java:221)
    Caused by: java.lang.NullPointerException
    
    at com.niku.bpm.services.ProcessEngine.executeStepAction(ProcessEngine.java:111)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.processActions(ActionExecutionPipeline.java:140)
    
    at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:70)
    
    ... 1 more
    Anyone has any idea? -_-

    Also, I am going to check if some of the values in the test.xml file is not exactly as in the table row since that might be causing the "nullpointer" if the process is not able to find the object I am referencing to.

    Thanks


  • 11.  RE: Running a Process using SOAP

    Posted Jun 22, 2010 10:29 AM
    Hi All,

    I just found out that after I update a process i need to restart the background server in order for it to work.

    I've decided to create a new process and start from scratch this piece.

    Right now, I have a process where the Master object name is "thisSDLCB".

    Here is the test.xml I am executing with the gel.bat command line:
    <gel:script xmlns:x="jelly:xml"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
    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:core="jelly:core"
    xmlns:sql="jelly:sql"
    xmlns:xog="http://www.niku.com/xog">
    
    <gel:parameter default="xogadmin" var="XOGUsername"/>
    <gel:parameter default="Claritydev" secure="true" var="XOGPassword"/>
    
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>${XOGUsername}</xog:Username>
    
    
    
    
    
    
    <xog:Password>${XOGPassword}</xog:Password>
    
    
    
    
    
    </xog:Login>
    
    
    
    
    </soapenv:Body>
    
    
    
    </soapenv:Envelope>
    
    
    </soap:message>
    
    </soap:invoke>
    
    <gel:out><gel:expr select="$auth"/></gel:out>
    
    <gel:set asString="true" select="$auth/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:otherwise>
    </core:choose>
    
    <gel:out>SessionID: ${sessionID}</gel:out>
    
    <soap:invoke endpoint="http://ausgchrwluat2:10202/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>
    <Process xmlns="http://www.niku.com/xog/InvokeAction">
    <code>fbdm_test_gel3</code>
    <request>
    <thisSDLCB
    code="SDLC001"
    name="ENV.1"
    partition_code="Dell_IT"
    dell_sdlc_desc="TEST557"
    dell_sdlc_phase="1"
    dell_sdlc_proc_area="4"
    dell_sdlc_id="ENV.1"
    dell_sdlc_status="4"
    id="5011660"
    odf_parent_id="5006495"
    >
    </thisSDLCB>
    </request>
    </Process>
    
    
    
    </soapenv:Body>
    
    
    </soapenv:Envelope>
    
    </soap:message>
    </soap:invoke>
    
    
    <gel:out><gel:expr select="$result"/></gel:out>
    <gel:out>${result}</gel:out>
    
    </gel:script>
    This is the error I can see in the process that is started with this xml file:
    BPM-0513: Internal Process Engine Error. Contact your site administrator (The following object(s) are not initialized: 'thisSDLCB').
    It seems that the BPM engine is not recognizing the object I've put inside the "<request>" tag.

    I could not find anything different in the manuals I've looked so far.

    I would appreciate any help you guys can give me.

    Thanks


  • 12.  RE: Running a Process using SOAP

    Posted Jun 25, 2010 09:41 AM
    Hi All,

    I've decided to abandon that option.

    I wanted to run a process using the InvokeAction piece of Clarity GEL script, but it is not working for me yet.

    I was able to use XOG IN inside a GEL script, which also fires up any process i have linked with the UPDATE event of an object, that attends our requirements.

    If anyone finds a solution for that, feel free to post it so others also know how to use it.

    Thanks all for your help,

    Fabricio


  • 13.  RE: Running a Process using SOAP

    Posted Jan 10, 2012 12:49 PM
      |   view attached
    Hi Fabricio. I think I'm in the middle of solving the same problem you appear to have solved. I'm at the 'just xog in an update' to try to automatically kick off a workflow as it appears you have settled on, unfortunaltey mine isn't working. I'm on Clarity 12.1, this is a custom sub object of the project object. For testing I have a real simple rename
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_customObjectInstance.xsd">
    <Header action="write" externalSource="NIKU" objectType="customObjectInstance" version="12.0"/>
    
    <customObjectInstances objectCode="osumc_project_sr">
    
    
    <instance instanceCode="PRJSR000082" objectCode="osumc_project_sr" parentInstanceCode="PRJ004732" parentObjectCode="project">
    
    
    
    <CustomInformation>
    
    
    
    <ColumnValue name="name">Test Update</ColumnValue>
    
    
    
    </CustomInformation>
    
    
    </instance>
    
    </customObjectInstances>
    </NikuDataBus>
    My object start condition is below. I've restarted the services as you've reccomended, unfortunatley my workflow isn't picking up the 'update' event from the XOG, but it'll kick off fine if I change anything in the UI.

    Anyone spot anything I'm doign wrong? Any feedback is appreciated.

    .


  • 14.  RE: Running a Process using SOAP
    Best Answer

    Posted Jan 10, 2012 05:53 PM
    Hi all - just to close the loop on this, my problem was that my xoguser didn't have the Process - Start - All permission. Kind of important if he needs to start a process via an update...


  • 15.  RE: Running a Process using SOAP

    Posted Oct 23, 2012 08:47 AM
    Hi, I have such permission but running this code I get a timeout exception:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
      <soapenv:Header>
    
    <xog:Auth>
    
    
    <xog:SessionID>556...0434416</xog:SessionID>
    
    </xog:Auth>
    </soapenv:Header>
       <soapenv:Body>
    
    
    
    <Process xmlns="http://www.niku.com/xog/InvokeAction">>
    <code>Synch_anag_cli_sf</code>
    
    </Process>
    
       </soapenv:Body>
    </soapenv:Envelope>
    I ignored the request tag because this is a processa that neither does not require any parameter nor is trigerred by any object.

    Can anybody help me?


  • 16.  RE: Running a Process using SOAP

    Posted Oct 23, 2012 09:50 AM

    fabricio.de.marchi wrote:

    Hi All,

    I've decided to abandon that option.

    I wanted to run a process using the InvokeAction piece of Clarity GEL script, but it is not working for me yet.

    I was able to use XOG IN inside a GEL script, which also fires up any process i have linked with the UPDATE event of an object, that attends our requirements.

    If anyone finds a solution for that, feel free to post it so others also know how to use it.

    Thanks all for your help,

    Fabricio
    -- Have you tried to include the InvokeAction tag into your header or within <gel:script> </gel:script> tags?
    For ex: "xmlns:tns="http://www.niku.com/xog/InvokeAction"

    Not sure if that resolves the issue.

    Regards,
    Rishi


  • 17.  RE: Running a Process using SOAP

    Posted Oct 23, 2012 11:21 AM
    I tried but it failed.
    By the way I cannot add the xmlns within the gel:script tag since it is not a gel script but a SOAP invocation (from another application).

    Any other options?


  • 18.  RE: Running a Process using SOAP

    Posted Jan 11, 2013 01:09 PM
    I asked to the support and they told to test via VPN, but it was impossible since I was developing an integration between two SAAS software.
    By the way now I am experiencing the same issue while invoking a process internally, thus it would not be a problem.
    <sql:query var="figlioResult">
    
    
    
    
      select inv.code , inv.name
    
    
    
          from inv_investments inv
    
    
    
          where inv.id = ${idfiglio}
    
    
    
    
    </sql:query>
    
    
    
    
    <core:forEach items="${figlioResult.rowsByIndex}" var="parentRow">
    
    
    
    
    
    <core:set var="figlioCode"      value="${parentRow[0]}"/>
    
    
    
    
    
    <core:set var="figlioName"      value="${parentRow[1]}" />
    
    
    
    
    
    </core:forEach>
    
    
    
    
    <gel:log> figlioCode: ${figlioCode}, figlioName: ${figlioName}</gel:log>
    
    
    
    
    
    
    
    
    
    <!--  per ogni figlio lancio il processo if -->
    
    
    
    
    <soap:invoke endpoint="${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>
    
    
    
    
    
    
    
    
    <Process xmlns="http://www.niku.com/xog/InvokeAction">
    
    
    
    
    
    
    
    
    
    <code>om_completamento_opportunita</code>
    
    
    
    
    
    
    
    
    
    <request>
    
    
    
    
    
    
    
    
    
    
    <thisProduct>
    
    
    
    
    
    
    
    
    
    
    
    code="${figlioCode}"
    
    
    
    
    
    
    
    
    
    
    
    name="${figlioName}"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    id="${idfiglio}"
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    </thisProduct>
    
    
    
    
    
    
    
    
    
    </request>
    
    
    
    
    
    
    
    
    </Process>
    
    
    
    
                </soapenv:Body>
    
    
    
    
            </soapenv:Envelope>
    
    
    
    
        </soap:message>
    
    
    
    
    </soap:invoke>
    
    
    
    
    
    
    
    
    <gel:set asString="true" select="$runresult/" var="write_status"/>                                                                                                                           
    
    
    
    
    <gel:log>write_status: ${write_status}</gel:log>
    I get this result:
     <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <ProcessResult xmlns="http://www.niku.com/xog/InvokeAction"/> </soapenv:Body> </soapenv:Envelope> 
    How it comes that it does not work? Probably this depend on the way I pass the argument, namely a Product.

    Does anybody could help me?

    thanks
    giacomo


  • 19.  RE: Running a Process using SOAP

    Posted Nov 21, 2013 07:39 AM

    Hi splogad,

     

              Is this worked ??

             Am doing the same thing but it is returning me "false" as output. process is not getting invoked.

         

         Does anybody could help me?

       thanks

     Narendar G