Is it possible to have an optional parameter in the message format? I have code that history is for something with an event type and parameters encoded as strings. This is loaded with other code and searches for resources based on the type name (i.e. eventtype..format), and then passes the stored parameters.
One type of event is "an action performed because the user rule matches." Previously, I did not include the name of the rule as one of the parameters, and now I want to, so I was hoping to use the same type of event without overriding it just to add a parameter.
My question is: is it possible to do something like this
eventtype.matchedRule.format=Action performed because of user-defined rule {if{0},(Rule name:{0})}
so if the event type "matchedRule" is loaded and has no parameters, this allows
"Action performed because of user-defined rule"
and if the rule name is defined as "My rule", it will be resolved
"Action performed because of user-defined rule (Rule name: My Rule)"
Again, I cannot manage another resource at that time if there are no parameters, so I will need to define a separate type of event that will look like matchedRuleWithRuleName
for new events that get saved and leave those that are already saved using matchedRule
.
reference
source share