SetupDeadlineStep - bluesoft-rnd/aperte-workflow-core GitHub Wiki

SetupDeadlineStep is part of Process Deadlines plugin that provides means to calculate and persist Aperte Workflow process deadlines by executing custom step logic.

Parameters

Parameter name Type Required Default value Description
notifyUsersWithLogin String False Name of the user that is going to be notify.
notifyUsersWithRole String False Name of the role that is going to be notify.
skipAssignee String False False Should the assignee be notified?(True or False)
taskName String False all outgoing process transition names Comma separated list of task names that should have their deadlines set.
templateName String False deadlineEmailTemplate The name of the template that is going to be rendered.
unit String False day Time unit symbol used to evaluate the deadline. Allowed values are day or min.
value String False Numeric value used to evaluate the deadline. Only integer values are supported.
workingDays String False False Should the number of days be used rather than units, and normal days?(True or False) Working days skip weekends

Dates

The step implementation uses several dates to create the deadline. Date value is resolved from step parameters defined in process definition

  1. If parameter name matches the date name then parameter value is used.
  2. Otherwise, if parameter with name ${dateName}Attribute is found, then the date value is going to be obtained from process instance runtime attributes. The parameter value is going to be resolved as attribute name and property using the standard property notation, e.g. myStringAttribute.lentgh. If parameter value does not contain any property than by default value property is going to be used.

Please note, that no date parsing is performed, so all parameters and attributes used should be assignable to Date reference.

Date name Required Default value Description
baseDate False current date This date is used as starting point from calculating the dueDate.
dueDate False calucated Deadline date. If not specified in parameters, it's going to be calculated using the baseDate date and step attributes.

Examples

This example shows how to use Aperte Workflow deadlines with process running on jBPM engine. Below one can see fragment of a bigger process, with DEADLINE_SETTLEMENT step:

This step uses SetupDeadlineStep, embedded inside the process definition using the node as show below:

<java auto-wire="true" cache="false" 
      class="pl.net.bluesoft.rnd.pt.ext.jbpm.JbpmStepAction" method="invoke"
      name="DEADLINE_SETTLEMENT" var="result" 
      g="780,386,197,40">
    <field name="stepName">
        <string value="SetupDeadlineStep"/>
    </field>
    <field name="params">
        <map>
            <entry>
                <key><string value="taskName"/></key>
                <value><string value="WAITING_ACCEPTED,REFILL_TRIP,REFILL_DETAILS"/></value>
            </entry>
            <entry>
                <key><string value="value"/></key>
                <value><string value="3"/></value>
            </entry>
            <entry>
                <key><string value="baseDateAttribute"/></key>
                <value><string value="ProcessInstanceTrip_START.endDate"/></value>
            </entry>
        </map>
    </field>
    <transition name="WAITING_ACCEPTED" to="WAITING_ACCEPTED" g="-11,-12"/>
</java>
⚠️ **GitHub.com Fallback** ⚠️