-
-
Notifications
You must be signed in to change notification settings - Fork 42
Timer Definitions and their Keys in flow_object_attributes
Just a quick spec to define what ends up in flow_object_attributes
for each type of Timer Definition, from v21.2
There are 6 types of Timer that can be specified. Not all Timer Types are allowed on event object that can have an attached timer.
The ISO Timer specifies a full Date and Time in ISO 8601 format, i.e., what would be an Oracle Data format mask of YYYYMMDD'T'HH24:MI:SS
.
An alternative signature supported by the Flows for APEX engine is just to specify the time portion of the date specifier. For example, "T13:10:00". In this case, the timer will be scheduled. for the next future time that this time can occur. For this example, if the current time is earlier than 13:10:00 it will be scheduled for today at 13:10:00; if not, it will be scheduled for 13:10:00 tomorrow.
Instead of supplying a static value for the Timer Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable can be of type 'date' or of type 'varchar2'. A 'varchar2' variable must contain an ISO 8601 Date/Time specification.
<bpmn:timerEventDefinition id="TimerEventDefinition_1fzhwl6">
<bpmn:timeDate xsi:type="bpmn:tFormalExpression">20211120T12:30:00</bpmn:timeDate>
</bpmn:timerEventDefinition>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | bpmn:timeDate |
nn | timerDefinition | 20211120T12:30:00 |
The ISO Duration timer accepts an ISO 8601 Period specification - that is, a string starting with upper case 'P' and then specifying some period duration from low specificity to high specificity, which could include Y(ears), M(onths), D(ays), M(inutes) and S(econds). An upper case 'T' must precede any time components to avoid ambiguity between Months and Minutes.
Instead of supplying a static value for the Timer Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable must be of type 'varchar2', and contain an ISO 8601 Period specification as described above.
<bpmn:timerEventDefinition id="TimerEventDefinition_1fzhwl6">
<bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT20M</bpmn:timeDate>
</bpmn:timerEventDefinition>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | bpmn:timeDuration |
nn | timerDefinition | PT20M |
The ISO Cycle timer accepts an ISO 8601 repeating Period specification - that is:
- The Repeat Definition - a string starting with upper case 'R', followed by the number of times the event should run, and terminated by a slash '/'. For example, 'R5/' specifies 5 runs of the timer. If the repeat number is omitted or is specified as '-1', the number of repetitions is unlimited.
- The Period Definition - a string starting with upper case 'P' and then specifying some period duration from low specificity to high specificity, which could include Y(ears), M(onths), D(ays), M(inutes) and S(econds). An upper case 'T' must precede any time components to avoid ambiguity between Months and Minutes.
Instead of supplying a static value for the Timer Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable must be of type 'varchar2', and contain an ISO 8601 Repeating Period specification, as described above.
<bpmn:timerEventDefinition id="TimerEventDefinition_1fzhwl6">
<bpmn:timeCycle xsi:type="bpmn:tFormalExpression">R5/P2D1H40M0S</bpmn:timeDate>
</bpmn:timerEventDefinition>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | bpmn:timeCycle |
nn | timerDefinition | R5/P2D1H40M0S |
The Oracle Date Timer allows you to specify a Date/Time in a valid Oracle format, along with the format mask that should be used to convert it to an Oracle Date.
Instead of supplying a static value for the Oracle Timer Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter for the date. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable can be of type 'date' or of type 'varchar2'. A 'varchar2' variable must contain a valid Oracle date that will be converted using the supplied format mask.
<bpmn:timerEventDefinition id="TimerEventDefinition_0o8bvlc" apex:timerType="oracleDate">
<bpmn:extensionElements>
<apex:oracleDate>
<apex:date>11-11-2021</apex:date>
<apex:formatMask>DD-MM-YYYY</apex:formatMask>
</apex:oracleDate>
</bpmn:extensionElements>
</bpmn:timerEventDefinition>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | apex:oracleDate |
nn | apex:date | 11-11-2021 |
nn | apex:formatMask | DD-MM-YYYY |
The Oracle Duration specifies a time interval until the timer fires. This is specified as an interval_ym component and an interval_ds component.
- The interval_ym component stores the years and months -- in the format 'YY-MM'.
- The interval_ds component stores the days, hours, minutes, and seconds in the format 'DDD HH24:MI:SS'. Components should be padded with leading zeros.
Instead of supplying a static value for each component of the Oracle Duration Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable must be of type 'varchar2'. The 'varchar2' variable must contain an Oracle interval -- so the interval_ym variable should contain a string like 'yy-mm' (with yy being the length of the interval in years and 'mm' the interval in months; The interval_ds variable should contain a string like 'DDD HH:MI:SS'.
<bpmn:intermediateCatchEvent id="Event_1r6jzsb">
<bpmn:timerEventDefinition id="TimerEventDefinition_0chwwyk" apex:timerType="oracleDuration">
<bpmn:extensionElements>
<apex:oracleDuration>
<apex:intervalYM>00-03</apex:intervalYM>
<apex:intervalDS>7 00:00:00</apex:intervalDS>
</apex:oracleDuration>
</bpmn:extensionElements>
</bpmn:timerEventDefinition>
</bpmn:intermediateCatchEvent>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | apex:oracleDuration |
nn | apex:intervalYM | 00-03 |
nn | apex:intervalDS | 7 00:00:00 |
The Oracle Cycle Timer allows you to specify a repeating Timer using Oracle-format specifications. Rather than being in a single specification string, the Oracle format allows you to specify the following components:
- An Interval until the Timer first fires. This is specified as an Oracle Interval Day-Seconds and should contain a string like 'DDD HH:MI:SS'.
- An Interval between each repeat. This is specified as an Oracle Interval Day-Seconds and should contain a string like 'DDD HH:MI:SS'.
- The Maximum number of Runs, specifying the total maximum number of times the timer should fire. Omitting maxRuns will cause the timer to fire continuously, without limit.
Instead of supplying a static value for each component of the Oracle Cycle Definition, the user could specify a Flows for APEX Process Variable as a substitution parameter for each component. The Process Variable name is prefixed with '&F4A$' and post fixed with a period '.'. The Process Variable must be of type 'varchar2'.
- For startIntervalDS, the 'varchar2' variable must contain an Oracle interval -- it should contain a string like 'DDD HH:MI:SS'.
- For repeatIntervalDS, the 'varchar2' variable must contain an Oracle interval -- it should contain a string like 'DDD HH:MI:SS'.
- For maxRuns, the 'varchar2' variable must contain a number nnn.
<bpmn:boundaryEvent id="Event_0uq6gfi" cancelActivity="false" attachedToRef="Activity_1gk1kmq">
<bpmn:timerEventDefinition id="TimerEventDefinition_10elkje" apex:timerType="oracleCycle">
<bpmn:extensionElements>
<apex:oracleCycle>
<apex:startIntervalDS>000 01:00:00</apex:startIntervalDS>
<apex:repeatIntervalDS>002 01:00:00</apex:repeatIntervalDS>
<apex:maxRuns>5</apex:maxRuns>
</apex:oracleCycle>
</bpmn:extensionElements>
</bpmn:timerEventDefinition>
</bpmn:boundaryEvent>
obat_objt_id | obat_key | obat_vc_value |
---|---|---|
nn | timerType | apex:oracleCycle |
nn | apex:startIntervalDS | 000 01:00:00 |
nn | apex:repeatIntervalDS | 002 01:00:00 |
nn | apex:maxRuns | 5 |