cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow - pooled actors: execute code on 'Take Ownerhip'

grimme
Champ in-the-making
Champ in-the-making
Hi all,

I'm exploring the possibilities of working with pooled actors in Alfresco 2.0.
I was wondering if it would be possible to execute a piece of code when somebody pushes the 'Take Ownership' button.

In my case, I want to change the status of the file (attached to the workflow) from 'in queue' to 'assigned' the moment one pushes the Take Ownership button.

Preferably, I would like to define a piece of javascript in the xml definition of the workflow since this workflow definition already contains all other status changes and permission changes that are being applied during execution of the workflow.

Anybody any suggestions?

Grimme
3 REPLIES 3

davidc
Star Contributor
Star Contributor
You might have some luck with the task-assign event…

http://docs.jboss.com/jbpm/v3/userguide/taskmanagement.html#taskevents

It should get fired when "take ownership" is performed, so you can hook in some Alfresco JavaScript to perform the status change.

grimme
Champ in-the-making
Champ in-the-making
David,

thanks for your suggestion: the event is indeed triggered when (re)assigning a task.

Grimme

anik
Champ in-the-making
Champ in-the-making
Hi,

The Problem with the task assign event as discussed above is that..
The event get fired everytime i click
1)Save Change Button
2)Take Ownership Button
3) Return to pool Button

The First and Second button are actually displayed on same screen(Manage task dialog)..

So the problem is with first two button..
How can i know which button is clicked ie save button or task ownership button???

Please help me to resolve this.

Thanks
Anik