Package com.groiss.timemgmt
Class PlanTimeMgmt
java.lang.Object
com.groiss.timemgmt.DefaultTimeManagementImpl
com.groiss.timemgmt.PlanTimeMgmt
- All Implemented Interfaces:
TimeManagement
Time management implementation. Sets the task duedate according to a plan.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
If something is to do when processes are archived (clean up).calculateActivityDueDate
(ActivityInstance ai, ActivityInstance prevStep) Set the activity due date.calculateProcessDueDate
(ProcessDefinition process) The process duedate is proposed, if there is a default plan for this process.void
If something is to do when process definitions are deleted (clean up).void
This method reacts on duedate changes as follows: If a plan exists, the plan is not changed, but the slack is recomputed.Returns nullvoid
void
setPlan
(ProcessInstance pi, String pt, Date offsetDate) Set a plan for the given process instancevoid
setStepDuedate
(ProcessInstance pi, String stepid, Date duedate) Set the duedate of a specific stepMethods inherited from class com.groiss.timemgmt.DefaultTimeManagementImpl
getHistoryInfo, getProcessStartInfo
-
Constructor Details
-
PlanTimeMgmt
public PlanTimeMgmt()
-
-
Method Details
-
calculateProcessDueDate
The process duedate is proposed, if there is a default plan for this process.- Specified by:
calculateProcessDueDate
in interfaceTimeManagement
- Overrides:
calculateProcessDueDate
in classDefaultTimeManagementImpl
-
calculateActivityDueDate
Set the activity due date.- Specified by:
calculateActivityDueDate
in interfaceTimeManagement
- Overrides:
calculateActivityDueDate
in classDefaultTimeManagementImpl
-
duedateChanged
This method reacts on duedate changes as follows: If a plan exists, the plan is not changed, but the slack is recomputed. If no plan exists for the instance, but a default plan computed from end exists for the process definition, a plan is created. This is useful, when the initial duedate is set.- Specified by:
duedateChanged
in interfaceTimeManagement
- Overrides:
duedateChanged
in classDefaultTimeManagementImpl
- Parameters:
ai
- activity or process instance
-
getWorklistInfo
Description copied from class:DefaultTimeManagementImpl
Returns null- Specified by:
getWorklistInfo
in interfaceTimeManagement
- Overrides:
getWorklistInfo
in classDefaultTimeManagementImpl
- Returns:
- an url or null
-
archiveProcessInstance
Description copied from interface:TimeManagement
If something is to do when processes are archived (clean up).- Specified by:
archiveProcessInstance
in interfaceTimeManagement
- Overrides:
archiveProcessInstance
in classDefaultTimeManagementImpl
-
deleteProcessDefinition
Description copied from interface:TimeManagement
If something is to do when process definitions are deleted (clean up).- Specified by:
deleteProcessDefinition
in interfaceTimeManagement
- Overrides:
deleteProcessDefinition
in classDefaultTimeManagementImpl
-
setPlan
Set a plan for the given process instance- Parameters:
pi
- the process instancept
- the id of the plan-typeoffsetDate
- the offset date, may be null. If plan is computed from end, this is the end date, otherwise the start date.
-
recomputePlan
-
setStepDuedate
Set the duedate of a specific step- Parameters:
pi
- the process instancestepid
- the id of the stepduedate
- the new due date
-