当前位置: 首页 > 工具软件 > Bonita > 使用案例 >

bonita BPM ----- BDM API

韩弘方
2023-12-01


BDM API

Access to the bdm REST API depends on the REST API authorization settings.


BusinessData

Description

Retrieve business data value. Depending on the object attribute loading policy, the API returns either the full object in JSON representation or the HATEOAS links to the object attributes.

获取业务数据。就是说通过该API可以访问到在bonita重建立的数据模型以及对象的属性。

Identifier

The fully qualified name (businessDataType) and the persistenceId of the business data (a long value).

Representation

Representation of object attributes with an always load policy:

{
  "persistenceId": _number_,
  "persistenceId_string": "_number_" 
  "persistenceVersion": _number_,
  "persistenceVersion_string": "_number_"
  "attributeName":_attributeType_
  ...
}

The string representation added in 7.0.1 for Long attributes is a workaround for the JavaScript integer spectrum issue.

HATEOAS representation of object attribute with a load when needed policy:

"links":[
   {
   "rel":_string_
   "href":_uri_
   }
]

Methods

The methods used for this resource are:

  • GET

发送命令:

GET http://localhost:15177/bonita/API/bdm/businessData/com.company.model.TravelRequest/1 HTTP/1.1
Host: localhost:15177
Connection: keep-alive
Accept: application/json, text/plain, */*
X-Bonita-API-Token: 98fa4033-860a-4488-be57-7b21d9930904
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.9.3.1000 Chrome/39.0.2146.0 Safari/537.36
DNT: 1
Referer: http://localhost:15177/bonita/portal.js/
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN
Cookie: JSESSIONID=0FF96AA79ED62D7E0C95B79B5B005011; bonita.tenant=1; X-Bonita-API-Token=98fa4033-860a-4488-be57-7b21d9930904; BOS_Locale=en

响应命令:

HTTP/1.1 200 OK
Date: Sat, 22 Oct 2016 03:33:43 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.3.1
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Content-Type: application/json;charset=UTF-8
Content-Length: 298

{"persistenceId":1,"persistenceId_string":"1","persistenceVersion":0,"persistenceVersion_string":"0","userId":4,"userId_string":"4","departureDate":1477526400000,"numberOfNights":7,"hotelNeeded":true,"destination":"shanghai","reason":"business for shanghai","status":"pending","refusalReason":null}

BusinessDataQuery

Description

The business data query REST API resource is used to call a default or custom business data query. It is available from version 6.5.

Identifier

../API/bdm/businessData/businessDataType?q=queryName

Representation

A JSON representation of the query result.

Methods

The methods used for this resource are:

  • GET - Call a named query


BusinessDataReference

Description

A business data reference is a link between the business data and the case. The reference can be either single or multiple depending on the process.  把业务数据与流程实例映射起来,通过该变量可以查询映射关系。

Identifier

The reference name (a string value).

Representation

Single reference:

{
  "name":"_string_",
  "type":"_string_",
  "storageId":_number_
  "storageId_string":"number"
}

Multiple reference:

{
  "name":"_string_",
  "type":"_string_",
  "storageIds":[number]
  "storageIds_string":["number"]
}

Methods

The methods used for this resource are:

  • GET












 类似资料:

相关阅读

相关文章

相关问答