Clarity

  • 1.  Run Process linked to Object via Gel

    Posted May 16, 2013 10:50 AM
    Hello,

    I have read plenty of threads on this forum regarding this topic. But I can't get, how can I run process (in my case based on timesheet object) on particular timesheet. Lets say, my timesheet id is 5001000 and I have gel with this code:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.niku.com/xog/InvokeAction">
    <soap:Header>
    <tns:Auth>
    <tns:SessionID>${thisSessionId}</tns:SessionID>
    </tns:Auth>
    </soap:Header>
    <soap:Body>
    <tns:Process>
    <code>my_process_name</code>
    </tns:Process>
    </soap:Body>
    </soap:Envelope>

    I saw in other threads use of <request> tag but I don't understand it - seems to me like randon tag without sense:)

    My process is on demand, and linked with timesheet object by thisTimesheet Object Key. How can I pass timesheet id 5001000 to this code? Via request tag? How then?

    Thank you very much,
    r.


  • 2.  RE: Run Process linked to Object via Gel

    Posted May 16, 2013 11:31 AM
    Hi Roxor,

    Are you try to run your process using soapUI or similar?

    If this is the scenario, you cannot associate objects with your process because there are a ERQ opened

    Code: CLRT-62375
    Title: Allow the InvokeAction / Process web service to include an object
    instance code or ID

    Regards,
    Nico


  • 3.  RE: Run Process linked to Object via Gel

    Posted May 16, 2013 11:32 AM
    Type: Improvement

    a. What business problem will be solved by adding this new feature?

    Simply provides a way to invoke processes on object instances, that are not
    auto-start but on-demand. Like you can in the UI by going to the object
    record's Processes tab, clicking Available, and selecting / Starting a
    process there. You do not have that option currently through XOG/WSDL.

    c. Describe how the product works now.

    Currently if you want to trigger a process on an object using XOG or WSDL
    you have two methods available to you.

    Method 1 is to make the process an auto-start process on a condition, and
    in the XOG you have to XOG the record out, satisfy the condition, then XOG
    it back in. There is an increased effort to do this.

    Method 2 is to have a process that has no Primary Object, the same as the
    ones you can schedule as jobs, and then you can use the
    InvokeAction:Process web service method to call it, but this is a generic
    process and you cannot pass parameters to it.


  • 4.  RE: Run Process linked to Object via Gel

    Posted May 16, 2013 01:15 PM
    :) seems that this could be the solution!

    <Process xmlns="http://www.niku.com/xog/InvokeAction">
    <code>process_name</code>
    <request>
    <thisProject code="proj_code" name="prj_name" id="1234567" />
    </request>
    </Process>

    r.


  • 5.  RE: Run Process linked to Object via Gel

    Posted May 17, 2013 06:38 AM
    Still not working:(
    Process is simply not run via gel using my custom script. It is not clear what input parameter should be there. I was also referrering this thread 5180228
    but guys there also didn't have success.

    This is what I'm using in custom script:
    <soap:invoke endpoint="${clarity_xog_url}" var="customObjectWriteResult">
          <soap:message>
              <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.niku.com/xog/InvokeAction">
                    <soapenv:Header>
                         <inv:Auth>
                              <inv:SessionID>${thisSessionId}</inv:SessionID>
                         </inv:Auth>
                    </soapenv:Header>
                    <soapenv:Body>
                         <inv:Process>
                                <inv:code>my_process_id</inv:code>
                                <inv:request>
                                         <thisTimesheet ID="5021024" />
                                </inv:request>
                         </inv:Process>
                   </soapenv:Body>
               </soapenv:Envelope>
          </soap:message>
    </soap:invoke>
    If anybody has any idea, will be appreciated. In my opinion that thisTimesheet tag is wrong, but I have no clue what should be the right format.

    (and this thread should be probably moved to XOG/WSDL/GEL section :) )

    Thanks,
    r.


  • 6.  RE: Run Process linked to Object via Gel

    Posted May 17, 2013 03:48 PM
    Rorox,

    Try change <inv:code>my_process_id</inv:code> by <code>my_process_id</code>

    Nico


  • 7.  RE: Run Process linked to Object via Gel

    Posted May 18, 2013 04:52 PM
    Rorox,

    Why not use Job 'Execute Process' ??..

    In this point as Nico said you cant have a process with object associated

    Regards,
    Juan


  • 8.  Re: Run Process linked to Object via Gel

    Posted Feb 28, 2017 11:33 AM

    Hi. I have the same problem here.

    I'm able to call the process, but I can't pass parameters or catch the XML request fragment in the gel script.

    For my understood, the request is received by the process, because when I try to execute <gel:parse var="xmldoc"/> in the gel script,  the process stops with an error and when I runs a query over the BPM_SESSION_DATA table I can see the XML request fragment in the BLOB. So, I think that should be a way to catch this XML in gel scrip, but I'm not sure how.

    Anyone have a tip for this



  • 9.  Re: Run Process linked to Object via Gel

    Posted Feb 28, 2017 06:11 PM

    Please see my reply to your thread/question here:

    https://communities.ca.com/thread/241773420#comment-241961759