Calling a service in a deployed savvion process template

Posted by martinz on 06-May-2011 06:59

Hi,

I deployed a process template as a web service. Now, I am able to create an instance by calling connect() and START() on the webservice, e.g.:

session = savvionService.connect("ebms", "*********")

instance = savvionService.start("ebms", "*********", "HandleCallProcess", "Medium")

instance then contains the value "HandleCall#169".

In the bpmportal I can now see a new task for Instance "HandleCall (169)" called "UpdateSynergy". Instead of dealing with this task in de portal, I want to execute it programmatically. My webservice offers a service: UPDATESYNERGY. As parameters it expects all the dataslots for this activity, as well as a piName and a wiName. What do I put in the piName and the wiName? More generally speaking: what is the correct way to communicatie with SBM via web services?

Thanks,

Martin Zantingh

All Replies

Posted by DannyGeerts on 06-May-2011 07:00

Wegens vakantie zal ik maandag 9 mei weer aanwezig zijn.

--

Met vriendelijke groet,

Danny Geerts

Consultant BPM

Posted by ramkumar7800 on 07-May-2011 05:17

Hi Martin,

The SBM can be connected with webservice either with help of web service adapter or with help of helper class that is called by webservices class.

The webservices classes can be generated with help of wsdl provided.

Regards,

Ram Sharma

Posted by sjejurkar on 09-May-2011 13:17

If I understand correctly, you want to complete a workstep from an external system by calling a web service.When you publish a process template as a web service, each workstep will be a web service that you should be able to invoke it just as any other SOAP web service.

The piName in your example will be "HandleCall#169" but I am not sure about wiName. Try using the string that appears in the "Task" column on "My Tasks" page.

Sameer

Posted by mkollipara on 16-Jun-2011 00:15

Steps to be followed to expose a process template as a service.

1. Deploy the Process template on to the server and click publish as a service.

2. Add a wsdd entry in the server-config.wsdd file with the same name as the Process Template (Case Sensitive) and we need to add the bean mapping of all therefered object types whcih we are exposing in the Process Flow

3. Access the service as like this Ex Your service name is SampleService

http:// Name>:/sbm/services/SampleService?wsdl

EX. Consider your UI is other than Java like Microsoft Product (ASP.Net)

1.First we need to add a Service Reference to the Service URL which is exposed

2. Create a Instance of the Service Reference.

3. Access the methods of the Service Reference to complete the Activities.

(Instance Methods are equivalent to Tasks in the Process Flow)

4. To Complete a Task we need to call the particular method by passing the parameters.

Ex: I have a flow with contains an Activity named "Activity 1" which exposes a dataslot EmpNo

To Complete this we need to call some thing like this

ServiceInstance.Activity 1(EmpNo,SessionID,PIName,WIName);

PIName = ProcessTemplateName#ProcessInstanceID

WIName = ProcessTemplateName#ProcessInstanceID::Activity Name

For Ex if you are completing Task1 and  your WIName will look like this

WIName = ProcessTemplateName#ProcessInstanceID::Task1

This thread is closed