Hi,
I would like to write date entry to a multi-valued complex field in an automation
Unfortunately my POST request leads to errors when I use @{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)} as suggested in the API playground:
POST /nuxeo/site/automation/Document.Update HTTP/1.1
HOST: localhost:8080
x-authentication-token: xxx
x-nxrepository: default
x-nxproperties: *
x-nxvoidoperation: false
content-type: application/json+nxrequest
cookie: X-Authentication-Token=xxx
content-length: 265
{"params":{"properties":"approval:approval/approval_a_typ=2\napproval:approval/approval_date=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}","save":"true"},"input":"/default-domain/workspaces/Sample Content/Test","context":{}}
{
"entity-type": "exception"
"code": "org.nuxeo.ecm.automation.TraceException"
"status": 500
}
In case I add the date manually it works:
{"params":{"properties":"approval:approval/approval_a_typ=1\napproval:approval/approval_date=2016-09-09T11:14:42Z\napproval:approval/approval_approver=Administrator","save":"true"},"input":"/default-domain/workspaces/Sample Content/Test","context":{}}
How can I add the current date? Any help highly appreciated.
Thanks
Stefan