Skip to content

Commit

Permalink
feat(openapi): add historic external task log
Browse files Browse the repository at this point in the history
Related to CAM-12856
  • Loading branch information
yT0n1 authored May 5, 2021
1 parent f89eacf commit db55b8d
Show file tree
Hide file tree
Showing 10 changed files with 657 additions and 0 deletions.
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."
}
}>
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
{"name": "Historic Decision Definition"},
{"name": "Historic Decision Instance"},
{"name": "Historic Decision Requirements Definition"},
{"name": "Historic External Task Log"},
{"name": "Historic Incident"},
{"name": "Historic Job Log"},
{"name": "Historic Process Definition"},
Expand Down
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>
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>
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>
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>
Loading

0 comments on commit db55b8d

Please sign in to comment.