หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Cloud Data Center
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Domain Name Service
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
DataArts Fabric
Cloud Transformation
Cloud Adoption Framework
Well-Architected Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
CloudDevice
KooDrive
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Meeting
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Industry Video Management Service
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance

Creating a BPM

Updated on 2025-08-14 GMT+08:00

Function

This API is used to create a BPM.

URI

POST Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/metadata/definitions

Request Parameters

Table 1 Request parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Explanation

BPM name.

Constraints

None

Value range

Start with a letter and can contain only letters, digits, and single underscores (_). There is no consecutive underscore (_) and the value cannot end with an underscore (_). A maximum of 64 characters are allowed.

Default value

None

label

Yes

String

Explanation

BPM label.

Constraints

None

Value

1–80 characters

Default value

None

description

No

String

Explanation

BPM description.

Constraints

None

Value

None

Default value

None

version

No

String

Explanation

BPM version. When saving a BPM, you can save it as different versions. When enabling a BPM, you can select different versions. However, only one version can be enabled at a time.

Constraints

None

Value

None

Default value

None

instanceLabel

No

String

Explanation

Label of the BPM instance, which can contain system variables.

Constraints

None

Value

None

Default value

None

laneSet

No

object

Explanation

Lanes. A lane represents a user role in a BPM. Each lane in a BPM corresponds to a work queue. After a work queue is configured, diagram elements in different lanes are processed by users in different work queues. A work queue records a set of members with the same permissions and task objects.

Constraints

None

config

No

object

Explanation

The basic configuration in a BPM determines whether a process or task is private (viewable only by the current owner), whether the process can be canceled, and whether it can be canceled after passing through a BPM node.

Constraints

None

startEvents

No

Array of object

Explanation

Start diagram elements. The start diagram element, which serves as the start node of a BPM, includes properties such as the name of the next connected diagram element. Its default type is Start.

Constraints

None

dataMappers

No

Array of object

Explanation

Data mappings. The data mapping diagram element is used to assign values to variables, fields, properties, and constants. For example, you can use this diagram to assign the value of a variable or constant to another variable. When the Data Mapper activity is reached in the process, the value assignment operation is performed. After values are assigned, the BPM execution continues along the subsequent route.

Constraints

None

userTasks

No

Array of object

Explanation

User tasks. A user activity is used to indicate the work that is accomplished by the user in the BPM. When the engine reaches this node during processing, the engine creates a task item to be processed for a specified user (participant) or a group of users (for example, a working queue of a lane), and waits for the user to process the task item. You can configure the approval information, GUI rendering information, recipient information, pre- and post-actions, and data mapping of user tasks.

Constraints

None

serviceTasks

No

Array of object

Explanation

Automatic task definition, which is the collection of configuration information about the script diagram element, flow diagram element, record creation diagram element, record query diagram element, record update diagram element, record deletion diagram element, and email diagram element.

  • Script diagram element: You can use this diagram element to configure the input and output parameters of a script and execute a script in a BPM.
  • Flow diagram element: You can use this diagram element to execute a flow in a BPM.
  • Diagram element for recording adding, deletion, modification, and query: You can use these diagram elements to add, delete, modify, and query an object in a BPM.

Constraints

None

businessRuleTasks

No

Array of object

Explanation

Business rule tasks. This diagram element generates business rules based on the configuration in the decision table. Then, the system routes the messages to other element nodes based on the output connection gateway of the business rules. During the Business Rule task in the process, the system routes the messages to different route nodes according to the business rules. When using this diagram element, you need to select the decision table to be used.

Constraints

None

callActivities

No

Array of object

Explanation

Call activities. Other BPMs can be nested in a BPM. When Call Activity is reached in the BPM, the system automatically executes the activity (calls another BPM). After the activity is executed, the BPM execution continues along the subsequent route. You can configure the properties of other BPMs, for example, the input and output parameters of the selected BPM.

Constraints

None

subProcesses

No

Array of object

Explanation

