If you need to perform an action whenever the process was finished, but
not when it was suspended, you can also override the
getStopGate
method. There you can define a sub-process that is
guaranteed to be the last thing that is executed as part of the process.
It must end at a
null
gate.
If for some reason, you need to make sure, that the Gate/Transition
mechanism has already stopped for the process, you must override
onFinished
and query
isSuspended
before performing some action. This might be the case
if you want to send a notification if a process was finished.