Business logic editor

更新时间:
复制 MD 格式

The Business Logic Editor lets you quickly design simple IoT business logic by orchestrating service nodes.

Create a business service

  1. Create a project. For more information, see general-purpose project.

  2. On the project Home page, under Project Development, click the Business Logic tab.

  3. Above the service list, click New > Create Blank Business Service.

  4. In the New Business Service dialog box, configure the following parameters.

    Parameter

    Description

    Business service name

    A unique identifier for the business service within the project.

    The name can contain Chinese characters, letters, digits, underscores (_), hyphens (-), and parentheses (). It must start with a Chinese character, letter, or digit, and must not exceed 30 characters. Each Chinese character counts as one character.

    Description

    A description of the service, limited to 100 characters.

  5. Click Confirm.

    After you create the business service, the Business Logic Editor opens automatically. The editor interface consists of a vertical icon navigation bar on the far left for accessing documentation, lists, and settings; the Service List panel to its right, which includes a + (Add) button and a search function; and the main editing area on the right, which displays open services in tabs.

Left navigation bar

Function

Description

Service

Select Service to display all business services in the project.

  • Click the icons to the right of the Service List title:

    • 新增服务: Creates a new business service.

    • 发布所有服务: Releases all services to the production environment.

      Note

      This feature is available only after all services in the current project have been deployed.

  • Click the 设置 icon next to a service name to copy, release, deploy and debug, or delete the service. You can also edit its basic information and view its call instructions.

    Note
    • Only device-triggered services support the start and stop features.

    • Call instructions are available only for HTTP services.

Node

Select Node to display the node list. You can enter a node name to search for a specific node.

Service call settings

For HTTP services only, this feature lets you view the API call method and configure a domain name.

Canvas

The center of the editor is the canvas, where you build business logic by adding and connecting service nodes.

Important

A node can have multiple output nodes but only one input node.

  • Right-click a blank area of the canvas to access options such as paste, reset canvas size, and show global log.

  • Right-click a node on the canvas to access options such as cut, copy, and view node log.

  • From left to right, the controls at the bottom of the canvas perform the following actions:

    Function

    Description

    缩小

    Zooms out the canvas. The current zoom level is displayed to the right.

    扩大

    Zooms in the canvas. The current zoom level is displayed to the left.

    左侧栏

    Shows or hides the left navigation bar.

    日志栏

    Shows or hides the bottom log pane.

    右侧配置栏

    Shows or hides the right-side configuration pane.

Right-side configuration pane

When you click a service node on the canvas, its configuration pane appears on the right.

Function

Description

Node configuration

Configure the parameters for the node. For more information, see the documentation for each node in the Nodes section.

Node log

After deploying and debugging the service, click the Node log tab to view structured log information.

Top toolbar

The controls on the top toolbar, from left to right, perform the following actions:

Function

Description

导航

Hover over this icon to expand the project overview. You can view and update the services, products, and devices in the project.

  • Click View All Projects to go to the IoT Studio Project Management page.

  • Click View All to go to the details page of the project that contains the current business service.

To the right of the icon, the current service and project names are displayed in the format: <Project Name>-<Service Name>.

变量配置

Configures global or local variables. For more information, see variable configuration.

回滚

Reverts the business service to its released version in the production environment, discarding all current changes.

撤销

Undoes the previous action.

整理节点位置

Automatically arranges all nodes on the canvas.

保存

Saves the current configuration. The system also autosaves every minute.

部署

Deploys, starts, and debugs the current business service.

发布

Releases the configured service to the production environment.

帮助

Opens the service development documentation.

工单

Submits a ticket.