cancel
Showing results for 
Search instead for 
Did you mean: 

how to set date in alfresco workflow form

rajupingili
Champ in-the-making
Champ in-the-making
i have a requirement in workflow like,i need to display workflow attached document properties in workflow form.in which date of creation of document is there if i am trying to set that property with the fallowing code it is giving date parser exception.


//here some code to get properties of document , there am getting document properties.like that am getting created date from document properties.
var receveddate =Thu Jan 03 2013 00:00:00 UTC -08:00 (this is date format am getting )
execution.setVariable("rewf_receveddate",receveddate);

i have tried many formats.here in which format i need to set the date.

can any one please help me
1 REPLY 1

khoer52
Champ in-the-making
Champ in-the-making
Hi rajupingili!

Has this question been solved?
Now i'm facing same issue. I want to add current date on some field.
I try task listener and add script task like this.
    <userTask id="usertask1" name="Aktivasi Email" activiti:assignee="khoerrizal@gmail.com" activiti:formKey="ptiwf:aktivasiEmail">      <extensionElements>        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">          <activiti:field name="script">            <activiti:string><![CDATA[if(task.getVariableLocal('ptiwf_approval') == 'Approve') {                      execution.setVariable('ptiwf_tpApproved', true);                      } else {                      execution.setVariable('ptiwf_tpApproved', false);                      }                                            ]]></activiti:string>          </activiti:field>        </activiti:taskListener>      </extensionElements>    </userTask>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


I'm using Alfresco 5.0d.