Interface MicroflowCallBuilder

  • public interface MicroflowCallBuilder
    Provides a builder for building a microflow call. The builder can be used to add arguments and eventually call the microflow.
    • Method Detail

      • withParams

        default MicroflowCallBuilder withParams​(java.util.Map<java.lang.String,​java.lang.Object> params)
        Adds multiples parameters to the microflow call.
        params - the parameters to add
        the updated builder
      • execute

        <R> R execute​(IContext context)
        Execute the microflow call synchronously.
        context - the context in which the microflow should be executed
        the result of the microflow call
      • executeInBackground

        void executeInBackground​(IContext context,
                                 java.lang.String queueName)
        Put the microflow call on a task queue. It will be executed in a different thread, and potentially on a different cluster node. `inTransaction` option is ignored when the microflows are called with this method.
        queueName - Name of a queue. These have to exist in the model.
        context - the context that is used to schedule the background call. A sudo clone is used internally, so no permissions are taken into account. The execution will only happen when the transaction held by this context has ended / is committed to the database.
        MendixRuntimeException - if enqueueing the microflow call fails, for example if the queue doesn't exist.