Service Elements Usage Scenarios
Where service functions are used
Service functions can be invoked anywhere function logic can be implemented, including page functions, page events, frontend component event handlers, task execution functions, model events, approval events, custom events, AI assistant events, AI Agent tool invocation events, and within other service functions themselves.
Additionally, service functions can be invoked by large language models when configured as AI Agent tools, called from AI assistant function nodes, and exposed to external systems via API authorization elements.
Helping AI understand service functions accurately
Every service function includes a declaration in the service element's e.json file as part of the functionList. This functionList serves multiple purposes: it enables the IDE's visual editor to recognize functions for visual logic orchestration, ensures functions can be invoked correctly, and allows AI to understand and utilize them effectively.
Providing complete and accurate function names, descriptive parameter names (both input and output), and clear function descriptions helps AI comprehend function capabilities and usage patterns more precisely, resulting in more accurate function invocations.
The visual editor makes it easy for developers to specify function names, define input and output parameters, and write function descriptions. The platform automatically generates the functionList in the service element's e.json file based on these configurations.
According to the JAAP specification, any element—not just service elements—can define its own functionList.