Clarity

 View Only
Expand all | Collapse all

InvokeAction - Process WSDL

  • 1.  InvokeAction - Process WSDL

    Posted Jan 18, 2012 01:46 PM
    We have been using several of the WSDL's (Query and Object) to integrate some of our custom web development with Clarity. These have been working perfectly.

    However, when trying to use the InvokeAction - Process WSDL, we are simply getting a ReturnValue of False - no other debugging information. Needless to say, the process in Clarity is not being started. I've tried with multiple custom processes even very simple one's with no difference.

    Here is the WSDL being executed and as you can see it's very simple.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://www.niku.com/xog/InvokeAction">
    <soapenv:Header>
    <inv:Auth>
    <inv:Username>#####</inv:Username>
    <inv:Password>#####</inv:Password>
    </inv:Auth>
    </soapenv:Header>
    <soapenv:Body>
    <inv:Process>
    <inv:code>mit_check_timeslicing</inv:code>
    </inv:Process>
    </soapenv:Body>
    </soapenv:Envelope>

    Here is the output:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <SessionID xmlns="http://www.niku.com/xog">79777672__2D1B6723_134EDB3F3F4_48DF</SessionID>
    <ProcessResult xmlns="http://www.niku.com/xog/InvokeAction">
    <returnValue>false</returnValue>
    </ProcessResult>
    </soapenv:Body>
    </soapenv:Envelope>

    This is being executed with an admin userid and password so privileges should not be the issue. We are successfully connecting (see the SessionID)..

    Thanks in advance..


  • 2.  RE: InvokeAction - Process WSDL
    Best Answer

    Posted Jan 19, 2012 05:22 AM

    rsimmers wrote:

    This is being executed with an admin userid and password so privileges should not be the issue.
    Your "admin" user definitely (rather than "should") has the relevant "Process-Run" rights?

    --

    The XML looks OK to me (but I am only visually comparing it to the GEL example in this thread; 91276775 )

    There are some other threads around concerning calling the invoke action from non-GEL clients; perhaps there are some clues in those threads?


  • 3.  RE: InvokeAction - Process WSDL

    Posted Jan 27, 2012 08:24 AM
    Hi,

    I'm not able to view the link so my apologies for any duplication.

    Today, for objects associated with a process (projects, etc.), you need to do a change to the object instance itself so that you satisfy the criteria of the process' start conditions if you want it to start (i.e. you'd do a XOG / web service write of the object instance to trigger this, not use the invoke process call).

    Alternatively, for processes with no primary object associated, this can be 'invoked' through the web service calls (without supplying parameters like an instance ID). In essence, the same processes that you are able to schedule as jobs in Clarity.

    There is an Enhancement Request currently open (not implemented at this time) to add the extra capability desired:

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

    Kind regards,
    Nick

    Nick Darlington
    CA
    Principal Support Engineer


  • 4.  RE: InvokeAction - Process WSDL

    Posted Dec 13, 2012 05:22 PM
    Hi Nick
    Could you please share the link to CLRT-62375 in the support site?
    I'd like to take a look at the details on it.

    Thank you man!

    Regards


  • 5.  RE: InvokeAction - Process WSDL

    Posted Dec 21, 2012 02:54 PM
    The details were just requesting a change to the XML so that in a typical request body like this:

    <soap:Body>
    <tns:Process>
    <code>my_process</code>
    <request />
    </tns:Process>
    </soap:Body>

    You would also be able to indicate an object's instance to run the process against (assuming the process had a primary object associated with it) by putting something like this, as a suggested implementation:

    <soap:Body>
    <tns:Process>
    <code>my_process</code>
    <instance>my_project</instance>
    <request />
    </tns:Process>
    </soap:Body>


  • 6.  RE: InvokeAction - Process WSDL

    Posted Feb 12, 2013 09:31 AM
    Hello Nick,

    Has this enhancement been implemented ?

    I have similar requirement to invoke a process using Process WSDL.


    Thanks,
    Adersh Ram


  • 7.  RE: InvokeAction - Process WSDL

    Posted Feb 12, 2013 10:34 AM
    This enhancement is still open currently, not implemented, so the workarounds suggested above will still need to be used at this time.


  • 8.  RE: InvokeAction - Process WSDL

    Posted Feb 12, 2013 01:28 PM
    Thanks Nick.


    I am working on Clarity .Net integration part. I need to invoke a Clarity Job from .Net application. Is that possible ?

    Please help me !!

    Thanks,
    Adersh Ram


  • 9.  RE: InvokeAction - Process WSDL

    Posted Feb 12, 2013 02:11 PM
    Yes, I think you'll find this is one of the described approaches for an integration process in the documentation. An action you can design into your process is to run a job. You can then invoke this process via a web service call.

    .Net libraries can do this, refer to the http://yourclarityserver:port/niku/InvokeAction/Process address (substituting the hostname and port for your own) to get the web service definition absorbed into your development code as proxy classes / methods.


  • 10.  RE: InvokeAction - Process WSDL

    Posted Feb 13, 2013 09:30 AM
    On adding a Web Reference to "Process" web service, i get the error
    The document at the url http://192.163.0.159:2843/niku/wsdl/InvokeAction/Process was not recognized as a known document type.The error message from each known type may help you fix the problem:
    - Report from 'DISCO Document' is 'Discovery document at the URL http://192.163.0.159:2843/niku/wsdl/Inv

    There are no issues when referencing the other web services like (like objects, queries etc).

    Please help me..


  • 11.  RE: InvokeAction - Process WSDL

    Posted Feb 13, 2013 10:05 AM
    If you examine the full error message I expect it would say something like this:
    [...]
    The document at the url http://server/niku/wsdl/InvokeAction/Process was not recognized as a known document type.
    The error message from each known type may help you fix the problem:
    - Report from 'XML Schema' is 'The root element of a W3C XML Schema should be <schema> and its namespace should be '_http://www.w3.org/2001/XMLSchema'.'.
    - Report from 'DISCO Document' is 'Discovery document at the URL http://server/niku/wsdl/InvokeAction/Process could not be found.'.
    - The document format is not recognized.
    - Report from 'WSDL Document' is 'There is an error in XML document (25, 12).'.
    - The element was not expected in this context: <xsd:element xmlns:xsd='_http://www.w3.org/2001/XMLSchema'&gt;..&lt;/xsd:element>. Expected elements: http://www.w3.org/2001/XMLSchema:annotation, http://www.w3.org/2001/XMLSchema:complexContent, http://www.w3.org/2001/XMLSchema impleContent, http://www.w3.org/2001/XMLSchema:group, http://www.w3.org/2001/XMLSchema equence, http://www.w3.org/2001/XMLSchema:choice, http://www.w3.org/2001/XMLSchema:all, http://www.w3.org/2001/XMLSchema:attribute, http://www.w3.org/2001/XMLSchema:attributeGroup, http://www.w3.org/2001/XMLSchema:anyAttribute.
    Metadata contains a reference that cannot be resolved: 'http://server/niku/wsdl/InvokeAction/Process'.
    The remote server returned an unexpected response: (405) HTTP method POST is not supported by this URL.
    The remote server returned an error: (405) Method Not Allowed.
    [...]

    In this instance, please check this post for the change that needs to be made: 98177361

    This is reported as a defect that needs to be corrected, having the ID / subject of: CLRT-64504 When adding a Service Reference in Visual Studio 2010 with the URL https://server/niku/wsdl/InvokeAction/Process, it errors out

    If you want to raise a support issue to indicate you have encountered the defect please include that reference.

    The workaround you would be provided (to implement the same solution mentioned in the other communities post above) would be this:
    File name: xog.xml
    Path: \...\META-INF\xog\wmd\xog.xml

    [...]
    <response>
    <xsd:element name="returnValue" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
    </response>
    [...]

    It should be:

    [...]
    <response>
    <xsd:sequence>
    <xsd:element name="returnValue" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
    </xsd:sequence>
    </response>
    [...]

    -> modify xog.xml file
    -> restart app service


  • 12.  RE: InvokeAction - Process WSDL

    Posted Feb 13, 2013 12:08 PM
    Hey Nick.... you are the man. :smile

    I did the changes in that file and It Worked !!!!!

    Thanks,
    Adersh Ram


  • 13.  RE: InvokeAction - Process WSDL

    Posted Feb 14, 2013 09:09 AM
    Can you please provide a sample XML request file ?

    Thanks,
    Adersh Ram


  • 14.  RE: InvokeAction - Process WSDL

    Posted Mar 19, 2014 10:25 AM

    Hi Nick,

    i am trying to use the InvokeAction Process and found that that schema is wrong:

    This was tested in SOAPUI 4.6.4:

    This is the SOAP result from the InvokeAction Process WDSL

       <soapenv:Header>
          <inv:Auth>
             <!--Optional:-->
             <inv:SessionID>?</inv:SessionID>
             <!--Optional:-->
             <inv:TenantID>?</inv:TenantID>
             <!--Optional:-->
             <inv:Username>?</inv:Username>
             <!--Optional:-->
             <inv:Password>?</inv:Password>
          </inv:Auth>
       </soapenv:Header>
       <soapenv:Body>
          <inv:Process>
             <inv:code>?</inv:code>
             <inv:request>
                <!--You may enter ANY elements at this point-->
             </inv:request>
          </inv:Process>
       </soapenv:Body>
    </soapenv:Envelope>

     

    Using the inv: prefix does not work, altough Clarity logs in an return a session.

    Now this works:

       <soapenv:Header>
          <inv:Auth>
             <!--Optional:-->
             <inv:SessionID>?</inv:SessionID>
             <!--Optional:-->
             <inv:TenantID>?</inv:TenantID>
             <!--Optional:-->
             <inv:Username>?</inv:Username>
             <!--Optional:-->
             <inv:Password>?</inv:Password>
          </inv:Auth>
       </soapenv:Header>
       <soapenv:Body>
          <inv:Process>
             <code>?</code>
             <request>
                <!--You may enter ANY elements at this point-->
             </request>
          </inv:Process>
       </soapenv:Body>
    </soapenv:Envelope>
     
    We need urgent that to be corrected and an workaround to make it work now. 
     
    Can you help?
     
    Regards