I'm trying to cancel an event the condition set to it is false. is there any Action Macro defined for it?
Can you provide details on how the event is meant to work? What you are attempting to achieve?Usually, with events, they will assess as:
If <condition macro>
then <action on true>
else <action on false>
If you leave <action on false> blank, that effectively is the same thing as the event doing nothing. It will only perform the <action on true> so long as <condition macro> = true.
I'm trying to send an e-mail as long the ticket is set to a specific status
My advice is to use the SLOs and repeat the event.
Suppose you have a ticket set to status "Pending". What you can do is:
-Create a site defined condition macro in which the condition is to check if status = Pending, it will return "true"
-Create the event so that the above condition is in place and on True, send email. On False, do nothing.
-on the given SLO, have it run at whatever interval of time you want.
In the above example, the moment the status is set to a value other than Pending, the event will find as condition false and do nothing further.
I believe that on False, you could run another action macro that stops the Service Type event perhaps?
you can cancel event using cancel_me function: SPEL EVENT methods
also event can be accessed from attached macro using attached_event object.
In the action macro just use the cancel_me() function?
I was wrong, cancel_me actually is a method, not a function.
Have you checked cancel_me example?
In the action macro you can access event using attached_event object, you need to check it out using group_leader, then cancel and check in. Regarding to attached event/macro execution logic it can be already checked out so you can simply try to cancel it without checking out/in it:
send_wait(0, attached_event, "cancel_me");