Timer set problem

In test BPMN I’m trying to set value of timer

When I start process an incident occurres with message:
Expected result of the expression ‘date(“2023-11-29”)+duration(“P12H”)’ to be one of ‘[DATE_TIME, STRING]’, but was ‘NULL’

Does anybody know what am I doing wrong?

1 Like

Hello my friend! Welcome to the forum!

You are trying to add 12 hours to a date for which you have not specified the time…
The question is… you want to add 12 hours from what time of day 2023-29-11??

Try doing it this way and see if it works:

date("2023-11-29T00:00:00")+duration("PT12H")

I’m not sure as I don’t have much knowledge of Camunda 8, but I hope this helps.

William Robert Alves

Unfortunately this is not solution
date(“2023-11-29T00:00:00”) is not valid it returns null. Valid formula is: date and time(“2023-11-29T00:00:00”)+duration(“PT12H”)

But this is not what I need. I need to combine date and duration. It should be possible accortidng to documentation Temporal expressions | Camunda 8 Docs but it returns null.

haaaaa…

So I don’t understand what you need, sorry… give me an example of the return you need, please, to try to help you.

William Robert Alves

Hey there, editing this message because someone on our end found the issue.

There is a typo in the screenshot and text, it should be PT12H not P12H.

Alternatively, you can just use date and time("2019-10-01T12:00:00Z") or any other valid ISO 8601 format and define it as a single expression. Hovering over the values gives you some additional help on how to do that.

grafik

Hope that helps.