Subject: [lmap] Information model question on Events in the schedule

From: "Carey, Timothy (Nokia - US)" <[email-masked]>
Date: Thu, 24 Mar 2016 20:10:27 +0000

Juergen,

I was looking at the rework of the timers in the latest draft (-09).

I am quite lost on this concept with respect to event start and end times and the schedule object.

The schedule object had a timer object that said this schedule was active between this start time and this end time (for example if you used a calendar timer) or is active upon an interval if you had a periodic timer. That made sense to me.

Now I have a schedule object that has a start parameter and optionally an (end parameter or interval parameter). The start and end parameters themselves are timer objects (e.g., for a calendar has a start and end time).

It would seem to me that all we need for a schedule is simply a timer that indicates when a schedule is suppose to start and end; as it is modeled today.

So lets please go back to using the timers as it was before; it just seems simpler.

If I am missing something maybe you can provide an example on paper where it doesn't work; because I think we are overloading event generation (timer going off) with the configuration of the time I expect a schedule to be active. Two different things...

BR,
Tim

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 29 Mar 2016 19:18:09 +0200

> The schedule object had a timer object that said this schedule was active between this start time and this end time (for example if you used a calendar timer) or is active upon an interval if you h…

This is not correct.
 
> Now I have a schedule object that has a start parameter and optionally an (end parameter or interval parameter). The start and end parameters themselves are timer objects (e.g., for a calendar has…

Yep, this can be configured.

> So lets please go back to using the timers as it was before; it just seems simpler.

No. The timers serve different purposes. There was no schedule end in
earlier versions, Al Morton came up with the requirement to be able to
control the duration of an active schedule.

> If I am missing something maybe you can provide an example on paper where it doesn't work; because I think we are overloading event generation (timer going off) with the configuration of the time I…

No, I believe this is clearly separated. Lets first talk about events
and lets pick calendar events as an example (since you mentioned
them). A calendar event specification can express that an event should
be created lets say every day at 03:42:00. The optional
ma-calendar-start and ma-calendar-end descripts say this:

   ma-calendar-start:            The optional date and time at which
                                 Schedules using this object are first
                                 started.  If not present it defaults to
                                 immediate.

   ma-calendar-end:              The optional date and time at which
                                 Schedules using this object are last
                                 started.  If not present it defaults to
                                 indefinite.

If you do not set these fields, you fire an event every day at
03:42:00. By setting ma-calendar-start to 2016-04-01T00:00:00, the
first time this calendar entry will fire an event is at
2016-04-01T03:42:00 but nothing will happen before April 1st. If you
set ma-calendar-end to 2016-05-01T00:00:00, the the last time this
calendar entry will fire an event is at 2016-04-30T03:42:00. In other
words, the ma-calendar-start and ma-calendar-end define the time
interval in which the periodic event source is 'active'.

Now lets talk about scheduled. A schedule is started when the start
ma-schedule-start event takes place (and the schedule is not currently
active). 

   ma-schedule-start:            An event object indicating when the
                                 schedule starts.

   ma-schedule-end:              An optional event object controlling
                                 the forceful termination of scheduled
                                 actions.  When the event occurs, all
                                 actions of the schedule will be forced
                                 to terminate gracefully.

   ma-schedule-duration:         An optional duration in seconds for the
                                 schedule.  All actions of the schedule
                                 will be forced to terminate gracefully
                                 after the duration number of seconds
                                 past the start of the schedule.

If you do not specify ma-schedule-end or ma-schedule-duration, the
action will run until all actions have finished. If you set
ma-schedule-duration, then you define a maximum running time for the
schedule. If you set ma-schedule-end, then you define an event that
causes the schedule to terminate when the event fires.

Do you see that all these objects do have a specific purpose and do
not overlap? Timer events are a specific point in time, schedules are
started by an event and they either run until completion or they are
optionally terminated after a certain duration or when an end event
fires.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: "Carey, Timothy (Nokia - US)" <[email-masked]>
Date: Tue, 29 Mar 2016 17:47:22 +0000

Juergen,

I guess I will have to break this down abit by question in order for me to understand.

Inline <TAC> for the first clarification.

-----Original Message-----
From: EXT Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Tuesday, March 29, 2016 12:18 PM
To: Carey, Timothy (Nokia - US)
Cc: [email-masked]
Subject: Re: [lmap] Information model question on Events in the schedule

> The schedule object had a timer object that said this schedule was active between this start time and this end time (for example if you used a calendar timer) or is active upon an interval if you h…

This is not correct.
<TAC> Why do you say this is not correct. I have a schedule object that is associated with a calendar timer (as an example). That would mean in this instance the schedule would start and stop at that time - Period. What am I missing?

> So lets please go back to using the timers as it was before; it just seems simpler.

No. The timers serve different purposes. There was no schedule end in earlier versions, Al Morton came up with the requirement to be able to control the duration of an active schedule.

> If I am missing something maybe you can provide an example on paper where it doesn't work; because I think we are overloading event generation (timer going off) with the configuration of the time I…

No, I believe this is clearly separated. Lets first talk about events and lets pick calendar events as an example (since you mentioned them). A calendar event specification can express that an event should be created lets say every day at 03:42:00. The optional ma-calendar-start and ma-calendar-end descripts say this:

If you do not set these fields, you fire an event every day at 03:42:00. By setting ma-calendar-start to 2016-04-01T00:00:00, the first time this calendar entry will fire an event is at
2016-04-01T03:42:00 but nothing will happen before April 1st. If you set ma-calendar-end to 2016-05-01T00:00:00, the the last time this calendar entry will fire an event is at 2016-04-30T03:42:00. In other words, the ma-calendar-start and ma-calendar-end define the time interval in which the periodic event source is 'active'.

Now lets talk about scheduled. A schedule is started when the start ma-schedule-start event takes place (and the schedule is not currently active). 

If you do not specify ma-schedule-end or ma-schedule-duration, the action will run until all actions have finished. If you set ma-schedule-duration, then you define a maximum running time for the schedule. If you set ma-schedule-end, then you define an event that causes the schedule to terminate when the event fires.

Do you see that all these objects do have a specific purpose and do not overlap? Timer events are a specific point in time, schedules are started by an event and they either run until completion or they are optionally terminated after a certain duration or when an end event fires.

/js

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Wed, 30 Mar 2016 09:41:36 +0200

> <TAC> Why do you say this is not correct. I have a schedule object that is associated with a calendar timer (as an example). That would mean in this instance the schedule would start and stop at th…

Because this is not correct. Up to -07 there was only a single event object in ma-schedule-obj that indicates the start of a schedule. There was no end/duration for the schedule, this was added in -08.

---

From: "Carey, Timothy (Nokia - US)" <[email-masked]>
Date: Wed, 30 Mar 2016 11:49:24 +0000

Juergen,

I think again there is overload in the event.
In -05 there were timing objects.
These timing objects were assigned to a schedule. The Calendar  and periodic timing object has a start and end date. The one-off and Immediate were one time.

At that revision everything was cored in terms of scheduling a task. 

Then things got conflated with an event concept in -06 but the timing objects still have a start and end time. 

In the case of the schedule with a calendar/periodic "event" this would be the start and stop time of the schedule.

On the single schedule object: That is incorrect the calendar object has a start and end date. I do not understand why you say it doesn't have a end date. 

Is it that you expect different/numerous event instances for a single schedule (each time the schedule timer fires). If so I think that is what was conflated?  If so the original intent was to simply have a timer object that described when a schedule was active not the actual event that it did fire.

BR,
Tim

---

From: "Carey, Timothy (Nokia - US)" <[email-masked]>
Date: Wed, 30 Mar 2016 12:06:59 +0000

Sorry - meant correct not "cored"

-----Original Message-----
From: Carey, Timothy (Nokia - US) 
Sent: Wednesday, March 30, 2016 6:49 AM
To: 'Juergen Schoenwaelder'
Cc: [email-masked]
Subject: RE: [lmap] Information model question on Events in the schedule

Juergen,

BR,
Tim