Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » How to test forceCompletion(from IAdministrationService) API in SOAP UI test tool (How to test forceCompletion API from IAdministrationService)
How to test forceCompletion(from IAdministrationService) API in SOAP UI test tool [message #1148367] Mon, 21 October 2013 12:56 Go to next message
Periyasamy Ayyakannu is currently offline Periyasamy AyyakannuFriend
Messages: 1
Registered: October 2013
Junior Member
I have created "SupportCaseManagement" from Stardust example
List of activity
----------------
Init Data (application)
Enter data(manual)
Analysis to solve (manual)
Deliver Patch (manual)
Notify Customer (application)


The forceCompletion API only support non-iterative activity.

from this example how test this API.

I think "init data" is non interative activity but that activity completed once the process is started

All the non- iterative activity triggred immediatly right?
then How to simulate?
Please correct me if i am wrong
Thanks
Periyasamy
Re: How to test forceCompletion(from IAdministrationService) API in SOAP UI test tool [message #1159001 is a reply to message #1148367] Mon, 28 October 2013 08:27 Go to previous messageGo to next message
Vikash Pandey is currently offline Vikash PandeyFriend
Messages: 12
Registered: October 2011
Junior Member
Periyasamy,
To simulate the situation please edit the xpdl and mark "Init Data" activity as Hibernated Initially and then use this code to force complete it:

Map m = new HashMap();
m.put("Name", "Vikash");
adminService.forceCompletion(12, m);

the first parameter is the ActivityInstanceOID and 2nd parameter is the data that this activity is suppose to write as OUT Data.

you can get adminService as:
ServiceFactory serviceFactory;
serviceFactory = ServiceFactoryLocator.get("motu", "motu");
// Get the service instances

adminService = serviceFactory.getAdministrationService();

Please note:
The method AdministrationService.forceCompletion is restricted to the Administrator by the means of the activity.performActivity permission, which is fixed and cannot be changed by the modeler.

If the current user does not qualify as an Administrator, an AccessForbiddenException will be thrown.


forceCompletion()
Possible states for forceCompletion() are:

non-interactive activity state before:
application
hibernated
state after:
completed


This method raises the below exception if you try to use it against an interactive activity -
org.eclipse.stardust.engine.api.runtime.IllegalOperationException: BPMRT03115 - The activity instance with OID 5 cannot be forced to completion because it is interactive.

[Updated on: Mon, 28 October 2013 08:40]

Report message to a moderator

Re: How to test forceCompletion(from IAdministrationService) API in SOAP UI test tool [message #1239627 is a reply to message #1159001] Tue, 04 February 2014 16:22 Go to previous message
Jan Hendrik Scheufen is currently offline Jan Hendrik ScheufenFriend
Messages: 65
Registered: October 2011
Member

Some additional input:

The forceCompletion(...) method was never meant to be used for interactive activities due to the engine requiring a different "contextId" for manual activities. A request is being considered to change the behavior or provide new API to cover forceful completion of interactive activities as well.

For now a workaround consists of a two-step approach

  1. forceSuspendToDefaultPerformer (AdministrationService), followed by
  2. activateAndComplete (WorkflowService)


Jan
Previous Topic:Issues while using Web Service Application in Stardust1.1.0
Next Topic:Unable to send email
Goto Forum:
  


Current Time: Sat Dec 20 19:38:50 GMT 2014

Powered by FUDForum. Page generated in 0.01836 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software