suspension not working

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2015 12:49 PM
Hi,
I want to suspension on a given condition and then restart after some event is generated. I'm calling below suspension in activiti1 (Please look into attachment for complete flow)
But it's still calling next service. I want suspend flow as soon as suspend method is called.
Output :-
8
Activity 1
Activity2
Activity3
Questions:- 1) Why flow is not suspending?
2) Each time I deploy my application (first process ID is always 8). Why this is so.
Please Help?
I want to suspension on a given condition and then restart after some event is generated. I'm calling below suspension in activiti1 (Please look into attachment for complete flow)
execution.getEngineServices().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId());
But it's still calling next service. I want suspend flow as soon as suspend method is called.
public class Activity1 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println(execution.getProcessInstanceId()); execution.getEngineServices().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId()); System.out.println("Activity 1"); }}public class Activity2 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Activity2"); }}public class Activity3 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Activity3"); }}
Output :-
8
Activity 1
Activity2
Activity3
Questions:- 1) Why flow is not suspending?
2) Each time I deploy my application (first process ID is always 8). Why this is so.
Please Help?
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2015 08:44 AM
No, suspending the process instance which you are currently executing is not supported
