User flow operations

更新时间:
复制 MD 格式

The Mobi platform provides powerful user flow integration features, which make your flows more flexible and adaptable for handling complex business scenarios. This document explains how to use user flow integration.

What are user flow operations

Mobi is a powerful low-code development platform that helps businesses quickly create internal tools and applications. The creation process for these tools and applications often involves various integration flows. User tasks are a key component of these flows. In an integration flow, a user task node represents a step that requires manual intervention or a decision. This step typically requires a user to complete actions, such as a review, an approval, or data entry.

User flow operations include user tasks and the integration operations for the integration flows that contain these tasks.

Features

The user flow integration feature on the Mobi platform includes the following:

  • Custom trigger methods: You can set integration operations to trigger manually or run automatically to meet different business needs.

  • Callbacks and data transformation: You can execute specific integration events when a query succeeds or fails and customize the processing of returned data.

For more information about events, see Integration operation events.

Using user flow integration

Step 1: Create an integration operation in an application

  1. In the Code panel, click the plus sign (+) for the relevant scope, and then select User Flow.

  1. Select the operation type. Then, select the trigger method and configure other details for the integration operation as needed.

  1. Click Run to preview the query results.

The configuration panel

Operation type

  • Get integration flow instance

  • Get integration flow instance list

  • Cancel integration flow instance

  • Get user task

  • Get user task list

  • Complete user task

  • Reassign user task approver

  • Cancel user task

Integration configuration

The following sections describe the configuration parameters for several operations.

Get integration flow instance list
  • Integration flow: The integration flow that you want to retrieve.

  • Integration flow execution status: The status of the integration flows to retrieve. Valid values include completed, canceled, failed, and running.

  • Start time: The start of the execution time range for the integration flows to retrieve.

  • End time: The end of the execution time range for the integration flows to retrieve.

Complete user task
  • taskId: The ID of the user task instance to complete.

  • Execution result output: The execution result output for the user task.

Get user task list
  • Filter method: The method to filter user tasks. Valid values are Integration flow and Integration flow instance ID.

  • Integration flow: If you set Filter method to Integration flow, this parameter specifies the integration flow that contains the user tasks to retrieve.

  • User task: If you set Filter method to Integration flow, this parameter specifies the user task to retrieve.

  • flowInstanceId: If you set Filter method to Integration flow instance ID, this parameter specifies the ID of the integration flow instance that contains the user tasks to retrieve.

  • User task execution status: The status of the user tasks to retrieve. Valid values include pending, completed, expired, and canceled.

  • Creation time start, Creation time end: The time range in which the user tasks to retrieve were created.

  • Submission time start, Submission time end: The time range in which the user tasks to retrieve were submitted.

  • pageNumber: The page number of the data to return. The value starts from 1.

  • pageSize: The number of entries to return on each page.

Reassign user task approver
  • taskId: The ID of the user task whose approver you want to reassign.

  • Approver: The new approver for the user task.

Note
Integration flow permissions
  • Only the initiator of an integration flow can view it.

User task permissions
  • Only the initiator and approver of a user task can view it.

  • Only the approver of a user task can perform the Complete user task, Reassign user task approver, and Cancel user task operations.

General configurations

  • Parameters: The parameters required to complete the operation, including their type, default value, and description. In the input field, reference parameters using the {{ varName }} format.

  • Description: A detailed description of the integration operation.

Callback configuration

  • Data transformation: Transforms the data returned by the API. The default value is return data, which means the original data is returned without being processed.

  • Success callback: The event to trigger when the API call succeeds.

  • Failure callback: The event to trigger when the API call fails.

Manually trigger an integration

Event trigger

  1. In the component that needs to trigger the integration operation, configure an event handler.

  2. Set Action type to Integration operation and select the appropriate integration.

  3. Enter the configured parameters as an object.

API trigger

If the integration operation is named action1, you can use the action1.trigger() method to trigger it anywhere you can run a script. If the operation has parameters, provide them as an object.