cancel
Showing results for 
Search instead for 
Did you mean: 

How to skip the 'task done' button

raptus
Champ in-the-making
Champ in-the-making
Hello all!

I would ask you an important question: how can I end a workflow without pressing "task done" button?

When I click on "approve" (i.e. in the review-approve workflow) I wish the automatic ending of the task (and workflow) without pressing any button….Is it possible??

I found this method: workflow.delete() in http://wiki.alfresco.com/wiki/Workflow_JavaScript_API and I put it in my approvation script, but it makes an error when I click "approve" button:

11:22:52,149 WARN [org.alfresco.web.ui.repo.component.property.UIAssociation] Failed to find association definition for association 'bpm:assignee'

How can I correctly write the script? How can I get the automatic ending of the workflow?

Thanks in advance,

Raptus
6 REPLIES 6

raptus
Champ in-the-making
Champ in-the-making
Noone has this problem??  :cry:

buurd
Champ in-the-making
Champ in-the-making
The simple answer is: You can't.

The complicated answer: You could hack into the JSF-pages that handles the workflow for you and make some changes there so that it triggers  "task-done" without the need for pressing the button.

Perhaps you could create your own workflow and write a webscript-interface to it that behaves the way you like. The "standard ui" of Alfresco really isn't made for that kind of changes.

raptus
Champ in-the-making
Champ in-the-making
Thank you for your answer…
I thought this would be easier… maybe a next Alfresco release? :roll:


But… A last question… Where can I use that workflow-javascript-api methods??? 

What are their scopes?

Regards,

Raptus

buurd
Champ in-the-making
Champ in-the-making
From any javascript-file you like.

zaizi
Champ in-the-making
Champ in-the-making
Copy the out of the box workflow and customise it so the workflow transitions straight to end on approve / reject without the intermediate task.

raptus
Champ in-the-making
Champ in-the-making
thankyou for your answer, it works great!!  Smiley Tongue