Adding a Trigger for Application Developed in the Platform
Triggers intuitively display service processes to users. Once set up, triggers automate operations without the need for manual execution by users. In the service configuration center, you can disable or enable the triggers in an application, or create a trigger.
Configuring a Trigger
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- Click
in the upper left corner and choose Environments > Configuration Center.
- Choose Application Configuration from the main menu.
- On the application configuration page, select an application type (for example, App) and click an application.
- In the navigation pane, choose Trigger Settings. The existing triggers of the application are displayed on the right.
Click OFF in the Operation column to enable the trigger and click ON to disable the trigger.
- After a trigger is enabled, the system automatically performs the corresponding action only when the trigger condition is met.
- After a trigger is disabled, click
in the Operation column to modify the trigger conditions and actions. Only unprotected triggers can be modified.
- Add a trigger.
- On the Triggers page, click Create, set basic information by referring to Table 1, and click Add.
- On the Triggers page, click
in the row that contains the new trigger.
- Configure a condition for the trigger. Click Add Criteria, configure the condition on the right, and click Save.
Figure 1 Creating a condition
Table 2 Parameters for creating a condition Parameter
Description
Criteria Name
Condition name.
Execution Condition
Condition for triggering the rule.
- When conditions are met: The branch is executed only when the specified conditions are met.
- When condition expression is true: You can enter a condition to define the logic.
- No conditions, execute directly: Enter the branch unconditionally.
Set Condition
If Execution Condition is set to When conditions are met, you need to set specific conditions. You can control the conditions for entering a trigger by setting the AND or OR relationship for the values of one or more fields specified by the object involved in the trigger.
If the value of a field in the condition is a number, percentage, or currency amount, the value of the field does not need to contain "". For other field types, add "".
Build Formula
If Execution Condition is set to When condition expression is true, you need to enter the rule condition.
- Click Add Action, set the action to be executed after the rule conditions are met, and click Save.
Figure 2 Creating an action
Table 3 Action types Parameter
Description
Action Type
Action type. The options are as follows:- Create a Record: Create a record.
- Update a Record: Update a record.
- Email Alerts: Send an alarm email.
- Trigger: Call a sub-trigger.
- Script: Call a script. Ensure that the script is activated.
- Flow: Call a flow. Ensure that the flow is activated.
- BPM: Call a BPM. Ensure that the BPM is activated.
Action Name
Name of the action to be added.
Select script
Script to be executed by the action. This parameter is displayed only when Action Type is set to Script. The parameters displayed here vary according to the action type. Set the parameters based on the site requirements.
- (Optional) To set multiple rules or branch actions, click Add Criteria or Add Action.
- On the Triggers page, click OFF in the Operation column to enable the trigger.
- On the Triggers page, click Create, set basic information by referring to Table 1, and click Add.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot