-
Notifications
You must be signed in to change notification settings - Fork 1
/
tosca.yml
87 lines (82 loc) · 3.05 KB
/
tosca.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
tosca_definitions_version: alien_dsl_2_0_0
metadata:
template_name: org.alien4cloud.rmsscheduling
# Will be replaced with mvn property org.alien4cloud.scheduling.version during build
template_version: 3.0.0
template_author: alien4cloud
description: |
Types for Job Scheduling, triggered by rules.
imports:
- tosca-normative-types:1.0.0-ALIEN20
- alien-base-types:3.0.0
policy_types:
org.alien4cloud.rmsscheduling.policies.RMSScheduleWorkflowPolicy:
derived_from: org.alien4cloud.policies.ScheduleWorkflowPolicy
description: |
A scheduled and rule based workflow policy trigger.
You can define a time window during which an action can be execucted, if conditions are mets.
properties:
cron_expression:
description: "Timer expression that defines schedule rules (each 5 minutes : 0 0/5 * * * ?)."
type: string
required: true
#default: "0 0/5 * * * ?"
timer_type:
description: |
Timer type according to Drools documentation (cron, int ...).
See https://docs.jboss.org/drools/release/7.48.0.Final/drools-docs/html_single/index.html#drl-timers-calendars-con_drl-rules
type: string
required: true
constraints:
- valid_values: [cron, int]
default: cron
duration:
description: Duration of the time window ex 5m or 4h or 1d, or even 2h10m30s.
type: string
required: true
default: 0s
retry_on_error:
description: Defines if the workflow should be retried after error.
type: boolean
default: false
required: true
loop:
description: Reschedule even if success (but only during the time window).
type: boolean
default: false
required: true
delay:
description: The minimum delay beetween reschedules (after error or while looping), ex 30s or 10m or 2h.
type: string
default: 10s
required: true
max_run:
description: Max run count (in case of error and retry_on_error or loop mode). -1 (default) means no limit.
type: integer
default: -1
required: true
only_one_running:
description: Defines if only one workflow should be executed at a given time (no overlap when true).
type: boolean
default: true
required: true
cancel_on_timeout:
description: Defines if we must cancel a running workflow if time window elapsed.
type: boolean
default: false
required: true
conditions:
description: |
List of conditions that trigger execution.
type: list
required: false
entry_schema:
type: string
workflow_name:
description: |
The name of the workflow to launch.
type: string
required: true
metadata:
# pluginId:pluginBean:phase
a4c_policy_impl: alien4cloud-rms-scheduler-plugin:rms-scheduler-modifier:post-matched-policy-setup