# Callback (mutate_step_expiration)
Modify step expiration
# Description
Callback transforms active step expiration. Every item from sliding
is applied on variable
or active step expiration. Finally configured steps expiration is overwritten with result.
# Config
mutate_step_expiration:
config:
# Required | Type: string | Default: null
# Base relative time to compute expiration from
time: "{$myvar}"
# Required | Type: array | Default: []
# List of relative times
#
### Note
### Must be specified if time field is empty
sliding: ["+5 days", "+ 2 hours"]
# Required | Type: array | Default: []
# Steps for which is expiration mutated. By default is used active step.
steps: ["mystep"]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Examples
There are several ways the callback can be used:
to = null
sliding = ['+5 days', '+ 2 hours']
Async start time will be set to + 5 days and 2 hours from callback start .
to = samoe value
(for example a string "first day of month" or a timestamp "123456789")sliding = []
Async start time will be set to the value in to .
to = some value
sliding = ['+5 days', '+ 2 hours']
We take value from to and apply sliding to it like in the first example . Async start time will be set to the result.