What happens with process if a task is deleted

cancel
Showing results for 
Search instead for 
Did you mean: 
samueel
Active Member

What happens with process if a task is deleted

Jump to solution

What's happens with the process when we delete a task? The prior task is recovered from the history to runtime?

1 Solution

Accepted Solutions
thuynh
Established Member II

Re: What happens with process if a task is deleted

Jump to solution

Hi samueel _ ,

Thanks for explaining more your business use case. However, it is still not clear to me whether it was a BPM issue or not. I understand your workaround though. 'SetProcessDefinitionVersionCmd' is used to update process definition and migrate runtime instances to the updated model. It can solve your issue but it is certainly not meant for that purpose. 

You said:

Last month there was a unavailable system problem in our Company, then a batch process completed several tasks causing some problems to customers because  the involved persons hadn't time to correctly complete tasks.

So isn't this your batch process problem? It should have not completed tasks inappropriately? 

A UNDO procedure could restablish the previous condition once the bpmn model won't predict it.

This isn't BPM. BPM is all about understanding the process and model it in the best effective, efficient way. If your process contains unpredictable parts, then you would need to try to understand the unpredictable as much as you can and include it in the model. So far in your description, I have not yet seen a proper BPM problem statement. 

Hope I make sense,

Thong

View solution in original post

7 Replies
jearles
Established Member II

Re: What happens with process if a task is deleted

Jump to solution

Samueel_,

Can you expand a little bit on what you mean? Your question could be interpreted in several different ways. I'm happy to help if I know what you mean. 

-JEarles

samueel
Active Member

Re: What happens with process if a task is deleted

Jump to solution

In our company we are facing the UNDO problem. It seems to be a difficult problem to solve. So, we began to think some ways to solve this problem.

Once the context was exposed.

If we delete some runtime task, the execution point that process could back in time? Restoring the prior state of the process? Can you understood?

thuynh
Established Member II

Re: What happens with process if a task is deleted

Jump to solution

Hi samueel _ ,

It is very unclear what you are trying to solve. 

In our company we are facing the UNDO problem. It seems to be a difficult problem to solve

What exactly do you mean by 'UNDO'? What is your use case here and what are you hoping Activiti can do?

If we delete some runtime task, the execution point that process could back in time? Restoring the prior state of the process? Can you understood?

You can't delete a runtime task because it is part of a running process instance. You can complete a task but completing task with move the process forward. It seems that you are looking for how to move the process backward. In Activiti, once a step is completed, it's completed. If you want to implement the 'rework' scenario, you need to model it in your process definition, meaning you needs to allow the flow to flow back to previous steps. 

Hope this helps.

Thanks,

Thong

bp3‌

samueel
Active Member

Re: What happens with process if a task is deleted

Jump to solution

Hi Thong

Last month there was a unavailable system problem in our Company, then a batch process completed several tasks causing some problems to customers because  the involved persons hadn't time to correctly complete tasks.

A UNDO procedure could restablish the previous condition once the bpmn model won't predict it.

To workaround this situation we adopt the following:  there is a class "SetProcessDefinitionVersionCmd" in Activiti that change the process's definition version and we use it to solve our problem. The steps is.

  1. Re-model the process to include the backward condition and deploy to generate new version to that bpmn definition process.
  2. With the above class, change the definition version from the affected processs to new version definition.
  3. Complete the actual task and return to previous point that we included.

Some problems could be workarounded with this approach. Not for all.

Is this a good approach to this problem? What do you think about it?

thuynh
Established Member II

Re: What happens with process if a task is deleted

Jump to solution

Hi samueel _ ,

Thanks for explaining more your business use case. However, it is still not clear to me whether it was a BPM issue or not. I understand your workaround though. 'SetProcessDefinitionVersionCmd' is used to update process definition and migrate runtime instances to the updated model. It can solve your issue but it is certainly not meant for that purpose. 

You said:

Last month there was a unavailable system problem in our Company, then a batch process completed several tasks causing some problems to customers because  the involved persons hadn't time to correctly complete tasks.

So isn't this your batch process problem? It should have not completed tasks inappropriately? 

A UNDO procedure could restablish the previous condition once the bpmn model won't predict it.

This isn't BPM. BPM is all about understanding the process and model it in the best effective, efficient way. If your process contains unpredictable parts, then you would need to try to understand the unpredictable as much as you can and include it in the model. So far in your description, I have not yet seen a proper BPM problem statement. 

Hope I make sense,

Thong

samueel
Active Member

Re: What happens with process if a task is deleted

Jump to solution
So isn't this your batch process problem? It should have not completed tasks inappropriately? 

For your complete comprehension about our use case. We also understand that batch process shoudn't complete the tasks inappropriately. Our team only available some services to interact with Activiti and we don't design a bpmn model. Our module's name is "Motor" like "Engine" in english and is only a service layer to interact with Activiti. There are business teams that invoke our services and interact with activiti.


This isn't BPM. BPM is all about understanding the process and model it in the best effective, efficient way. If your process contains unpredictable parts, then you would need to try to understand the unpredictable as much as you can and include it in the model. So far in your description, I have not yet seen a proper BPM problem statement.

The batch job wasn't created by our team therefore we can't identify the most correct time and points to catch some unpredictable situations in bpmn. So, once the task was completed we need some manner to move process backward.

This class "SetProcessDefinitionVersionCmd" was a manner that we found to re-execute that task (back to future like DeLorean Smiley Happy )

jearles
Established Member II

Re: What happens with process if a task is deleted

Jump to solution

Samueel_,

If it works for you, it works for you. The reality is, that BPM is never meant to be allowed to 'rollback' as a part of a solution. BPM is meant to be an almost entirely linear (including parallel splits and rejoins) solution that is intended to be self documenting in relation to the task completion and the process at hand.
Once you allow for anyone to 'rollback' a task or series of tasks, you're removing the integrity of tracking the solution - as at that point, there is no guarantee that the events that should have been completed as the system of record would show, will actually be completed.

Glad you got something that fits your need Smiley Happy And what you're doing is probably the safest way to go about enabling a 'rollback' ability.

-JEarles