serverlessworkflow / specification

Contains the official specification for the Serverless Workflow Domain Specific Language. It provides detailed guidelines and standards for defining, executing, and managing workflows in serverless environments, ensuring consistency and interoperability across implementations.
http://serverlessworkflow.io
Apache License 2.0
734 stars 146 forks source link

Schedule `interval` field "R/<Duration>" pattern is not sufficiently defined #322

Closed gibson042 closed 3 years ago

gibson042 commented 3 years ago

The Schedule interval field is defined as "ISO 8601 format", but ISO 8601 does not include any pattern like R/\:

5.6.1 Means of specifying recurring time intervals A recurring time interval shall be expressed in one of the following ways.

a) by a number of recurrences (optional), followed by a start and an end which identify the first time interval [R[\]/\/\, which is effectively useless unless the duration is short and within the same calendar day because not every day is the same length];

b) by a number of recurrences (optional), followed by a start and a duration which identify the first time interval [R[\]/\/\];

c) by a number of recurrences (optional), followed by a duration and an end which identify the last time interval > [R[\]/\/\].

In all cases, if the number of recurrences is absent, the number of occurrences is unbounded.

NOTE 1 In some applications, a recurring time interval is expressed by a number of recurrences (optional) and duration alone, because either the start or end is supplied out-of-band.

The field should be defined more precisely, and if it is important to include such syntax then it should do so clearly (unlike ISO 8601 itself, in which the note implies that such a representation should be possible but doesn't explicitly define how), and specifically define how the start or end time is established.

tsurdilo commented 3 years ago

@gibson042 can you show me where this restriction is made?

Interval is a repeating interval as in R/< interval > which is from what i understand part of ISO 8601: https://en.wikipedia.org/wiki/ISO_8601#Repeating_intervals

http://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf (section 4.5 )

gibson042 commented 3 years ago

http://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_iso_wd_8601-1_2016-02-16.pdf is an obsolete draft, not the actual published ISO 8601:2019 (the actual text of which I quoted above).

tsurdilo commented 3 years ago

@gibson042 thanks! could you help us define that field more precisely please? That would really help

gibson042 commented 3 years ago

Yes. How do you intend for implementations to establish the start time for "R/\" intervals?