From c06a0978e61b40e537f4b45c279adac2e67d6667 Mon Sep 17 00:00:00 2001 From: Christopher Welsch Date: Tue, 18 Jun 2024 11:52:13 +0200 Subject: [PATCH] documentation fixes --- .../caze/CaseInstanceVariableCollectionResource.java | 12 ++++++------ .../runtime/caze/CaseInstanceVariableResource.java | 4 ++-- .../process/BaseExecutionVariableResource.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableCollectionResource.java b/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableCollectionResource.java index d1ec8456eef..ef1be9213e6 100644 --- a/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableCollectionResource.java +++ b/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableCollectionResource.java @@ -46,7 +46,7 @@ public class CaseInstanceVariableCollectionResource extends BaseVariableResource { @ApiOperation(value = "List variables for a case instance", nickname="listCaseInstanceVariables", tags = {"Case Instance Variables" }, - notes = "In case the variable is a binary variable or serializable, the valueUrl points to an URL to fetch the raw value. If it’s a plain variable, the value is present in the response. Note that only local scoped variables are returned, as there is no global scope for process-instance variables.") + notes = "In case the variable is a binary variable or serializable, the valueUrl points to an URL to fetch the raw value. If it’s a plain variable, the value is present in the response. Note that only local scoped variables are returned, as there is no global scope for case-instance variables.") @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the case instance was found and variables are returned."), @ApiResponse(code = 400, message = "Indicates the requested case instance was not found.") @@ -60,12 +60,12 @@ public List getVariables(@ApiParam(name = "caseInstanceId") @PathV @ApiOperation(value = "Update a multiple/single (non)binary variable on a case instance", tags = { "Case Instance Variables" }, nickname = "createOrUpdateCaseVariable", notes = "This endpoint can be used in 2 ways: By passing a JSON Body (RestVariable or an array of RestVariable) or by passing a multipart/form-data Object.\n" - + "Nonexistent variables are created on the process-instance and existing ones are overridden without any error.\n" + + "Nonexistent variables are created on the case-instance and existing ones are overridden without any error.\n" + "Any number of variables can be passed into the request body array.\n" - + "Note that scope is ignored, only local variables can be set in a case instance.\n" + + "Note that scope is ignored, only global variables can be set in a case instance.\n" + "NB: Swagger V2 specification doesn't support this use case that is why this endpoint might be buggy/incomplete if used with other tools.") @ApiImplicitParams({ - @ApiImplicitParam(name = "body", type = "org.flowable.rest.cmmn.service.api.engine.variable.RestVariable", value = "Create a variable on a process instance", paramType = "body", example = "{\n" + + @ApiImplicitParam(name = "body", type = "org.flowable.rest.cmmn.service.api.engine.variable.RestVariable", value = "Create a variable on a case instance", paramType = "body", example = "{\n" + " \"name\":\"intProcVar\"\n" + " \"type\":\"integer\"\n" + " \"value\":123,\n" + @@ -90,9 +90,9 @@ public Object createOrUpdateExecutionVariable(@ApiParam(name = "caseInstanceId") @ApiOperation(value = "Create variables or new binary variable on a case instance", tags = { "Case Instance Variables" }, nickname = "createCaseInstanceVariable", notes = "This endpoint can be used in 2 ways: By passing a JSON Body (RestVariable or an array of RestVariable) or by passing a multipart/form-data Object.\n" - + "Nonexistent variables are created on the process-instance and existing ones are overridden without any error.\n" + + "Nonexistent variables are created on the case-instance and existing ones are overridden without any error.\n" + "Any number of variables can be passed into the request body array.\n" - + "Note that scope is ignored, only local variables can be set in a case instance.\n" + + "Note that scope is ignored, only global variables can be set in a case instance.\n" + "NB: Swagger V2 specification doesn't support this use case that is why this endpoint might be buggy/incomplete if used with other tools.") @ApiImplicitParams({ @ApiImplicitParam(name = "body", type = "org.flowable.rest.cmmn.service.api.engine.variable.RestVariable", value = "Create a variable on a case instance", paramType = "body", example = "{\n" + diff --git a/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableResource.java b/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableResource.java index 025753c98f1..7afc41f2f50 100644 --- a/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableResource.java +++ b/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceVariableResource.java @@ -71,7 +71,7 @@ public RestVariable getVariable(@ApiParam(name = "caseInstanceId") @PathVariable @ApiOperation(value = "Update a single variable on a case instance", tags = { "Case Instance Variables" }, nickname = "updateCaseInstanceVariable", notes = "This endpoint can be used in 2 ways: By passing a JSON Body (RestVariable) or by passing a multipart/form-data Object.\n" + "Nonexistent variables are created on the case instance and existing ones are overridden without any error.\n" - + "Note that scope is ignored, only local variables can be set in a process instance.\n" + + "Note that scope is ignored, only global variables can be set in a case instance.\n" + "NB: Swagger V2 specification doesn't support this use case that is why this endpoint might be buggy/incomplete if used with other tools.") @ApiImplicitParams({ @ApiImplicitParam(name = "body", type = "org.flowable.rest.cmmn.service.api.engine.variable.RestVariable", value = "Create a variable on a case instance", paramType = "body", example = "{\n" + @@ -85,7 +85,7 @@ public RestVariable getVariable(@ApiParam(name = "caseInstanceId") @PathVariable }) @ApiResponses(value = { @ApiResponse(code = 201, message = "Indicates both the case instance and variable were found and variable is updated."), - @ApiResponse(code = 404, message = "Indicates the requested case instance was not found or the process instance does not have a variable with the given name. Status description contains additional information about the error.") + @ApiResponse(code = 404, message = "Indicates the requested case instance was not found or the case instance does not have a variable with the given name. Status description contains additional information about the error.") }) @PutMapping(value = "/cmmn-runtime/case-instances/{caseInstanceId}/variables/{variableName}", produces = "application/json", consumes = {"application/json", "multipart/form-data"}) public RestVariable updateVariable(@ApiParam(name = "caseInstanceId") @PathVariable("caseInstanceId") String caseInstanceId, @ApiParam(name = "variableName") @PathVariable("variableName") String variableName, diff --git a/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseExecutionVariableResource.java b/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseExecutionVariableResource.java index af76e9037fc..224b41c3869 100644 --- a/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseExecutionVariableResource.java +++ b/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/runtime/process/BaseExecutionVariableResource.java @@ -187,7 +187,7 @@ protected RestVariable setSimpleVariable(RestVariable restVariable, Execution ex throw new FlowableIllegalArgumentException("Variable name is required"); } - // Figure out scope, revert to local is omitted + // Figure out scope, revert to local if omitted RestVariableScope scope = restVariable.getVariableScope(); if (scope == null) { scope = RestVariableScope.LOCAL;