Help Center/ Huawei Cloud Astro Zero/ API Reference/ APIs/ BPMs/ Suspending, Resuming, or Terminating a BPM Instance
Updated on 2025-08-14 GMT+08:00

Suspending, Resuming, or Terminating a BPM Instance

Function

This API is used to suspend, resume, or terminate a BPM instance. After a BPM instance is suspended, it will not be displayed in the to-do task list, the SLA timer stops, and no follow-up reminder will be sent. After a BPM instance is resumed, the system proceeds with subsequent operations. After a BPM instance is terminated, the BPM instance is forcibly stopped and you can view the BPM instance only in the historical task list.

URI

PUT Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/runtime/instances/{instance_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Explanation

ID of a BPM instance, which can be obtained by invoking the API for Querying a BPM Instance (id in the response message).

Constraints

None

Value

None

Default value

None

Request Parameters

Table 2 Request parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Explanation

Name of the action to be taken for the BPM instance.

Constraints

None

Value

  • suspend: Suspend a BPM instance.
  • resume: Resume a BPM instance.
  • terminate: Terminate a BPM instance.

Default value

None

Response Parameters

Table 3 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, the running information about the BPM instance after being started will be returned.

Example Request

To suspend a running BPM instance whose ID is 002N000000Q3QW4IMAOO, send the following request:
PUT https://Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/runtime/instances/002N000000Q3QW4IMAOO
    
{
    "action": "suspend"
}

Example Response

In the response, the value of suspended of the BPM instance is true.

{
    "resCode":"0",
    "resMsg":"Success",
    "result":{
        "name":"SimpleBP",
        "version":"1.0.1",
        "id":"002N000000Q3QW4IMAOO",
        "processDefID":"001L000000Peuw1Q318a",
        "interviewLabel":"SimpleBP 2019-05-10 15:14:09",
        "nextElem":"",
        "isTest":true,
        "state":"New",
        "bpStatus":"New",
        "urgency":0,
        "taskOutcome":"",
        "businessKey":"002N000000Q3QW4IMAOO",
        "startTime":"2019-05-10 15:14:09",
        "endTime":"",
        "Ext1":"",
        "Ext2":"",
        "Ext3":"",
        "Ext4":"",
        "Ext5":"",
        "Ext6":"",
        "Ext7":0,
        "Ext8":0,
        "suspended":true,
        "isClosed":false
    }
}

Status Code

See Status Codes.

Error Code

See Error Codes.