Actionflow Fundamentals
Learn about basics of Momen ActionFlow in this doc.
Introduction
Building in Momen is like building Legos. However, you can not build a smooth sphere. There are always some functions that can not be built by the existing components and actions in Momen.
For example:
Randomly draw a question from the question bank that the current user has not done;
Change the order status to "transaction expired" every minute if it has been "pending" for more than 15 minutes
Encapsulate the commands to operate the database into API for external calls, such as operating the database after payment.
These functions need to rely on Momen's action flow to complete. We can understand Momen's action flow as a function or API. Given an input, it executes the corresponding actions, and returns an output. The logic of execution is written by us.
Cautions
Action flow does not use strict type checking so that you can assign a [text] variable to a [integer] variable.
Before deleting a node, first delete the output of the node that will be used later.
Concept of ActionFlow Versions
Tips:
ActionFlow won't be saved automatically. Make sure to click Save in the upper right corner. Otherwise, the latest Action Flow will not be executed.
After each save, the version will be updated.
Callbacks and timed triggers execute the latest version of the deployed backend.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252FXiqwqqqi0ZNWmkCxnU8z%252F20240223-170813.jpeg%3Falt%3Dmedia%26token%3D9f8c7802-08d5-49a4-8a4b-5cced34585b9&width=768&dpr=4&quality=100&sign=38f38786&sv=1)
Example:
The version executed in your app is version 1.
The version executed by callbacks and timed triggers is version 2.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252FRhbqpz5LsKCf4RcpLLRH%252F20240223-170743.jpeg%3Falt%3Dmedia%26token%3D3f64f88c-26b2-4355-9ac5-fade89b651eb&width=768&dpr=4&quality=100&sign=544a075a&sv=1)
Action Flow Configuration Entrance
Click the [Action Flow] button in the upper left corner of the editor to enter the action flow creation page.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252FF787Y0OeDCHNcHgTQGeW%252F20240223-171333.png%3Falt%3Dmedia%26token%3D96cb4783-fb56-4beb-811d-271823e0fbd4&width=768&dpr=4&quality=100&sign=eff0c1b2&sv=1)
Creating an ActionFlow
Click the [Add] button on the left side of the action flow creation page to create an action flow.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252Fw6CkYDJYFPrfF0WdW06S%252F20240223-171338.png%3Falt%3Dmedia%26token%3D85fecbee-ef8b-485c-bb55-709f33875bcc&width=768&dpr=4&quality=100&sign=af3397b9&sv=1)
Configuring an ActionFlow
A complete action flow configuration consists of three parts: configuring input parameters, action operations/branches, and configuring output parameters.
Configuring Input Parameters
If your actionflow is to further process the data entered by the user or generated by the front-end page logic, you need to click the [Input] button at the top of the action flow to add input parameters. It is recommended to rename the parameters and select the appropriate data type.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252FpNqOlNe2CvkDY0k2TsE8%252F20240223-172158.png%3Falt%3Dmedia%26token%3Db86bef4a-0b99-4f53-8bfe-a5587574c1b8&width=768&dpr=4&quality=100&sign=d2b77404&sv=1)
Concepts of Nodes, Operations and Branches
Nodes
Each [+] sign in the actionflow represents a [node], in each node you can use the result data generated by the parent node.
For example: you can directly refer to actionflow data as the filter condition to update the same data.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252FSShkCv9lo5x8NwMh2UEy%252F20240223-172259.jpeg%3Falt%3Dmedia%26token%3D31535296-ba1c-4bfe-8783-06cd209e001a&width=768&dpr=4&quality=100&sign=3a794b44&sv=1)
Operations
Actions to be performed in the actionflow. The order of execution of operations is from top to bottom.
Branching
When executing different operations under different conditions, you can add branches to set the judgment conditions, the judgment order of the conditions is from left to right, and there are at least two branches when adding.
Adding Actions
In order to realize various business requirements, the following seven operations can be configured in the action flow.
![](https://docs.momen.app/~gitbook/image?url=https%3A%2F%2F2186054900-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNNm75vAys0CMwBUdWsgC%252Fuploads%252Fkimo22N2wkYLCcPluuNE%252F20240223-172340.png%3Falt%3Dmedia%26token%3D5725a188-ff8f-4395-80e8-a594b7156170&width=768&dpr=4&quality=100&sign=6889f192&sv=1)
Query Data
After adding this operation, when running the actionflow, you can configure filtering conditions, de-emphasis, sorting, and directly read one or more pieces of data in the data table, and the acquired data can be used in other operations or branches of the subsequent action flow.
Delete Data
After adding this action, data that meets the filter criteria will be deleted when the action flow is run.
Update Data
When this action is added, the act of updating the data in a table that meets the filter criteria is performed when the action flow is run.
Insert Data
This action will add one piece of data to a table, and when you turn on the batch operation, then you can add multiple items.
Custom Code
JS code can be edited in the actionflow to implement more complex logic.
Third-party APIs
You can call APIs to get/modify external data in the actionflow.
Configuration Output
If you need to take the result of actionflow processing to the front-end page, you need to configure the output parameter.
If you encounter any issues during the process, feel free to join our Discord community for assistance.
About Momen
Momen is a no-code web app builder, allows users to build fully customizable web apps, marketplaces, Social Networks, AI Apps, Enterprise SaaS, and much more. You can iterate and refine your projects in real-time, ensuring a seamless creation process. Meanwhile, Momen offers powerful API integration capabilities, allowing you to connect your projects to any service you need. With Momen, you can bring your ideas to life and build remarkable digital solutions and get your web app products to market faster than ever before.
Last updated