Interface CustomModuleListener

  • All Implemented Interfaces:

    
    public interface CustomModuleListener
    
                        

    Listener invoked when a CustomModule is encountered in the workflow.

    A CustomModule allows the workflow to pause so the client can run custom logic before resuming at the module's designated next node.

    The callbackName is configured in the Dashboard and identifies which custom action should be executed. On the Web SDK, this corresponds to the name of a JavaScript function that will be called automatically. On mobile platforms, the value is delivered as a plain string; the application may interpret it in any way it sees fit (e.g., mapping it to a method or dispatching based on its value).

    When implementing this listener, you should:

    • Execute your custom logic based on the provided callbackName

    • Invoke onCustomModuleCompleted with the appropriate CustomModuleStatus to indicate the result of your custom operation

    • The SDK will process the status and advance to the next module in the workflow

    Since:

    5.42.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onCustomModuleStarted(String callbackName, Function1<CustomModuleStatus, Unit> onCustomModuleCompleted) Called when a custom module is encountered in the onboarding workflow.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onCustomModuleStarted

         abstract Unit onCustomModuleStarted(String callbackName, Function1<CustomModuleStatus, Unit> onCustomModuleCompleted)

        Called when a custom module is encountered in the onboarding workflow.

        Parameters:
        callbackName - The name of the method to invoke
        onCustomModuleCompleted - Callback to call with a desired CustomModuleStatus when the method invocation is complete
        Since:

        5.42.0