@AccessLevel(value=EXTERNAL)
public final class DeadlineScanner
extends java.lang.Object
A workflow deadline pertains to Manual
, Event Wait
, Decision
, Parallel Manual
and
Parallel Decision
activities and it is composed of a
deadline duration and an associated handler function. For manual and
decision activities, the deadline time is calculated by adding the duration
specified in the deadline metadata to the time that the associated task
for these activities was created. For event wait activities, the deadline
duration is added to the time that the activity was executed and this then
becomes the deadline time. Once the activity is executed, it must be
completed before the specified deadline time. Otherwise the
scanDeadlines()
function in this class may be called to
determine which deadlines have timed out. The associated handler function
specified for the deadline is then invoked for each deadline that has
expired.
Modifier and Type | Method and Description |
---|---|
static void |
deliverReminders()
Delivers each reminder and then removes it from the reminder entity so it
can't be sent twice.
|
static WorkflowDeadlineDetailsList |
getExpiredDeadlines()
Returns a list of expired deadline details.
|
static void |
processOneExpiredDeadline(long workflowDeadlineID)
Processes one expired deadline record.
|
static void |
processOneExpiredDeadline(WorkflowDeadlineDetails workflowDeadlineDetails)
Processes one expired workflow deadline record.
|
static void |
scanDeadlines()
Scans for workflow deadlines that have expired.
|
public static void scanDeadlines() throws curam.util.exception.AppException, curam.util.exception.InformationalException
curam.util.exception.AppException
- Generic application exceptions.curam.util.exception.InformationalException
- Generic Exception Signature.public static void processOneExpiredDeadline(long workflowDeadlineID) throws curam.util.exception.AppException, curam.util.exception.InformationalException
processOneExpiredDeadline
to process the workflow deadline details.workflowDeadlineID
- The unique identifier of the expired workflow
deadline.curam.util.exception.AppException
- Exceptions that could occur when processing one
expired workflow deadline record.curam.util.exception.InformationalException
- Generic Exception Signature.public static void processOneExpiredDeadline(WorkflowDeadlineDetails workflowDeadlineDetails)
The deadline that has been processed is removed to ensure it is not processed again.
The data associated with the Context_Deadline
workflow data
object attribute is persisted.
If there is a task associated with the deadline that has expired, a task history record is written detailing this fact.
workflowDeadlineDetails
- The details of the workflow deadline record
that has expired.public static void deliverReminders() throws curam.util.exception.AppException, curam.util.exception.InformationalException
curam.util.exception.AppException
- Generic application exceptions.curam.util.exception.InformationalException
- Generic Exception Signature.public static WorkflowDeadlineDetailsList getExpiredDeadlines() throws curam.util.exception.AppException, curam.util.exception.InformationalException
WorkflowDeadline
table and the deadline date of each record
is compared with the current date time. The details of any deadlines that
have expired relative to the current date time are added to a list
and returned.curam.util.exception.AppException
- Exceptions that may occur when retrieving the list
of expired deadline details.curam.util.exception.InformationalException
- Generic Exception Signature.