Restart the workflow from the desired step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 03:17 AM
Assume i have a workflow
Start -> Task 1 -> Task 2 -> Task 3 -> End
We should not change the Workflow Template.
Now i am in the middle of execution of Task 2. User from GUI will choose restart from Task 1.
When Task 2 completes and during the start of Task 3, i should check whether user has told to restart.
If yes, i need to go back to Task 1 and again start the execution from Task 1.
I shouldn't execute Task 3
Is such scenarios can be handled in Java ?
Task could be of any kind (Service Task/User Task) which ever you suggest for our business use case. I will use that.
But we need to achieve this scenario.
Any idea ?
Regards,
Chandan
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 08:23 AM
Just set activityId in the execution to the desired one. (You have to know what you are doing - activiti can create several executions for one process instance)
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 10:55 AM
Assume i am using User Task in all the cases.
Can you just provide me the code snippet.
1. How to set ActivityID
2. How will i know the Task 1 ActivitiID when i am in the Task 3 execution?
public void notify(DelegateTask delegateTask) {
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 02:44 AM
How to set ActivityIDorg.activiti.engine.impl.persistence.entity.ExecutionEntity#setActivity
How will i know the Task 1 ActivitiID when i am in the Task 3 execution?Parse definition.
Regards
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 04:57 AM
In activiti community edition, Are you parsing the XML to execute flows ?
If yes, please provide me the classname ? Also, if i can reuse the same for customization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2016 11:02 PM
@Override
public void notify(DelegateTask delegateTask) {
DelegateExecution execution = delegateTask.getExecution();
EngineServices engineServices = execution.getEngineServices();
TaskService taskService = engineServices.getTaskService();
String userCommand=execution.getVariable("Command").toString();
if(userCommand.equalsIgnoreCase("STOP")){
System.out.println("User has issued the Stop command and I will not execute the further process:::::::"+userCommand);
ExecutionEntity executionEntity=new ExecutionEntity(); // Is it the right way of using ExecutionEntity
executionEntity.setActivity(activity); // from where i will get the value of activity ?
taskService.complete(delegateTask.getId());
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2016 03:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2016 03:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2016 05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2016 12:57 AM
nursultan.sadyk1995@gmail.com