Create new v2 BuinessService.
POST
/businessservice/v2/_createLast modified: 9 months ago
To create new workflow configuration(BuinessService) in the system. API supports bulk creation with max limit as defined in the BuinessService Request. Please note that either whole batch succeeds or fails, there's no partial batch success. To create one BuinessService, please pass array with one BuinessService object.
Following Conditions are applied -
- All actions have valid next state i.e next state should be present in the system
- uuids will be auto generated and assigned to all sub objects
- For end states isTerminateState should be true
Request
Header Params
Content-Type
string
optional
Example:
application/json
Body Params text/plain
Example:{
"RequestInfo": {
"apiId": null,
"ver": null,
"ts": null,
"action": "POST",
"did": null,
"key": null,
"msgId": "5bfa85e7-dfa1-47c8-98b2-747bf552be86",
"authToken": "50b80fa6-bec2-438e-a168-ce5ad53770b5"
},
"BusinessServices": [
{
"tenantId": "pg",
"businessService": "WaterManegament7",
"business": "work",
"businessServiceSla": 123,
"states": [
{
"sla": 1234,
"state": null,
"applicationStatus":null ,
"docUploadRequired": false,
"isStartState": true,
"isTerminateState": false,
"isStateUpdatable": true,
"actions": [
{
"action": "APPLY",
"nextState": "PENDINGFORASSIGNMENT",
"roles": [
"CITIZEN"
]
}
]
},
{
"sla": null,
"state": "PENDINGFORASSIGNMENT",
"applicationStatus": "PENDINGFORASSIGNMENT",
"docUploadRequired": false,
"isStartState": false,
"isTerminateState": false,
"isStateUpdatable": false,
"actions": [
{
"action": "ASSIGN",
"nextState": "PENDINGATLME",
"roles": [
"EMPLOYEE"
]
}
]
},
{
"sla": null,
"state": "PENDINGATLME",
"applicationStatus": "PENDINGATLME",
"isStateUpdatable": false,
"docUploadRequired": false,
"isStartState": false,
"isTerminateState": true
}
]
}
]
}
Request samples
Responses
BusinessService(s) created successfully(201)
BusinessService(s) creation failed(400)
BusinessService(s) created successfully
HTTP Code: 201
Content Type : JSONapplication/json
Data Schema
ResponseInfo
object
optional
BusinessService
array[object (BusinessService) {9}]
optional
Used for search result and create only
tenantId
string
required
Unique Identifier of ULB
>= 2 characters<= 256 characters
uuid
string
optional
Unique Identifier uuid
>= 2 characters<= 256 characters
businessService
string
required
Unique name of business service
>= 2 characters<= 256 characters
business
string
required
<= 256 characters
getUri
string
optional
>= 2 characters<= 1024 characters
postUri
string
optional
>= 2 characters<= 1024 characters
businessServiceSla
integer <int64>
optional
states
array[object (State) {12}]
required
auditDetails
object
optional
Example
{
"ResponseInfo": {},
"BusinessService": [
{
"tenantId": "string",
"uuid": "string",
"businessService": "string",
"business": "string",
"getUri": "string",
"postUri": "string",
"businessServiceSla": 0,
"states": [
{
"uuid": "string",
"tenantId": "string",
"businessServiceId": "string",
"sla": 0,
"state": "string",
"applicationStatus": "string",
"docUploadRequired": true,
"isStartState": true,
"isTerminateState": true,
"isStateUpdatable": true,
"actions": [
{
"uuid": "string",
"tenantId": "string",
"currentState": "string",
"action": "string",
"nextState": "string",
"roles": [
"string"
],
"active": true,
"auditDetails": {}
}
],
"auditDetails": {}
}
],
"auditDetails": {}
}
]
}
Last modified: 9 months ago