@Operation(summary = "viewVariables", description = "QUERY_PROCESS_DEFINITION_GLOBAL_VARIABLES_AND_LOCAL_VARIABLES_NOTES")
    @Parameters({
            @Parameter(name = "code", description = "PROCESS_DEFINITION_CODE", required = true, schema = @Schema(implementation = long.class, example = "100"))
    })
    @GetMapping(value = "/{code}/view-variables")
    @ResponseStatus(HttpStatus.OK)
    @ApiException(QUERY_PROCESS_DEFINITION_ALL_VARIABLES_ERROR)
    public Result viewVariables(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
                                @Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
                                @PathVariable("code") Long code) {
        Map<String, Object> result = processDefinitionService.viewVariables(loginUser, projectCode, code);
        return returnDataList(result);
    }
@Test
    public void testViewVariables() {
        long projectCode = 1L;
        Map<String, Object> resultMap = new HashMap<>();
        putMsg(resultMap, Status.SUCCESS);

        Mockito.when(processDefinitionService.viewVariables(user, projectCode, 1))
                .thenReturn(resultMap);

        Result result = processDefinitionController.viewVariables(user, projectCode, 1L);

        Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
    }