cancel
abstract suspend fun cancel( context: Context, processName: String? = null, values: JSONObject? = null, onSuccess: () -> Unit?, onError: (MyBusinessError) -> Unit?)
Content copied to clipboard
Cancels the current process.
PS: If the process is scheduled and not started yet it will be deleted as it was never created, and in this case the current Stack will be destroyed, otherwise it will be canceled and moved to the list of canceled processes.
See also
Parameters
context
Context The application context.
process Name
String(Optional) the new process name, if the name was changed by user.
values
JSONObject(Optional) contains data retrieved from process widgets, needed if user changed some values in widgets.
on Success
(Optional) will be called when the operation successfully completed.
on Error
(Optional) will be called when the operation fails for any reason.