MilestoneEvent¶
-
public class
MilestoneEvent
¶ The
MilestoneEvent
is used to create a Motech event. The event payload contains details about milestone.See also:
org.motechproject.scheduletracking.service.impl.EnrollmentAlertService
Constructors¶
MilestoneEvent¶
-
public
MilestoneEvent
(String externalId, String scheduleName, MilestoneAlert milestoneAlert, String windowName, DateTime referenceDateTime, Map<String, String> milestoneData)¶ Creates a MilestoneEvent with the enrollmentId attribute set to
enrollmentId
, the scheduleName attribute toscheduleName
, the milestoneAlert attribute tomilestoneAlert
, the windowName attribute towindowName
, the referenceDateTime attribute toreferenceDateTime
, the milestoneData attribute tomilestoneData
.Parameters: - externalId – the user external id
- scheduleName – the name of the schedule
- milestoneAlert – the milestone alert
- windowName – the name of the milestone window
- referenceDateTime – the reference date and time
- milestoneData – the milestone additional data
MilestoneEvent¶
-
public
MilestoneEvent
(MotechEvent motechEvent)¶ Creates a MilestoneEvent from an enrollment by passing in an Motech event.
Parameters: - motechEvent – the Motech event with details
MilestoneEvent¶
-
public
MilestoneEvent
(Enrollment enrollment, MilestoneAlert milestoneAlert, MilestoneWindow milestoneWindow)¶ Creates a MilestoneEvent from an enrollment, alert and milestone window.
Parameters: - enrollment – the enrollment
- milestoneAlert – the alert which will be triggered
- milestoneWindow – the milestone window