Embedded subprocesses. The Call Activity and Sub Process diagram elements are embedded subprocesses of a BPM. The differences are as follows:

  • Call Activity regards the sub-process as a black box and calls the sub-process through parameter transfer.
  • If a sub-process is embedded, a sub-process is directly planned in the current BPM. The sub-process can share the variables of the parent process. It can be used to divide, encapsulate, and reuse process steps.

Constraints

None

sendEvents

No

Array of object

Explanation

Events to throw. When the Throw Signal event is reached during BPM execution, the engine sends an event to the system. Then, the BPM execution continues along the subsequent route. The thrown signal can be subscribed to and processed by the Signal Catch event. When using this element, you need to configure the specific event to be thrown, and configure event parameter in the Input Parameters area.

Constraints

None

catchEvents

No

Array of object

Explanation

Capture events, which include the configuration information of the Timer Catch diagram element and Signal Catch diagram element.

  • When the Timer Catch event is reached during BPM execution, the BPM is interrupted. The engine creates a timer. After the timer is triggered, the event ends and the BPM execution continues along the subsequent route. When using this element, you need to configure Base Time, Offset Time, and Offset Unit.
  • When the Signal Catch event is reached during the BPM execution, the BPM is interrupted. After the Throw Signal or the matched signal sent by APIs ends, the BPM execution continues along the subsequent route. When using this element, you need to configure Event, Event Conditions, and Outputs.

Constraints

None

exclusiveGateways

No

Array of object

Explanation

Exclusive gateways. An exclusive gateway is used to make a unique decision for a group of branches in a process. The system evaluates the branch that flows out of the gateway based on the condition order. The process executes the first branch whose connection condition is evaluated as true (when multiple conditions are evaluated as true, the first decision is executed) and does not evaluate the subsequent branches. If all branch condition decisions are false and the gateway defines a default connection, the default branch is executed. If no reachable branch is available, an exception is thrown and the process is interrupted.

Constraints

None

inclusiveGateways

No

Array of object

Explanation

Inclusive gateways. Inclusive gateways are a special type of parallel gateways. On the basis of parallel gateways, a condition can be configured for each connection line. All connection lines that meet the condition are executed in parallel. If no condition is met, the default branch is executed if it is configured. Each inclusive gateway should appear in pairs, starting from the inclusive divergent gateway and finally connecting to the aggregation gateway.

Constraints

None

parallelGateways

No

Array of object

Explanation

Parallel gateways. Parallel gateways are used to combine branches unconditionally. Such gateways ignore connection conditions. A BPM can have multiple incoming and one outgoing branches, which are concurrently executed by the BPM engine. The parallel gateway appears in pairs. A pair of gateways can have multiple parallel branches.

Constraints

None

eventGateways

No

Array of object

Explanation

Event gateways. Generally, the gateway determines the subsequent path based on the connection condition, which requires that the condition information exists in the process. However, if the conditions for selecting the subsequent path are not from the process, event-based gateways can be used. The event-based gateway has only the branch behavior. It allows the branch (such as a time event or message event) where the event reaches first to be selected from multiple candidate branches and the other branches to be cancelled.

Constraints

None

slas

No

Array of object

Explanation

SLA. SLA: You can also set an SLA timer for the user activity. If the timer expires, the urgency level is increased and the corresponding action is performed.

Constraints

None

constants

No

Array of object

Explanation

Constant definition, that is, constant information configured in Context.

Constraints

None

variables

No

Array of object

Explanation

Variable definition, that is, variable information configured in Context.

Constraints

None

endEvents

No

Array of object

Explanation

End event definition, indicating the natural end of a BPM or branch. If there are multiple execution branches, the BPM instance ends after the last branch ends naturally.

Constraints

None

Response Parameters

Table 2 Response parameters

Parameter

Type

Description

resCode

String

Explanation

Return code.

Value

If the request is successful, 0 is returned. For details about other error codes, see Error Codes.

resMsg

String

Explanation

Message returned.

Value

If the request is successful, "Success" is returned. In other cases, an error message is returned.

