cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel vacation request

mikuc
Champ in-the-making
Champ in-the-making
Hello
I am designing a process for approving and cancelling vacation in a company.
The initiator will fill a form with date and place, after that the service task finds his supervisor and assign it to him. Then he decide to approve or reject the request, after it there are some notifications and the vacation is recorded to his personal calendar.
The same process is for cancellation of the vacation. If it is approved, then you can run a request to cancel the vacation.

But there is a situation, when an employee submit a vacation request, after that the request is pending at his supervisor and he is away or something. At the time the employee decide that he wants to cancel the vacation, but the task is still at his supervisor(so the vacation wasnt approved or rejected).
Is there any option to handle this and how? By some boundary or intermediate event?

here is the pic:
[IMG]http://i59.tinypic.com/23h6109.jpg[/IMG]


Please help
Thanks


7 REPLIES 7

smirzai
Champ on-the-rise
Champ on-the-rise
Actually I cannot see any way in BPMN so that you can cancel an already issued task.
You can delete the task by API though using TaskService.deleteTask() in a Java delegate service. But then you should check the exception if the user has selected and loaded the task but it is deleted before being submitted.

mikuc
Champ in-the-making
Champ in-the-making
Ok, but the employee should not be able to delete a task from his inbox(we are using out own bpminbox not activiti explorer)

Is there any way to trigger some event from another process? Like some interprocess communication by some signal or something like that?

tstephen
Champ on-the-rise
Champ on-the-rise
Actually BPMN signal events can do this quite nicely. Attached is a simplified version of your process focusing just on cancelling the review (files renamed).

Your own inbox tool will need to offer user interface for the user to cancel the request and send the message that will cancel the review.

I've not tried to implement this in Activiti but all the parts are supported. 

edgarjoao
Champ in-the-making
Champ in-the-making
Hi tstephen,
What would be the best way of the requestor be able to cancel the request as well

mikuc
Champ in-the-making
Champ in-the-making
that works great, thank you very much!!!

edgarjoao
Champ in-the-making
Champ in-the-making
Follow your example it does works fine. But is there a way to avoid cancel all process instances created? Because right now if you create several instances of above model you'll cancel all process once you throws signal

edgarjoao
Champ in-the-making
Champ in-the-making
To restrict the scope of the signal event, add the (non-BPMN 2.0 standard!) scope attribute to the signal event definition:
<signal id="alertSignal" name="alert" activiti:scope="processInstance"/>