terminateFailure
The terminateFailure
method must be called by the CUWO when it has failed to perform its job and wants to let the enfore runtime know that it is done and that the web view can be closed.
The method is defined as:
/**
* Notify container of failure of the workflow and terminate it.
*
* @param failure - Depending on workflow type, the NFON-serialized
* workflow-specific failure structure or the error
* message to be shown to the user.
*/
public terminateFailure(
failure : string<? extends WorkflowFailure> | string,
) : void
The method receives a single parameter that is of type string
. For newer CUWOs, the string must contain the NFON-serialization of the workflow-specific subtype of WorkflowFailure
. For older CUWOs, the string is just a debug message.
The method is available for all types of CUWOs.
The following CUWOs use dedicated WorkflowFailure
structures:
- AuthorizeOrCapturePayment
- CapturePayment
- CancelPayment
- RefundPayment
- GrantPayout
- CancelPayout
The following CUWOs use a plain-string debug message instead:
- ConfigureLineItem
- AssembleProduct
- CancelLineItem
- RefundLineItem
- Kiosk