Expand my Community achievements bar.

Retracting task in process workflow

Avatar

Former Community Member

Hi experts,

I'm currently working on how to retracting task in specific workflow.The situation is like this:

User A initiates form then assign it to user B  (task B). User B completes (task B) then assigns to user C (task C).

In case user B forgets some details, he wants to retract the form from user C so that he can edit form and resubmit it.

What i can think of is to create a separate process and use a custom component to reset the status of this process.

From what i observe, before and after completing task B, there are changes in tb_task, tb_job_instance and tb_branch_instance (if you think there can be changes in other tables, please let me know, thank you).

I have tried to delete task C in tb_task, set task B's status from COMPLETE (100)to RUNNING(3)  and it's complete time to null. User B can see the task but after complete, it never appear in user C's task.

I realized that after task B is completed, its associated job in tb_job_instance is deleted and task C and its job are created.

Is there anyway I can create a job in tb_job_instance to link with current process, so that after user B complete the task, the form is routed to user C.

Any comment will be much appreciated,

Thank you,

Tuan Anh

5 Replies

Avatar

Level 10

I would strongly suggest not to mess with the database. For one, you application won't be supported anymore and second, there's a lot going on in the database and it'll be hard to get it right.

Is there any way you can add route from C back to B. Then you could build a custom component that force the completion of the task and follows that route to go back to B?

Jasmin

Avatar

Former Community Member

Thank you for your quick reply, Jasmin.

For your suggestion, it will be great if the retract routing is not displayed as a button when user process form. My customer wants only certain user can retract the process.

Is there any way I can achieve that?

Regards,

Tuan Anh

Avatar

Former Community Member

Hi Jasmin,

Now i'm trying to build a custom component to invoke the Retract route. Currently the task is assigned to user A.

but i don't have the password of user A. When I use Administrator account to invoke taskmanager.completeTask(204,"Retract"), I have this error:

com.adobe.idp.taskmanager.dsc.client.task.TaskPermissionException:

User: 43296024-F721-D137-5FDF-D01FF8A70682 is not assigned task: 204.  The task cannot be completed

Is there any way I can complete the task without knowing A's password ?

Regards,

Tuan Anh

Avatar

Former Community Member

Currently I add Task ACL for Administrator account and do claimTask & completeTask. I'll update the status after UAT.

Thank you,

Regards,

Tuan Anh

Avatar

Former Community Member

My final solution is use Administrator to reassign task to himself and complete the task with "Retract" route.

I also rebuild the form processing component so that it will not display "Retract" button at user view.

Problem solved.

Thank you.

Tuan Anh