stop

override fun stop(msg: String?)

This sets a flag to indicate to the process that is should stop after the next step is completed. This is different than end(). Calling end() immediately places the process in the End state. The process needs to be in a valid state before end() can be used. Calling stop tells the process to eventually get into the end state. stop() can be used to arbitrarily stop the process based on some user defined condition.

Parameters

msg

A string to represent the reason for the stopping