I am asked to set a default workflowDueDate to the workflow I implement: in 10 work day after the current date.
I already have a script to calculate this default date, my issue is to set this date.
I saw 2 places where it can be down, but I need a technical advise:
1) the first place a saw I can do it is the model.xml, in my custom type of my startTask:
but in this case I don't know how to call my script (and even if it's possible) in the model.xml
2) the second place I can imagine set this default date, will be in the bpmn:
<process id="id" name="name" isExecutable="true">
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<startEvent id="start" activiti:formKey="ddg:submitGroupsReviewTask"></startEvent>
<sequenceFlow id="flow1" .....
The issue here is:
- if a call my script in the <extensionElements> of the process, it's resolved after the startTask is done, so I don't have my default dueDate set when I initialise the workflow (it will rather overwrite the date set by the user).
- it the same if I add the script call in the <extensionElements> in the <startEvent>.
Did some one know how set a default workflowDueDate calculated by a script?