public class TaskActionsImpl extends java.lang.Object implements TaskActions
TaskActions
.Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
kManual
The name of the manual workflow process definition.
|
protected static java.lang.String |
kManualCase
The name of the manual case workflow process definition.
|
protected static java.lang.String |
kManualParticipant
The name of the manual participant workflow process definition.
|
protected static java.lang.String |
kManualParticipantCase
The name of the manual participant case workflow process definition.
|
protected int |
kSixty
A constant for sixty.
|
protected int |
kZero
A constant for zero.
|
Constructor and Description |
---|
TaskActionsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addComment(long taskID,
java.lang.String comment)
Adds a comment to a task by inserting a record into the task history
table.
|
void |
close(long taskID)
Closes the task by raising the
TASK.CLOSED event. |
void |
create(java.lang.String subject,
java.lang.String priority,
java.lang.String assignedTo,
java.lang.String assigneeType,
curam.util.type.DateTime deadlineDateTime,
long participantRoleID,
java.lang.String participantType,
long caseID,
boolean addToMyTasksInd,
java.lang.String comment)
Creates a new task by enacting a workflow process.
|
void |
defer(long taskID,
curam.util.type.Date restartDate,
java.lang.String comment,
int versionNo)
Defers a task until a later date.
|
void |
forward(long taskID,
java.lang.String forwardToID,
java.lang.String forwardToType,
java.lang.String comment,
int versionNo)
Forwards a task to a job, position, organization unit, user, work queue
or allocation target.
|
void |
getTask(long taskID,
java.lang.String comment,
int versionNo)
Adds the task to the user's
My Tasks list. |
void |
makeAvailable(long taskID,
java.lang.String comment,
int versionNo)
Makes the specified task available to the organization object, user or work
queue that it was previously available to.
|
void |
modifyDeadline(long taskID,
curam.util.type.DateTime deadline,
java.lang.String comments,
int versionNo)
Modifies the deadline of the specified task.
|
void |
modifyPriority(long taskID,
java.lang.String priority,
java.lang.String comments,
int versionNo)
Modifies the priority of the specified task.
|
void |
modifyTimeWorked(long taskID,
curam.util.type.DateTime totalTimeWorked,
long timeHoursWorked,
long timeMinutesWorked,
java.lang.String comment,
int versionNo)
Modifies the total time worked on the specified task.
|
void |
reallocate(long taskID,
java.lang.String comment,
int versionNo)
Reallocates a task.
|
void |
restart(long taskID,
java.lang.String comments,
int versionNo)
Restarts a task that had been previously deferred.
|
protected static final java.lang.String kManual
protected static final java.lang.String kManualCase
protected static final java.lang.String kManualParticipant
protected static final java.lang.String kManualParticipantCase
protected final int kZero
protected final int kSixty
public void addComment(long taskID, java.lang.String comment) throws curam.util.exception.AppException, curam.util.exception.InformationalException
My Tasks
list for a user to comment on it. This allows users to comment on tasks
that are included in the My Tasks
lists of other users. A
task life cycle event TASKLIFECYCLE.COMMENTADDED
is raised
when a comment is added to a task.
An exception is thrown under the following circumstances:
addComment
in interface TaskActions
taskID
- The identifier of the task which the comment is being added.comment
- The comment to be added as a task history record.curam.util.exception.AppException
curam.util.exception.InformationalException
public void close(long taskID) throws curam.util.exception.AppException, curam.util.exception.InformationalException
TASK.CLOSED
event.
An exception is thrown in the following circumstances:
close
in interface TaskActions
taskID
- The identifier of the task to be closed.curam.util.exception.AppException
curam.util.exception.InformationalException
public void create(java.lang.String subject, java.lang.String priority, java.lang.String assignedTo, java.lang.String assigneeType, curam.util.type.DateTime deadlineDateTime, long participantRoleID, java.lang.String participantType, long caseID, boolean addToMyTasksInd, java.lang.String comment) throws curam.util.exception.AppException, curam.util.exception.InformationalException
participantRoleID
and caseID
input fields have not been specified, then the MANUAL
workflow
process is enacted.participantRoleID
input field has been populated
and the caseID
input field has not, then the
MANUALPARTICIPANT
workflow process is enacted.participantRoleID
input field has not been
populated and the caseID
input field has been populated, then
the MANUALCASE
workflow process is enacted.MANUALPARTICIPANTCASE
.An exception is thrown under the following circumstances:
addToMyTasksInd
field nor the
assignedTo
field are set.addToMyTasksInd
and assignedTo
fields are set.addToMyTasksInd
field has been set and the
specified user has an active task redirection or allocation blocking period
specified for them.create
in interface TaskActions
subject
- The task subject.priority
- The task priority.assignedTo
- The name of the organization object, user or work queue
to which the task will be made available to.assigneeType
- The type of the organization object.deadlineDateTime
- The task deadline.participantRoleID
- The participant role identifier.participantType
- The participant type.caseID
- The case identifier.addToMyTasksInd
- Indicates whether the task should be added to the
users task list.comment
- The task comment.curam.util.exception.AppException
curam.util.exception.InformationalException
public void defer(long taskID, curam.util.type.Date restartDate, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
defer
in interface TaskActions
taskID
- The identifier of the task to be deferred.restartDate
- The date the task is to be restarted.comment
- A comment that indicates why the task is being deferred.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void restart(long taskID, java.lang.String comments, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
restart
in interface TaskActions
taskID
- The identifier of the task to be restarted.comments
- A comment that indicates why the task is being restarted.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void forward(long taskID, java.lang.String forwardToID, java.lang.String forwardToType, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
forward
in interface TaskActions
taskID
- The identifier of the task to be forwarded.forwardToID
- The identifier of the object who the task is being
forwarded.forwardToType
- The type of the object who the task is being
forwarded.comment
- A comment indicating why the task is being forwarded.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void modifyTimeWorked(long taskID, curam.util.type.DateTime totalTimeWorked, long timeHoursWorked, long timeMinutesWorked, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
totalTimeWorked
argument). The hours and minutes of this
date time are extracted from the specified date time and converted to
seconds. The time worked on for the task is thus stored in seconds.
A task history record is created containing the details of the modification.
An exception is thrown under the following circumstances:
modifyTimeWorked
in interface TaskActions
taskID
- The identifier of the task to be modified.totalTimeWorked
- The total time worked expressed as a date time.timeHoursWorked
- The number of hours worked. This is not populated
in the default implementation but may be used in the future.timeMinutesWorked
- The number of minutes worked. This is not
populated in the default implementation but may be used in the future.comment
- A comment to be added.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void modifyPriority(long taskID, java.lang.String priority, java.lang.String comments, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
Exceptions are thrown under the following circumstances.
modifyPriority
in interface TaskActions
taskID
- The identifier of the task whose priority will be updated.priority
- The priority that the task will be updated to.comments
- The comments associated with the priority modification
action. These will be stored in the associated task history record
written as a result of this action.versionNo
- The optimistic locking version number of the task whose
priority is being updated.curam.util.exception.AppException
curam.util.exception.InformationalException
public void modifyDeadline(long taskID, curam.util.type.DateTime deadline, java.lang.String comments, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
modifyDeadline
in interface TaskActions
taskID
- The identifier of the task whose deadline will be updated.deadline
- The date and time that the task deadline will be
updated to.comments
- The comments associated with the deadline modification
action. These will be stored in the associated task history record
written as a result of this action.versionNo
- The optimistic locking version number of the deadline
record associated with the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void reallocate(long taskID, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
reallocate
in interface TaskActions
taskID
- The identifier of the task to be reallocated.comment
- A comment to be added.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void getTask(long taskID, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
My Tasks
list. A task history
record is created containing the details of the action.
An exception is thrown under the following circumstances:
getTask
in interface TaskActions
taskID
- The identifier of the task to be added to the My Tasks
list.comment
- A comment to be added.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException
public void makeAvailable(long taskID, java.lang.String comment, int versionNo) throws curam.util.exception.AppException, curam.util.exception.InformationalException
An exception is thrown under the following circumstances:
makeAvailable
in interface TaskActions
taskID
- The identifier of the task to be made available.comment
- A comment to be added indicating why the task is being made
available.versionNo
- The optimistic locking version number of the task.curam.util.exception.AppException
curam.util.exception.InformationalException