cancel
Showing results for 
Search instead for 
Did you mean: 

Auto launch Task from WDJava

Former Member
0 Kudos

Hello Experts,

I need to call complete-task api from wdj screen on click of a button.

How can I get the current task id to pass it to the api?

also on completion I need to auto launch next task immediately as it belongs to same user.

How can I achieve these both.

Please suggest if you have any solution.

Thanks,

Priya

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Hi Priya,

1: Why don't you use the usual complete event for closing the task? I don't get your idea.

2: On complete you can't open the next task since the task won't exist. BPM first need to complete the current task and then it will go on with creating the next task in your process model. Or doe's "task 2" already exist while you are in "task 1"?

Regards,

Tobias

Former Member
0 Kudos

Thank you Tobias for the reply.

I guess my approach is wrong then

Let me explain my requirement so that you can suggest me some solution -

On completion of a task1 - task2 gets created and get assigned to same user who executed task1.

As the user is same for task2, I don't want him to pick the task from UWL, somehow it should be auto launch to him(avoiding the time to go back and open task2 from UWL).

Please let me know if this is possible at all in BPM.

former_member191643
Active Contributor
0 Kudos

This is not possible through BPM.

Though the task comes from BPM, your requirement requires effort in the WDJ code.

On the click of the button which completes the task, you will need to fire a 'Complete' event(which completes the current task).

In the code for the same button, you will have to write some code to consume BPM Task API which will fetch a list of all work-items in the UWL for the logged-in user and automatically opens the next task in the list.

former_member191044
Active Contributor
0 Kudos

Why can't you let the user do everything in one task? You say he will get the next task anyway so just integrate those doings into the first task.

I'am affraid your desired solution won't be possible.

Former Member
0 Kudos

Hello Tobias,

It's a business requirement where on completion of task1 i need to insert a record into reporting data source (which cannot be done in WDJ using ReportingAPIs).

So I need to give the control back to process to do such things and get a new task2 assigned to user to resume his work.

Thanks,

Priya

junwu
Active Contributor
0 Kudos

use intermediate event, then you don't have to complete current task

Former Member
0 Kudos

Hello Jun,

thank you so much. THis solved my problem.

I was creating two task unnecessarily, this was my requirement. thank you

THanks,

Priya

Answers (1)

Answers (1)

anil_kumar259
Active Contributor
0 Kudos

You can these code to get the workitem id when you click on the task in the UWL.

String workItemID =  WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("wi_id");