StartNotInterruptibleBlock

The StartNotInterruptibleBlock action marks the beginning of a non-interruptible block of code. While inside this block, incoming events will not interrupt the execution of the current skill. This is useful when performing critical operations that must complete without interruption, such as processing conversation starts, handling bookings, or sending important messages.

Must be paired with StopNotInterruptibleBlock to end the non-interruptible section.

StartNotInterruptibleBlock()

Example

{{StartNotInterruptibleBlock()}}

{{!-- Critical operations that should not be interrupted --}}
{{Set(name="user_id", value=GetUser(field="id"))}}
{{Set(name="agent_info", value=GetAgent())}}
{{SendMessage(message="Processing your request...")}}

{{StopNotInterruptibleBlock()}}

The above code snippet wraps a set of critical operations in a non-interruptible block, ensuring they complete without being interrupted by incoming events.