Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » Delegate Activity with Web Service API. Generic approach to find Web Service messages(Delegate activity with Web Service API)
Delegate Activity with Web Service API. Generic approach to find Web Service messages [message #742697] Thu, 20 October 2011 14:37 Go to next message
Vikram Kodak is currently offline Vikram Kodak
Messages: 57
Registered: October 2011
Member
We are looking for an example of SOAP call for Workflow web service to delegate an activity to a user.

Tried the following :
<soapenv:Envelope xmlns:soapenv="[url]http://schemas.xmlsoap.org/soap/envelope/[/url]" xmlns:api="[url]http://infinity.com/bpm/ws/v2009a/api[/url]" xmlns:query="[url]http://infinity.com/bpm/ws/v2009a/api/query[/url]">
   <soapenv:Header/>
   <soapenv:Body>
      <api:delegateActivity>
         <api:activityOid>30</api:activityOid>
         <api:participant/>
      </api:delegateActivity>
   </soapenv:Body>
</soapenv:Envelope>


Got the following exception:
<S:Envelope xmlns:S="[url]http://schemas.xmlsoap.org/soap/envelope/[/url]">
   <S:Body>
      <S:Fault xmlns:ns4="[url]http://www.w3.org/2003/05/soap-envelope[/url]">
         <faultcode>S:Server</faultcode>
         <faultstring>[b]null is not a valid argument for ParticipantInfoBaseXto[/b]</faultstring>
         <detail>
            <bpmFault:bpmFault xmlns:bpmFault="[url]http://infinity.com/bpm/ws/v2009a/api[/url]" xmlns="[url]http://infinity.com/bpm/ws/v2009a/api[/url]" xmlns:ns2="[url]http://infinity.com/bpm/ws/v2009a/api/query[/url]">
               <faultCode>[b]PublicException[/b]</faultCode>
            </bpmFault:bpmFault>
            <ns2:exception class="com.infinity.bpm.rt.api.ws.BpmFault" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false" xmlns:ns2="[url]http://jax-ws.dev.java.net/[/url]">
               <message>null is not a valid argument for ParticipantInfoBaseXto</message>

[Updated on: Fri, 21 October 2011 00:15]

Report message to a moderator

Re: Delegate Activity with Web Service API. Generic approach to find Web Service messages [message #742702 is a reply to message #742697] Thu, 20 October 2011 14:44 Go to previous message
Vikram Kodak is currently offline Vikram Kodak
Messages: 57
Registered: October 2011
Member
To delegate activity oid 1 to motu (i.e. userOid 1) the correct SOAP UI message to send is:
<soapenv:Envelope
                xmlns:soapenv="[url]http://schemas.xmlsoap.org/soap/envelope/[/url]">
   <soapenv:Header/>
   <soapenv:Body>
      <delegateActivity
                xmlns="[url]http://infinity.com/bpm/ws/v2009a/api[/url]"
                xmlns:ns2="[url]http://infinity.com/bpm/ws/v2009a/api[/url]">
         <activityOid>1</activityOid>
         <participant
                xsi:type="UserInfo"
                xmlns:xsi="[url]http://www.w3.org/2001/XMLSchema-instance[/url]">
            <oid>1</oid>
         </participant>
      </delegateActivity>
   </soapenv:Body>
</soapenv:Envelope>

The key here is to specify xsi:type, which can be UserInfo, ParticipantInfo. Your initial request did not contain enough information to delegate:
<participant/> is a placeholder for additional information. Stardust provides a range of participant subclasses that can be inserted here.
search in Eclipse for Web Service API, will get result : Infinity Web Services API.

Alternatively you can refer the online Stardust product documentation

ActivityInstanceXto delegateActivity(long activityOid, ParticipantInfoBaseXto participant)
You can add participant for a User (e.g. motu), or a Role (e.g. Administrator) , or just the default participant. So if you want to delegate to a specific User the next question is, what XML should I use?

Types for ALL Web Service operations are specified in
<Infinity Dynamic Project>/ipp-portal/WEB-INF/wsdl/InfinityBpmService.xsd>

Browse this xsd in Eclipse and you will find ParticipantInfoBase and UserInfo - you should also note if class inheritance mandates additional parameters

I've just described a generic method for locating the correct xml payload for an Stardust WS API call via SOAP.

[Updated on: Fri, 21 October 2011 00:15]

Report message to a moderator

Previous Topic:Lock wait timeout when synchronizing user session to disk
Next Topic:Login not working for specific Roles
Goto Forum:
  


Current Time: Wed Jul 23 10:00:22 EDT 2014

Powered by FUDForum. Page generated in 0.49561 seconds