ENGINE-01009 Error while parsing process. Could not resolve function 'today'. [ deploy-error ]

Trying to assign a date value to a string variable using below expression via a script task but it is failing to deploy

${execution.setVariable(“date”,string(today()))}

ENGINE-01009 Error while parsing process. Could not resolve function ‘today’. [ deploy-error ]

Hey @Anmol_Gupta ,

Are you using an Expression or Script? Could you share the model as well?

Kind regards
Nele

Hi, @Nele

I tried with both expression and script but both failed… i am just simply trying to fetch date from the inbuilt function and putting in a form as a default value. Below is the modelTimer Events.bpmn (3.4 KB)

Hi @Anmol_Gupta ,
I think that the correct function is either now() or dateTime() to be used in an expression as per Expression Language | docs.camunda.org
So for example on the task you would have default value specified as ${now()}:
NowUsageExampleInForm

But there seems to be some kind of bug for its display in the tasklist, so neither now nor datetime work if the field type is Date.
The bug: https://jira.camunda.com/browse/CAM-10211
A workaround with string is described vaguely here: Date form field default value

Hope that helps.

2 Likes

Hi @eileen,

That helped. Thanks for sharing