The PATCH Rest Endpoint seems not able to modify a JOBP object (workflow) in order to set tasks within a workflow to inactive or breakpoint.
No matter what Body is sent in the request, the AE REST API returns:
{
"code": 45110,
"error": "An Automation Engine internal error occurred.",
"details": "No detail information available."
}
In the JCP Rest log we obtain:
20250211/112410.277 - 107 U00045098 Method 'PATCH', URL: 'https://REST_HOSTNAME:REST_PORT/ae/api/v1/CLIENT_NUMBER/objects/WORKFLOW_NAME', received from IP: '' 'User: USER/DEPT'
20250211/112410.308 - 107 U00045105 Log on of 'USER/DEPT' ('6609535') successful, client: 'CLIENT_NUMBER' (Connection='*CP006#00000046').
20250211/112410.324 - 107 U00003590 UCUDB - DB error: '23000', 'The DELETE statement conflicted with the REFERENCE constraint "FK_JPPA_JPP". The conflict occurred in database "AE_DB_NAME", table "dbo.JPPA".', '547', 'com.microsoft.sqlserver.jdbc.SQLServerException'
20250211/112410.324 - 107 SQL Statement which caused this DB error:
20250211/112410.324 - 107 U02012075 Set bind parameter '1' of type 'Integer' to value '1333170'
20250211/112410.324 - 107 DELETE FROM JPP WHERE JPP_OH_Idnr = ?
20250211/112410.324 - 107 U00045099 The server replied with following status: '500' SessionId: '6609535'
Automation Engine 24.x
Area: Rest API - Endpoint objects - method PATCH
Defect DE166101
Update to a fix version listed below or a newer version if available.
Fix version:
Component(s): Automation Engine
Will be fixed in Automation.Engine 24.4.1 - Planned release end June 2025
Will be fixed in Automation.Engine 24.5.0 - Planned release end June 2025
Use the PATCH endpoint with full object definition previously fetched and modified, like for example:
{
"data": {
"jobp": {
"metadata": {
"version": "24.4.0"
},
"rollback_definitions": {},
"workflow_attributes": {},
"workflow_definitions": [
{
"line_number": 1,
"object_type": "<START>",
"object_name": "START",
"active": 1
},
{
"line_number": 2,
"object_type": "JOBS",
"object_name": "A30_J_MUVIEWER",
"active": 1
},
{
"line_number": 3,
"object_type": "JOBS",
"object_name": "A30_J_MUVIEWER",
"active": 2
},
{
"line_number": 4,
"object_type": "<END>",
"object_name": "END",
"active": 1
}
],
"line_conditions": [
{
"workflow_line_number": 2,
"line_number": 1,
"predecessor_line_number": 1
},
{
"workflow_line_number": 3,
"line_number": 1,
"predecessor_line_number": 2
},
{
"workflow_line_number": 4,
"line_number": 1,
"predecessor_line_number": 3
}
]
}
},
"path": "TEST",
"client": 100
}
Defect Public Description: Patch Workflow object works with validation of changes and it updates dependent sub objects.