Skip to main content

Parameters & Invocations

Goals and constraints can be given arguments, much like activities can; they actually use the exact same system. This allows you to configure a goal that needs to be reused in slightly different ways across multiple plans, or even multiple times in the same plan.

Parameters

tip

For now, only Java records are supported for parameterization.

For example, we can take the example from the scheduling page, and parameterize it so that it doesn't unconditionally recur every hour, and instead takes the period as input:

Kotlin parameter mapping is not yet supported :(

After you add the goal to your plan's scheduling specification, you'll see the goal invocation with a period parameter to be filled in.

Aerie Scheduling - Parameterized Goal
Figure 1: Aerie Scheduling - Parameterized Goal

Invocations

You can invoke the same goal multiple times in the same specification. This is useful for very specific, targeted goals; so the above goal isn't a very practical example of multiple invocations, but that won't stop us. You can right-click on the invocation and select "Duplicate invocation":

Aerie Scheduling - Duplicate Invocation
Figure 2: Aerie Scheduling - Duplicate Invocation

You can then create another invocation of the same goal, but likely with different parameters.