forked from camunda/camunda-bpm-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openapi): add historic external task log
Related to CAM-12856
- Loading branch information
Showing
10 changed files
with
657 additions
and
0 deletions.
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
...e-rest-openapi/src/main/templates/lib/commons/historic-external-task-log-query-params.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query/index.html --> | ||
|
||
<#assign sortByValues = [ | ||
'"timestamp"', | ||
'"externalTaskId"', | ||
'"topicName"', | ||
'"workerId"', | ||
'"retries"', | ||
'"priority"', | ||
'"activityId"', | ||
'"activityInstanceId"', | ||
'"executionId"', | ||
'"processInstanceId"', | ||
'"processDefinitionId"', | ||
'"processDefinitionKey"', | ||
'"tenantId"' | ||
]> | ||
|
||
<#assign params = { | ||
"logId": { | ||
"type": "string", | ||
"desc": "Filter by historic external task log id." | ||
}, | ||
"externalTaskId": { | ||
"type": "string", | ||
"desc": "Filter by external task id." | ||
}, | ||
"topicName": { | ||
"type": "string", | ||
"desc": "Filter by an external task topic." | ||
}, | ||
"workerId": { | ||
"type": "string", | ||
"desc": "Filter by the id of the worker that the task was most recently locked by." | ||
}, | ||
"errorMessage": { | ||
"type": "string", | ||
"desc": "Filter by external task exception message." | ||
}, | ||
"activityIdIn": { | ||
"type": "array", | ||
"itemType": "string", | ||
"desc": "Only include historic external task logs which belong to one of the passed activity ids." | ||
}, | ||
"activityInstanceIdIn": { | ||
"type": "array", | ||
"itemType": "string", | ||
"desc": "Only include historic external task logs which belong to one of the passed activity | ||
instance ids." | ||
}, | ||
"executionIdIn": { | ||
"type": "array", | ||
"itemType": "string", | ||
"desc": "Only include historic external task logs which belong to one of the passed execution ids." | ||
}, | ||
"processInstanceId": { | ||
"type": "string", | ||
"desc": "Filter by process instance id." | ||
}, | ||
"processDefinitionId": { | ||
"type": "string", | ||
"desc": "Filter by process definition id." | ||
}, | ||
"processDefinitionKey": { | ||
"type": "string", | ||
"desc": "Filter by process definition key." | ||
}, | ||
"tenantIdIn": { | ||
"type": "array", | ||
"itemType": "string", | ||
"desc": "Only include historic external task log entries which belong to one of the passed and | ||
comma-separated tenant ids." | ||
}, | ||
"withoutTenantId": { | ||
"type": "boolean", | ||
"desc": "Only include historic external task log entries that belong to no tenant. Value may only | ||
be `true`, as `false` is the default behavior." | ||
}, | ||
"priorityLowerThanOrEquals": { | ||
"type": "integer", | ||
"format": "int64", | ||
"desc": "Only include logs for which the associated external task had a priority lower than or | ||
equal to the given value. Value must be a valid `long` value." | ||
}, | ||
"priorityHigherThanOrEquals": { | ||
"type": "integer", | ||
"format": "int64", | ||
"desc": "Only include logs for which the associated external task had a priority higher than or | ||
equal to the given value. Value must be a valid `long` value." | ||
}, | ||
"creationLog": { | ||
"type": "boolean", | ||
"desc": "Only include creation logs. Value may only be `true`, as `false` is the default behavior." | ||
}, | ||
"failureLog": { | ||
"type": "boolean", | ||
"desc": "Only include failure logs. Value may only be `true`, as `false` is the default behavior." | ||
}, | ||
"successLog": { | ||
"type": "boolean", | ||
"desc": "Only include success logs. Value may only be `true`, as `false` is the default behavior." | ||
}, | ||
"deletionLog": { | ||
"type": "boolean", | ||
"desc": "Only include deletion logs. Value may only be `true`, as `false` is the default behavior." | ||
} | ||
}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
...n/templates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogDto.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query/index.html --> | ||
<#macro dto_macro docsUrl=""> | ||
<@lib.dto > | ||
|
||
<@lib.property | ||
name = "id" | ||
type = "string" | ||
desc = "The id of the log entry." | ||
/> | ||
|
||
<@lib.property | ||
name = "externalTaskId" | ||
type = "string" | ||
desc = "The id of the external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "timestamp" | ||
type = "string" | ||
format = "date-time" | ||
desc = "The time when the log entry has been written." | ||
/> | ||
|
||
<@lib.property | ||
name = "topicName" | ||
type = "string" | ||
desc = "The topic name of the associated external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "workerId" | ||
type = "string" | ||
desc = "The id of the worker that posessed the most recent lock." | ||
/> | ||
|
||
<@lib.property | ||
name = "retries" | ||
type = "integer" | ||
format = "int32" | ||
desc = "The number of retries the associated external task has left." | ||
/> | ||
|
||
<@lib.property | ||
name = "priority" | ||
type = "integer" | ||
format = "int64" | ||
desc = "The execution priority the external task had when the log entry was created." | ||
/> | ||
|
||
<@lib.property | ||
name = "errorMessage" | ||
type = "string" | ||
desc = "The message of the error that occurred by executing the associated external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "activityId" | ||
type = "string" | ||
desc = "The id of the activity on which the associated external task was created." | ||
/> | ||
|
||
<@lib.property | ||
name = "activityInstanceId" | ||
type = "string" | ||
desc = "The id of the activity instance on which the associated external task was created." | ||
/> | ||
|
||
<@lib.property | ||
name = "executionId" | ||
type = "string" | ||
desc = "The execution id on which the associated external task was created." | ||
/> | ||
|
||
<@lib.property | ||
name = "processInstanceId" | ||
type = "string" | ||
desc = "The id of the process instance on which the associated external task was created." | ||
/> | ||
|
||
<@lib.property | ||
name = "processDefinitionId" | ||
type = "string" | ||
desc = "The id of the process definition which the associated external task belongs to." | ||
/> | ||
|
||
<@lib.property | ||
name = "processDefinitionKey" | ||
type = "string" | ||
desc = "The key of the process definition which the associated external task belongs to." | ||
/> | ||
|
||
<@lib.property | ||
name = "tenantId" | ||
type = "string" | ||
desc = "The id of the tenant that this historic external task log entry belongs to." | ||
/> | ||
|
||
<@lib.property | ||
name = "creationLog" | ||
type = "boolean" | ||
desc = "A flag indicating whether this log represents the creation of the associated | ||
external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "failureLog" | ||
type = "boolean" | ||
desc = "A flag indicating whether this log represents the failed execution of the | ||
associated external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "successLog" | ||
type = "boolean" | ||
desc = "A flag indicating whether this log represents the successful execution of the | ||
associated external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "deletionLog" | ||
type = "boolean" | ||
desc = "A flag indicating whether this log represents the deletion of the associated | ||
external task." | ||
/> | ||
|
||
<@lib.property | ||
name = "removalTime" | ||
type = "string" | ||
format = "date-time" | ||
desc = "The time after which this log should be removed by the History Cleanup job. Default | ||
format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`. For further information, please see the [documentation](${docsUrl}/reference/rest/overview/date-format/)" | ||
/> | ||
|
||
<@lib.property | ||
name = "rootProcessInstanceId" | ||
type = "string" | ||
desc = "The process instance id of the root process instance that initiated the process | ||
containing this log." | ||
last = true | ||
/> | ||
|
||
</@lib.dto> | ||
</#macro> |
19 changes: 19 additions & 0 deletions
19
...plates/models/org/camunda/bpm/engine/rest/dto/history/HistoricExternalTaskLogQueryDto.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/post-external-task-log-query/index.html --> | ||
<#macro dto_macro docsUrl=""> | ||
<@lib.dto desc = "A Historic External Task Log instance query which defines a list of Historic External Task Log instances"> | ||
|
||
<#include "/lib/commons/historic-external-task-log-query-params.ftl"> | ||
<@lib.properties params/> | ||
"sorting": { | ||
"type": "array", | ||
"description": "An array of criteria to sort the result by. Each element of the array is | ||
an object that specifies one ordering. The position in the array | ||
identifies the rank of an ordering, i.e., whether it is primary, secondary, | ||
etc. Sorting has no effect for `count` endpoints.", | ||
"items": | ||
<#assign last = true> | ||
<#include "/lib/commons/sort-props.ftl"> | ||
} | ||
|
||
</@lib.dto> | ||
</#macro> |
51 changes: 51 additions & 0 deletions
51
...rest/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/get.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/get-external-task-log-query-count/index.html --> | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
<@lib.endpointInfo | ||
id = "getHistoricExternalTaskLogsCount" | ||
tag = "Historic External Task Log" | ||
summary = "Get External Task Log Count" | ||
desc = "Queries for the number of historic external task logs that fulfill the given | ||
parameters. | ||
Takes the same parameters as the | ||
[Get External Task Logs](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query/) | ||
method." | ||
/> | ||
|
||
"parameters" : [ | ||
|
||
<#assign last = true > | ||
<#include "/lib/commons/historic-external-task-log-query-params.ftl" > | ||
<@lib.parameters | ||
object = params | ||
last = last | ||
/> | ||
|
||
], | ||
|
||
"responses": { | ||
|
||
<@lib.response | ||
code = "200" | ||
dto = "CountResultDto" | ||
desc = "Request successful." | ||
examples = ['"example-1": { | ||
"summary": "GET `/history/external-task-log/count?externalTaskId=anExternalTaskId`", | ||
"description": "GET `/history/external-task-log/count?externalTaskId=anExternalTaskId`", | ||
"value": { | ||
"count": 1 | ||
} | ||
}'] | ||
/> | ||
|
||
<@lib.response | ||
code = "400" | ||
dto = "ExceptionDto" | ||
desc = "Returned if some of the query parameters are invalid." | ||
last = true | ||
/> | ||
|
||
} | ||
|
||
} | ||
</#macro> |
55 changes: 55 additions & 0 deletions
55
...est/engine-rest-openapi/src/main/templates/paths/history/external-task-log/count/post.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/external-task-log/post-external-task-log-query-count/index.html --> | ||
<#macro endpoint_macro docsUrl=""> | ||
{ | ||
<@lib.endpointInfo | ||
id = "queryHistoricExternalTaskLogsCount" | ||
tag = "Historic External Task Log" | ||
summary = "Get External Task Log Count (POST)" | ||
desc = "Queries for the number of historic external task logs that fulfill the given | ||
parameters. | ||
This method takes the same message body as the | ||
[Get External Task Logs (POST)](${docsUrl}/reference/rest/history/external-task-log/post-external-task-log-query/) | ||
method and therefore it is slightly more powerful than the | ||
[Get External Task Log Count](${docsUrl}/reference/rest/history/external-task-log/get-external-task-log-query-count/) | ||
method." | ||
/> | ||
|
||
<@lib.requestBody | ||
mediaType = "application/json" | ||
dto = "HistoricExternalTaskLogQueryDto" | ||
examples = ['"example-1": { | ||
"summary": "POST `/history/external-task-log/count`", | ||
"value": { | ||
"externalTaskId": "anExternalTaskId" | ||
} | ||
}'] | ||
/> | ||
|
||
"responses": { | ||
|
||
<@lib.response | ||
code = "200" | ||
dto = "CountResultDto" | ||
desc = "Request successful." | ||
examples = ['"example-1": { | ||
"summary": "POST `/history/external-task-log/count`", | ||
"description": "POST `/history/external-task-log/count`", | ||
"value": { | ||
"count": 1 | ||
} | ||
}'] | ||
/> | ||
|
||
<@lib.response | ||
code = "400" | ||
dto = "ExceptionDto" | ||
desc = "Returned if some of the query parameters are invalid. See the | ||
[Introduction](${docsUrl}/reference/rest/overview/#error-handling) | ||
for the error response format." | ||
last = true | ||
/> | ||
|
||
} | ||
|
||
} | ||
</#macro> |
Oops, something went wrong.