When Defining a date field in a form, then reference the form in a step (e.x start event). the date filed can be used down the stream. if it is used by a user task as a due date and then try to deploy and run the app. the due date will be one day less the actual date that's passed by the user in the form.
Is this the default behavior in APS, what is the best practice to show the same date that being passed in the form?
What version are you using ? I am using Activiti 5.22, and I have a formProperty which is a date that is set in the startEvent which is then used as the dueDate for the following userTask and it seems to work fine.
Thanks Paul, I am using APS 1.9 Enterprise edition (activiti 5.22). did you have to set a new formProperty in start Event or did you use the reference form only.
for me I just defined new form with a date field and then the date field can be seen in the user task still showing due date offset with a day less.
e.x say the inpurt due date is Jan 20. the userTask will be due date in 9 days (Jan 19)
Maybe what I'm doing is different. I use a form in my start event, it's a dummy sales process for testing something else, which asks for customer, value etc. and 'required by' - which is a date - these are all defined as new formPropertys in the start event. My next user task is then to ship the order, and it sets the task due date to the date entered on the start event form - e.g. activiti:dueDate="${requiredBy}"
has there been any solution to this? i also found this in the activiti app community version (latest).
the dates are always less by 1 day. the timezone is also the same.
i need to do something before it starts corrupting the reports and user found about it.
I did a workaround to get over this issue-
add these 2 lines to add one more day to the input form field in render-form.js
-----------
else if (field.type === 'date' && field.value) {
//added below 2 lines
var days = field.value.getDate();
field.value.setDate(days+1);
postData.values[field.id] = field.value.toISOString().slice(0, 10);
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.