New values are not accepted after updating variable in camunda 8 operate

Dear All,

I have a BPMN flow with timer event which is set for 120 days when process starts.

But for testing perspective I dont want to wait for 120 days to verify the flow. So from camunda operate tool(from camunda cockpit from browser), I went to particular running instance and updated the variable value for timer event for next 2 mins and saved. When page is refreshed new value is shown but it seems job worker did not consider new value and timer event is not triggered.

What am I missing here?

Thanks and Kind Regards,
Harshal

Hi @Harshal_Gaikwad

So the timer event is evaluated using the variable when the token arrives at the timer. So changing the variable wont affect the running timer since it’s already been set.

In Operate you can use process instance modification to move the token past the timer. Or you can use the it to re-trigger the timer with the new variable by removing the current token and creating a new one in it’s place.

Hello @Niall ,

Thanks a lot for quick reply. :slight_smile:
I tried above solution and that looks working fine, but issue is with above changes we can only verify the timer event.

As you suggested , I have created another token/instance of the process and removed old one. But my old token/instance were having user task. When I tried to submit new user task which i have created with new token I get issue saying process instance not found as we are fetching process data based on process instance key.

Thanks and Kind Regards,
Harshal

I don’t completely understand, can you show me the model, describe what you’d expect and what happened?

Hello @Niall ,

Below is the model diagram.

as shown in the diagram, there are user task 1, user task 2 and user task 3 and all these has time event. ( all tasks should be finished in specified time). and in the end its notify.

Scenarios:

  1. Process is started, user task 1 is triggered with timer event variable with 120 days. New token is added with lets say timer event for 5 mins and old one is deleted, in such case when notify is called after 5 mins timer event, exception is thrown as process instance for which process is started already deleted.

  2. Process is started, user task 1 is completed and user task 2 is triggered.
    when new token is added, it is always added with user task 1. so as I understood, new token/ instance is a fresh instance not the copy of previous one or something.

Please let me know if more information is needed.

Hello @Niall ,

Also, is there any other way than using Operate?

Great question, i’ll look into it.

Hi @Niall ,

Do you have more information about same?

We have found below information in forum.

Thanks and Kind Regards,
Harshal

I did look into this and for your particular scenario there doesn’t seem to be a good way to update the timer after it’s set.

So i’ve created a feature request that will make it easier in the future.

1 Like

Thank you @Niall :slight_smile:

Hi @Niall

Can you share a link to the feature request?

Thanks
John

It’s internal at the moment, I’ll post the public ticket once it’s created by the dev team