Configuring a Function Component
Function flows support the function component. You can associate a created function with the component to meet service requirements.
Notes and Constraints
- Function flows created in Data Workroom (DWR) can only be viewed on the FunctionGraph console; editing and deletion must be done within DWR.
- The data returned by the configured function must be in JSON format. Otherwise, it cannot be parsed.
- Synchronous invocation does not support long-term running functions and is max. 15 minutes.
- Asynchronous invocation supports long-term running functions. The max. duration of a function node is the same as that supported by FunctionGraph.
- A flow can have zero to 99 functions.
- A function connected to an error handling node can be connected to another node that is not start or error handling.
- A function that is not connected to an error handling node can be connected to only one non-start node.
Prerequisites
- You have created a function on the FunctionGraph console. For details, see Creating a Function from Scratch.
- Before using flows, learn about Expression Description and Operators.
Configuration Description

Parameter |
Description |
---|---|
App |
App to which the desired function belongs. You can create multiple functions under an app. |
Function |
Function you want to use. |
Version |
Function version you want to use. |
CallMode |
Required when creating a standard flow. By default, function nodes in a flow are invoked synchronously. |
Function Parameters |
Key-value pairs passed for executing a function. Set constants, or obtain values from the input defined during function flow startup or the output of the former node using a JSONPath expression. To include sensitive information such as passwords, encrypt them first to prevent leakage. Parameters that will be passed in JSON format in the body. Key: parameter name Value: parameter value DefaultValue: used if no value is specified for the parameter Operation: to edit or delete the parameter |
Input Filter Expression |
JSONPath expression used to filter the input information of the node. |
Output Filter Expression |
JSONPath expression used to filter the output information of the node. |
Turn on StandbyOperation |
When enabled, the current node name cannot be the same as other function node names. |
Example
This section uses Python 3.9 to demonstrate function implementation. The code and function are shown below. For detailed instructions on creating functions, see Creating a Function from Scratch.
import json def handler (event, context): input = event.get('input',0) return { "result": input }
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