How to test forceCompletion(from IAdministrationService) API in SOAP UI test tool [message #1148367] |
Mon, 21 October 2013 12:56  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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] by Moderator 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  |
Eclipse User |
|
|
|
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
- forceSuspendToDefaultPerformer (AdministrationService), followed by
- activateAndComplete (WorkflowService)
Jan
|
|
|
Powered by
FUDForum. Page generated in 0.04146 seconds