Skip to content

Commit

Permalink
feat(openapi): add historic process definition endpoints
Browse files Browse the repository at this point in the history
related to CAM-11566
  • Loading branch information
tmetzke authored May 5, 2021
1 parent fbe6ea2 commit f89eacf
Show file tree
Hide file tree
Showing 8 changed files with 493 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-historic-activity-statistics-query/index.html -->

<#assign sortByValues = [
'"activityId"'
]>

<#assign defaultDateFormat = "By [default](${docsUrl}/reference/rest/overview/date-format/),
the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`,
e.g., `2013-01-23T14:42:45.000+0200`." >

<#assign params = {
"canceled": {
"type": "boolean",
"desc": "Whether to include the number of canceled activity instances in the result or not. Valid
values are `true` or `false`. Default: `false`."
},
"finished": {
"type": "boolean",
"desc": "Whether to include the number of finished activity instances in the result or not. Valid
values are `true` or `false`. Default: `false`."
},
"completeScope": {
"type": "boolean",
"desc": "Whether to include the number of activity instances which completed a scope in the result
or not. Valid values are `true` or `false`. Default: `false`."
},
"incidents": {
"type": "boolean",
"desc": "Whether to include the number of incidents. Valid values are `true` or `false`. Default: `false`."
},
"startedBefore": {
"type": "string",
"format": "date-time",
"desc": "Restrict to process instances that were started before the given date. ${defaultDateFormat}"
},
"startedAfter": {
"type": "string",
"format": "date-time",
"desc": "Restrict to process instances that were started after the given date. ${defaultDateFormat}"
},
"finishedBefore": {
"type": "string",
"format": "date-time",
"desc": "Restrict to process instances that were finished before the given date. ${defaultDateFormat}"
},
"finishedAfter": {
"type": "string",
"format": "date-time",
"desc": "Restrict to process instances that were finished after the given date. ${defaultDateFormat}"
},
"processInstanceIdIn": {
"type": "array",
"itemType": "string",
"desc": "Restrict to process instances with the given IDs. The IDs must be provided as a comma-
separated list."
}
}>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html -->

<#assign sortByValues = [
'"finished"'
]>

<#assign params = {
"processDefinitionIdIn": {
"type": "array",
"itemType": "string",
"desc": "Filter by process definition ids. Must be a comma-separated list of process definition ids."
},
"processDefinitionKeyIn": {
"type": "array",
"itemType": "string",
"desc": "Filter by process definition keys. Must be a comma-separated list of process definition keys."
},
"tenantIdIn": {
"type": "array",
"itemType": "string",
"desc": "Filter by a comma-separated list of tenant ids. A process definition must have one of the given
tenant ids."
},
"withoutTenantId": {
"type": "boolean",
"desc": "Only include process definitions which belong to no tenant. Value may only be `true`, as
`false` is the default behavior."
},
"compact": {
"type": "boolean",
"desc": "Only include process instances which have more than zero finished instances. Value may
only be `true`, as `false` is the default behavior."
}
}>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
{"name": "Historic Decision Requirements Definition"},
{"name": "Historic Incident"},
{"name": "Historic Job Log"},
{"name": "Historic Process Definition"},
{"name": "Historic Process Instance"},
{"name": "Historic Task Instance"},
{"name": "History Cleanup"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html -->
<#macro dto_macro docsUrl="">
<@lib.dto >

<@lib.property
name = "processDefinitionId"
type = "string"
desc = "The id of the process definition."
/>

<@lib.property
name = "processDefinitionKey"
type = "string"
desc = "The key of the process definition."
/>

<@lib.property
name = "processDefinitionName"
type = "string"
desc = "The name of the process definition."
/>

<@lib.property
name = "processDefinitionVersion"
type = "integer"
format = "int32"
desc = "The version of the process definition."
/>

<@lib.property
name = "historyTimeToLive"
type = "integer"
format = "int32"
desc = "The history time to live of the process definition."
/>

<@lib.property
name = "finishedProcessInstanceCount"
type = "integer"
format = "int64"
desc = "The count of the finished historic process instances."
/>

<@lib.property
name = "cleanableProcessInstanceCount"
type = "integer"
format = "int64"
desc = "The count of the cleanable historic process instances, referring to history time to
live."
/>

<@lib.property
name = "tenantId"
type = "string"
desc = "The tenant id of the process definition."
last = true
/>

</@lib.dto>
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-historic-activity-statistics-query/index.html -->
<#macro dto_macro docsUrl="">
<@lib.dto >

<@lib.property
name = "id"
type = "string"
desc = "The id of the activity the results are aggregated for."
/>

<@lib.property
name = "instances"
type = "integer"
format = "int64"
desc = "The total number of all running instances of the activity."
/>

<@lib.property
name = "canceled"
type = "integer"
format = "int64"
desc = "The total number of all canceled instances of the activity. **Note:** Will be `0`
(not `null`), if canceled activity instances were excluded."
/>

<@lib.property
name = "finished"
type = "integer"
format = "int64"
desc = "The total number of all finished instances of the activity. **Note:** Will be `0`
(not `null`), if finished activity instances were excluded."
/>

<@lib.property
name = "completeScope"
type = "integer"
format = "int64"
desc = "The total number of all instances which completed a scope of the activity.
**Note:** Will be `0` (not `null`), if activity instances which
completed a scope were excluded."
/>

<@lib.property
name = "openIncidents"
type = "integer"
format = "int64"
desc = "The total number of open incidents for the activity. **Note:** Will be `0` (not
`null`), if `incidents` is set to `false`."
/>

<@lib.property
name = "resolvedIncidents"
type = "integer"
format = "int64"
desc = "The total number of resolved incidents for the activity. **Note:** Will be `0` (not
`null`), if `incidents` is set to `false`."
/>

<@lib.property
name = "deletedIncidents"
type = "integer"
format = "int64"
desc = "The total number of deleted incidents for the activity. **Note:** Will be `0` (not
`null`), if `incidents` is set to `false`."
last = true
/>

</@lib.dto>
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query-count/index.html -->
<#macro endpoint_macro docsUrl="">
{
<@lib.endpointInfo
id = "getCleanableHistoricProcessInstanceReportCount"
tag = "Historic Process Definition"
summary = "Get Cleanable Process Instance Report Count"
desc = "Queries for the number of report results about a process definition and finished
process instances relevant to history cleanup (see
[History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup)).
Takes the same parameters as the
[Get Cleanable Process Instance Report](${docsUrl}/reference/rest/history/process-definition/get-cleanable-process-instance-report/)
method."
/>

"parameters" : [

<#assign last = true >
<#include "/lib/commons/history-process-definition-process-instance-report.ftl" >
<@lib.parameters
object = params
last = last
/>

],

"responses": {

<@lib.response
code = "200"
dto = "CountResultDto"
desc = "Request successful."
examples = ['"example-1": {
"summary": "GET `/history/process-definition/cleanable-process-instance-report/count`",
"description": "GET `/history/process-definition/cleanable-process-instance-report/count`",
"value": {
"count": 1
}
}']
/>

<@lib.response
code = "500"
dto = "ExceptionDto"
desc = "See the
[Introduction](${docsUrl}/reference/rest/overview/#error-handling)
for the error response format."
last = true
/>

}

}
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/history/process-definition/get-cleanable-process-instance-report-query/index.html -->
<#macro endpoint_macro docsUrl="">
{
<@lib.endpointInfo
id = "getCleanableHistoricProcessInstanceReport"
tag = "Historic Process Definition"
summary = "Get Cleanable Process Instance Report"
desc = "Retrieves a report about a process definition and finished process instances
relevant to history cleanup (see
[History cleanup](${docsUrl}/user-guide/process-engine/history/#history-cleanup))
so that you can tune the history time to live.
These reports include the count of the finished historic process
instances, cleanable process instances and basic process definition
data - id, key, name and version.
The size of the result set can be retrieved by using the
[Get Cleanable Process Instance Report Count](${docsUrl}/reference/rest/history/process-definition/get-cleanable-process-instance-report-count/)
method."
/>

"parameters" : [

<#assign last = false >
<#include "/lib/commons/history-process-definition-process-instance-report.ftl" >
<@lib.parameters
object = params
last = last
/>
<#include "/lib/commons/sort-params.ftl">
<#assign last = true >
<#include "/lib/commons/pagination-params.ftl">

],

"responses": {

<@lib.response
code = "200"
dto = "CleanableHistoricProcessInstanceReportResultDto"
array = true
desc = "Request successful."
examples = ['"example-1": {
"summary": "GET `/history/process-definition/cleanable-process-instance-report`",
"description": "GET `/history/process-definition/cleanable-process-instance-report`",
"value": [
{
"processDefinitionId": "invoice:1:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
"processDefinitionKey": "invoice",
"processDefinitionName": "Invoice Receipt",
"processDefinitionVersion": 1,
"historyTimeToLive": 5,
"finishedProcessInstanceCount": 100,
"cleanableProcessInstanceCount": 53,
"tenantId": "aTenantId"
},
{
"processDefinitionId": "invoice:2:7bf79f13-ef95-11e6-b6e6-34f39ab71d4e",
"processDefinitionKey": "invoice",
"processDefinitionName": "Invoice Receipt v2.0",
"processDefinitionVersion": 2,
"historyTimeToLive": 5,
"finishedProcessInstanceCount": 1000,
"cleanableProcessInstanceCount": 13,
"tenantId": "aTenantId"
}
]
}']
/>

<@lib.response
code = "500"
dto = "ExceptionDto"
desc = "See the
[Introduction](${docsUrl}/reference/rest/overview/#error-handling)
for the error response format."
last = true
/>

}

}
</#macro>
Loading

0 comments on commit f89eacf

Please sign in to comment.