Listener for "Set Due Date" & "Set Follow Up Date"

Good day,

I’m trying to setup a class for TaskListener that would listen to changes in “Follow Up Date” and “Due Date” changes.
As I see Camunda Modeler supports only these event types for listeners: create, assignment, complete & delete.

When I implement Task Listener interface, I can see that I have access to delegateTask.getDueDate() value, but there is no listener for that in the modeler.

When I change the due date in Camunda Task List, I can only see the new value after I do an event type that is supported in the modeler, f.e. change assignee.

Is there some other solution for this, or am I missing something?

Thanks and kind regards,
Deniss

Hi Deniss,

Your observation is correct. I’m afraid there is no possiblity to hook custom code into a due date update. What’s the use case behind that? Perhaps we can find another way to implement it.

Cheers,
Thorben

Hi Thorben,

Many thanks for your quick reply! The use case is quite simple. I have a request to make all the data from history tab to appear inside the embedded form and then I have to remove the history tab :slightly_smiling:

I was thinking of investigating how the contents of the history tab are displayed and perhaps moving that logic to my embedded form.

Any hints or guides would be greatly appreciated!

Kind regards,
Deniss

Hi Deniss,

I am not very familiar with embedded forms, perhaps @sebastian.stamm can provide better insights there, but can’t you just make a history query? When displaying the history tab, tasklist makes a query like http://localhost:8080/camunda/api/engine/engine/default/history/user-operation?taskId={idOfTask} that returns the list of all user operations that manipulated the task.

Cheers,
Thorben

Thanks for this. I will give it a try!

I also inspected a bit from where this history data is coming in the frontend and it looks like $scope has an “event” object.

I will see if I can get data from there and maybe display it inside the form. But if there are other solutions and your colleague can advise, I am more than happy to hear :slightly_smiling:

Kind regards,
Deniss

Hello,

It is easier to get this kind of data via http://localhost:8080/camunda/api/engine/engine/default/history/user-operation?processInstanceId={processInstanceId}

Then an object can be created from this JSON data and displayed anywhere in the form.

Thanks!

Kind regards,
Deniss

1 Like