How to evaluate "now" in a JUEL expression

I’d like to capture a timestamp in my multi-instance variable aggregation. I’ve tried various approaches, but keep getting Cause: org.flowable.common.engine.api.FlowableException: Unknown property used in expression: ${now}

    <subProcess id="forEachOwner" name="For Each Owner">
      <multiInstanceLoopCharacteristics flowable:collection="${ownerIds}" flowable:elementVariable="assignee">
        <extensionElements>
          <flowable:variableAggregation target="approvals" createOverviewVariable="true">
            <variable source="assignee" target="approverId"></variable>
            <variable sourceExpression="${now}" target="approvalTime"></variable>
          </flowable:variableAggregation>
        </extensionElements>
      </multiInstanceLoopCharacteristics>
      ...
    </subProcess>

Here’s what else I’ve tried:

Seems like a simple thing to do. Forgive me for the newbie question, but I am a Flowable newbie.

JUEL doesn’t include any functions like this out of the box. The Enterprise version flwTimeUtils functions are implemented as a bean and therefore exposed to the expression engine.
You have a couple of options.

  1. Create your own bean to return the current date/time in the format of your choosing.
  2. Precede the task where you need “now” with a script task to declare “now” using Groovy or Javascript
  3. Use a execution or task listener to set a variable on the create or assign event.

An example of 3. is below using a Script Task Listener on the “assign” event.

<userTask id="formTask1" name="Check It" flowable:assignee="${initiator}" flowable:formFieldValidation="false">
  <extensionElements>
    <flowable:taskListener event="assignment" class="org.flowable.engine.impl.bpmn.listener.ScriptTaskListener">
      <flowable:field name="language">
        <flowable:string><![CDATA[javascript]]></flowable:string>
      </flowable:field>
      <flowable:field name="script">
        <flowable:string><![CDATA[var theDate = new Date();task.setVariable("now2", theDate.toDateString());]]></flowable:string>
      </flowable:field>
    </flowable:taskListener>
    <flowable:task-candidates-type><![CDATA[all]]></flowable:task-candidates-type>
    <design:stencilid><![CDATA[FormTask]]></design:stencilid>
    <design:stencilsuperid><![CDATA[Task]]></design:stencilsuperid>
  </extensionElements>
</userTask>

Hope this helps.
Greg