cancel

abstract suspend fun cancel(    context: Context,     processName: String? = null,     values: JSONObject? = null,     onSuccess: () -> Unit?,     onError: (MyBusinessError) -> Unit?)

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.

processName

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.

onSuccess

(Optional) will be called when the operation successfully completed.

onError

(Optional) will be called when the operation fails for any reason.