result

Object

Explanation

If the request is successful, an ID of the BPM instance is returned. If the request fails, an error and alarm information is returned.

Example Request

Create a BPM instance.
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/metadata/definitions

{
    "config": {
        "cancelable": false,
        "noCancelAfterElem": ""
    },
    "dataMappers": [
        {
            "assignmentItems": [
                {
                    "assignTo": "dateList",
                    "name": "",
                    "operator": "add",
                    "value": "2019-03-04",
                    "valueType": ""
                },
                {
                    "assignTo": "dateList",
                    "name": "",
                    "operator": "add",
                    "value": "2020-01-02",
                    "valueType": ""
                }
            ],
            "connector": "userTask",
            "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"points\":[\"619 125\",\"643 125\",\"662.5 125\",\"662.5 100\",\"682 100\",\"706 100\"]}",
            "description": "",
            "label": "Data Mapper",
            "locationX": 575,
            "locationY": 125,
            "name": "dataMapper",
            "connectors": []
        }
    ],
    "description": "",
    "label": "SimpleBP",
    "laneSet": {
        "label": "",
        "lanes": [
            {
                "elements": [
                    "userTask",
                    "userTask1",
                    "dataMapper",
                    "start"
                ],
                "height": 201.35220031738282,
                "label": "lane",
                "name": "lane",
                "role": "LoanRequest.Applicant",
                "width": 1080
            }
        ],
        "name": ""
    },
    "name": "SimpleBP",
    "slas": [
        {
            "active": true,
            "criteria": "",
            "deadlineDays": 0,
            "deadlineHours": 0,
            "deadlineIncreaseUrgencyBy": 2,
            "deadlineMinutes": 0,
            "deadlineOnlyBusinessDays": false,
            "goalActions": [
                {
                    "action": "",
                    "criteria": "{!IsMatched} && {!Owner}",
                    "name": "sla-act",
                    "type": "Notify Manager"
                }
            ],
            "goalDays": 0,
            "goalHours": 0,
            "goalIncreaseUrgencyBy": 1,
            "goalMinutes": 0,
            "goalOnlyBusinessDays": false,
            "label": "userTask1_sla",
            "name": "userTask1_sla",
            "startWhen": "",
            "variable": "",
            "actions": []
        },
        {
            "active": true,
            "criteria": "",
            "deadlineDays": 0,
            "deadlineHours": 0,
            "deadlineIncreaseUrgencyBy": 2,
            "deadlineMinutes": 0,
            "deadlineOnlyBusinessDays": false,
            "goalActions": [
                {
                    "action": "NotifyBPManager",
                    "criteria": "",
                    "name": "sla-act1",
                    "type": "Notify Manager"
                }
            ],
            "goalDays": 1,
            "goalHours": 0,
            "goalIncreaseUrgencyBy": 1,
            "goalMinutes": 0,
            "goalOnlyBusinessDays": false,
            "label": "userTask_sla",
            "name": "userTask_sla",
            "startWhen": "",
            "variable": "",
            "actions": []
        }
    ],
    "startEvents": [
        {
            "connector": "dataMapper",
            "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L0\",\"points\":[\"151.5 100\",\"175.5 100\",\"341.25 100\",\"341.25 110.5\",\"507 110.5\",\"531 110.5\"]}",
            "label": "Start",
            "locationX": 125,
            "locationY": 100,
            "name": "start",
            "type": "Start",
            "startType": "",
            "renderType": "",
            "render": "",
            "document": "",
            "description": ""
        }
    ],
    "userTasks": [
        {
            "approvalType": "Single",
            "connector": "userTask1",
            "connectorPoint": "{\"fromPort\":\"R1\",\"toPort\":\"L1\",\"points\":[\"794 100\",\"818 100\",\"875 100\",\"875 100\",\"932 100\",\"956 100\"]}",
            "description": "wuli desc",
            "groupAsSingleParticipant": false,
            "inputAssignments": [
                {
                    "input": "$Task.Title",
                    "name": "",
                    "value": "{!$GlobalConstant.EmptyString}",
                    "valueType": ""
                }
            ],
            "label": "User Task",
            "locationX": 750,
            "locationY": 100,
            "name": "userTask",
            "participants": [
                {
                    "type": "user",
                    "value": "ecommerce6"
                }
            ],
            "preActions": [
                {
                    "action": "{!$GlobalConstant.EmptyString}",
                    "criteria": "",
                    "name": "action",
                    "type": "Set Status"
                }
            ],
            "render": "SimpleBP$Form1$form",
            "renderType": "Form",
            "routeType": "Name and Expressions",
            "router": {
                "defaultRouteTo": "",
                "defaultRouteType": "",
                "name": ""
            },
            "title": "wu li tu cao",
            "usingSLA": "userTask_sla",
            "routeTo": "",
            "faultConnector": "",
            "boundaryEvents": [],
            "outputAssignments": [],
            "document": "",
            "priority": 3
        },
        {
            "approvalType": "Single",
            "groupAsSingleParticipant": false,
            "label": "User Task",
            "locationX": 1000,
            "locationY": 100,
            "name": "userTask1",
            "priority": 3,
            "render": "SimpleBP$ut1$form",
            "renderType": "Form",
            "routeType": "Last Assignee In Lane",
            "router": {
                "defaultRouteTo": "",
                "defaultRouteType": "",
                "name": ""
            },
            "title": "T2",
            "routeTo": "",
            "connector": "",
            "faultConnector": "",
            "boundaryEvents": [],
            "inputAssignments": [],
            "outputAssignments": [],
            "document": "",
            "description": ""
        }
    ],
    "variables": [
        {
            "currencyFactor": 0,
            "dataType": "checkBox",
            "defaultValue": "{!$GlobalConstant.True}",
            "defaultValueType": "",
            "description": "",
            "extNS": "",
            "extType": "",
            "isCollection": false,
            "isInput": false,
            "isNested": false,
            "isOutput": false,
            "name": "IsMatched"
        },
        {
            "currencyFactor": 0,
            "dataType": "text",
            "defaultValue": "Hello",
            "defaultValueType": "",
            "description": "",
            "extNS": "",
            "extType": "",
            "isCollection": false,
            "isInput": false,
            "isNested": false,
            "isOutput": false,
            "name": "Owner"
        },
        {
            "currencyFactor": 0,
            "dataType": "date",
            "defaultValue": "",
            "defaultValueType": "",
            "description": "",
            "extNS": "",
            "extType": "",
            "isCollection": false,
            "isInput": false,
            "isNested": false,
            "isOutput": false,
            "name": "dateVar"
        },
        {
            "currencyFactor": 0,
            "dataType": "date",
            "defaultValue": "",
            "defaultValueType": "",
            "description": "",
            "extNS": "",
            "extType": "",
            "isCollection": true,
            "isInput": false,
            "isNested": false,
            "isOutput": false,
            "name": "dateList"
        },
        {
            "currencyFactor": 0,
            "dataType": "extStruct",
            "defaultValue": "",
            "defaultValueType": "",
            "description": "",
            "extNS": "SimpleBP",
            "extType": "Form1Form",
            "isCollection": false,
            "isInput": false,
            "isNested": false,
            "isOutput": false,
            "name": "Form1Form"
        }
    ],
    "version": "1.0.1",
    
    "constants": [],
    "serviceTasks": [],
    "businessRuleTasks": [],
    "callActivities": [],
    "subProcesses": [],
    "endEvents": [],
    "sendEvents": [],
   
    "catchEvents": [],
    "exclusiveGateways": [],
    "parallelGateways": [],
    "eventGateways": [],
    
}

Example Response

{
    "resCode": "0",
    "resMsg": "Success",
    "result": {
        "errors": [],
        "id": "000y000000aM8XixTN0S",
        "warnings": []
    }
}

Status Code

See Status Codes.

Error Code

See Error Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback
咨询盘古Doer

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback