|
NameOpenXPKI::Server::Workflow::ConditionDescriptionBase class for OpenXPKI Conditions that implements parameter magic. Note that you need to name your evaluation method _evaluate, with a dash as prefix! Otherwise the necessary initialisation for the parameter magic will not work.It is NOT mandatory to use this class, subclassing Workflow::Condition is also fine if you do not need the extra features. Parameter mappingParameters in the configuration block that start with _map_ are parsed using template toolkit and imported into the namespace of the class.The prefix is stripped and the param is set to the result of the evaluation, the value is interpreted as template and filled with the context: my_condition: param: _map_my_tt_param: my_prefix_[% context.my_context_key %] If you just need a single context value, the dollar sign is a shortcut: my_condition: param: _map_my_simple_param: $my_context_key The values are accessible thru the $self->param call using the basename. Configuration exampleIf "my_context_key" has a value of foo in the context, this configuration:my_condition: param: _map_my_simple_param: $my_context_key _map_my_tt_param: my_prefix_[% context.my_context_key %] Is the same as: my_condition: param: my_simple_param: foo my_tt_param: my_prefix_foo
Visit the GSP FreeBSD Man Page Interface. |