From b5b65c0c5c1289a2856a019d766e24aceb56bcde Mon Sep 17 00:00:00 2001 From: Pierre-yves-monnet Date: Tue, 10 Dec 2024 11:58:17 -0800 Subject: [PATCH] Normalize exception --- .../test_1/test-1-c8CrawlUrlMultiple.yaml | 2 +- .../resources/ScoreAcceptance.bpmn | 4 +- pom.xml | 5 ++- .../org/camunda/automator/AutomatorAPI.java | 2 +- .../org/camunda/automator/AutomatorCLI.java | 4 +- .../org/camunda/automator/AutomatorRest.java | 4 +- .../camunda7/BpmnEngineCamunda7.java | 2 +- .../camunda8/BpmnEngineCamunda8.java | 12 +++--- .../bpmnengine/camunda8/OperateClient.java | 18 ++++----- .../bpmnengine/camunda8/TaskListClient.java | 39 ++++++++++++++++--- .../configuration/BpmnEngineList.java | 10 ++--- .../configuration/ConfigurationStartup.java | 4 +- .../automator/content/ContentManager.java | 8 ++-- .../automator/content/RepositoryManager.java | 6 +-- .../automator/definition/Scenario.java | 6 +-- .../automator/engine/flow/RunObjectives.java | 2 +- .../flow/RunScenarioFlowServiceTask.java | 2 +- .../flow/RunScenarioFlowStartEvent.java | 2 +- .../automator/services/AutomatorStartup.java | 8 ++-- src/main/resources/application.yaml | 24 ++++++------ 20 files changed, 97 insertions(+), 67 deletions(-) diff --git a/doc/loadtestscenario/test_1/test-1-c8CrawlUrlMultiple.yaml b/doc/loadtestscenario/test_1/test-1-c8CrawlUrlMultiple.yaml index 887b5a7..726d1ac 100644 --- a/doc/loadtestscenario/test_1/test-1-c8CrawlUrlMultiple.yaml +++ b/doc/loadtestscenario/test_1/test-1-c8CrawlUrlMultiple.yaml @@ -34,7 +34,7 @@ spec: -Dautomator.servers.camunda8.taskListUrl= -Dautomator.servers.camunda8.workerExecutionThreads=1 -Dautomator.startup.scenarioResourceAtStartup=file:/C8CrawlUrlScn.json - -Dautomator.startup.policyExecution=WARMINGUP|CREATION + -Dautomator.startup.policyExecution=WARMINGUP|CREATION|OBJECTIVE -Dautomator.startup.logLevel=DASHBOARD resources: limits: diff --git a/doc/unittestscenario/resources/ScoreAcceptance.bpmn b/doc/unittestscenario/resources/ScoreAcceptance.bpmn index a4cecb8..c61826b 100644 --- a/doc/unittestscenario/resources/ScoreAcceptance.bpmn +++ b/doc/unittestscenario/resources/ScoreAcceptance.bpmn @@ -36,7 +36,9 @@ - + + + Flow_0a4sjzy Flow_0wya675 diff --git a/pom.xml b/pom.xml index 06480bd..f4300a6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,13 +6,14 @@ org.camunda.community.automator process-execution-automator - 1.8.0 +Norm 1.8.1 - + + 17 ${java.version} diff --git a/src/main/java/org/camunda/automator/AutomatorAPI.java b/src/main/java/org/camunda/automator/AutomatorAPI.java index baba334..7561376 100644 --- a/src/main/java/org/camunda/automator/AutomatorAPI.java +++ b/src/main/java/org/camunda/automator/AutomatorAPI.java @@ -82,7 +82,7 @@ public BpmnEngine getBpmnEngineFromScenario(Scenario scenario, BpmnEngineList bp return null; } catch (AutomatorException e) { logger.error("Can't connect the engine for the scenario [{}] serverName[{}]: {}", scenario.getName(), - scenario.getServerName(), e.getMessage()); + scenario.getServerName(), e.getMessage(),e); throw e; } diff --git a/src/main/java/org/camunda/automator/AutomatorCLI.java b/src/main/java/org/camunda/automator/AutomatorCLI.java index 39d4d34..dbd526d 100644 --- a/src/main/java/org/camunda/automator/AutomatorCLI.java +++ b/src/main/java/org/camunda/automator/AutomatorCLI.java @@ -115,7 +115,7 @@ private static List detectRecursiveScenario(Path folderRecursive) { } }); } catch (IOException e) { - logger.error("During detection scenario file: {}", e.getMessage()); + logger.error("During detection scenario file: {}", e.getMessage(),e); } return listFiles; } @@ -254,7 +254,7 @@ public void run(String[] args) { logger.info("That's all folks! " + (System.currentTimeMillis() - beginTime) + " ms."); } catch (Exception e) { - logger.error("Error during execution " + e); + logger.error("Error during execution {} ", e.getMessage(),e); } } diff --git a/src/main/java/org/camunda/automator/AutomatorRest.java b/src/main/java/org/camunda/automator/AutomatorRest.java index 0c6fb8c..1fcc62c 100644 --- a/src/main/java/org/camunda/automator/AutomatorRest.java +++ b/src/main/java/org/camunda/automator/AutomatorRest.java @@ -124,7 +124,7 @@ private void startTest(String scenarioName, String serverName, String unitTestId scenario = automatorAPI.loadFromFile(scenarioFile); } catch (Exception e) { logger.error("Error during accessing InputStream from File [{}]: {}", scenarioFile.toAbsolutePath(), - e.getMessage()); + e.getMessage(),e); } if (scenario == null) { resultMap.put(JSON_STATUS, "NOTEXIST"); @@ -154,7 +154,7 @@ private void startTest(String scenarioName, String serverName, String unitTestId resultMap.putAll(resultToJson(scenarioExecutionResult)); } catch (Exception e) { - logger.error("During execute unit Test", e.getMessage()); + logger.error("During execute unit Test : {}", e.getMessage(),e); resultMap.put("error", e.getMessage()); } } diff --git a/src/main/java/org/camunda/automator/bpmnengine/camunda7/BpmnEngineCamunda7.java b/src/main/java/org/camunda/automator/bpmnengine/camunda7/BpmnEngineCamunda7.java index 2f12df7..80e85af 100644 --- a/src/main/java/org/camunda/automator/bpmnengine/camunda7/BpmnEngineCamunda7.java +++ b/src/main/java/org/camunda/automator/bpmnengine/camunda7/BpmnEngineCamunda7.java @@ -107,7 +107,7 @@ public void connection() throws AutomatorException { engineApi.getProcessEngineNames(); logger.info("Connection successfully to Camunda7 [{}] ", apiClient.getBasePath()); } catch (ApiException e) { - logger.error("Can't connect Camunda7 server[{}] User[{}]: {}", apiClient.getBasePath(), userName, e.toString()); + logger.error("Can't connect Camunda7 server[{}] User[{}]: {}", apiClient.getBasePath(), userName, e.getMessage(),e.getMessage(),e); throw new AutomatorException("Can't connect to Camunda7 [" + apiClient.getBasePath() + "] : " + e); } } diff --git a/src/main/java/org/camunda/automator/bpmnengine/camunda8/BpmnEngineCamunda8.java b/src/main/java/org/camunda/automator/bpmnengine/camunda8/BpmnEngineCamunda8.java index 9eaec4c..45b6350 100644 --- a/src/main/java/org/camunda/automator/bpmnengine/camunda8/BpmnEngineCamunda8.java +++ b/src/main/java/org/camunda/automator/bpmnengine/camunda8/BpmnEngineCamunda8.java @@ -346,7 +346,7 @@ public void executeServiceTask(String serviceTaskId, String workerId, Map searchTasksByProcessInstanceId(String pr }).toList(); } catch (OperateException e) { - logger.error("Can't search FlowNode: " + e.getMessage()); + logger.error("Can't search FlowNode: {}", e.getMessage(),e); throw new AutomatorException("Can't search FlowNode: " + e.getMessage()); } // We must not be here catch (Exception e) { - logger.error("Can't search FlowNode EXCEPTION NOT EXPECTED: " + e.getMessage()); + logger.error("Can't search FlowNode EXCEPTION NOT EXPECTED: {} ", e.getMessage(),e); throw new AutomatorException("Can't search FlowNode: " + e.getMessage()); } } @@ -275,12 +275,12 @@ public List searchProcessInstanceByVariable(Strin } return listProcessInstanceFind; } catch (OperateException e) { - logger.error("Can't search flowNodeByVariable: " + e.getMessage()); + logger.error("Can't search flowNodeByVariable: {} ", e.getMessage(),e); throw new AutomatorException("Can't search flowNodeByVariable " + e.getMessage()); } // We must not be here catch (Exception e) { - logger.error("Can't search flowNodeByVariable EXCEPTION NOT EXPECTED: " + e.getMessage()); + logger.error("Can't search flowNodeByVariable EXCEPTION NOT EXPECTED: {} ",e.getMessage(),e); throw new AutomatorException("Can't search FlowNode: " + e.getMessage()); } } @@ -305,12 +305,12 @@ public Map getVariables(String processInstanceId) throws Automat return variables; } catch (OperateException e) { - logger.error("Can't getVariables: " + e.getMessage()); + logger.error("Can't getVariables: {} ", e.getMessage(),e); throw new AutomatorException("Can't search variables task " + e.getMessage()); } // We must not be here catch (Exception e) { - logger.error("Can't getVariables EXCEPTION NOT EXPECTED: " + e.getMessage()); + logger.error("Can't getVariables EXCEPTION NOT EXPECTED: {} ", e.getMessage(),e); throw new AutomatorException("Can't getVariables: " + e.getMessage()); } } diff --git a/src/main/java/org/camunda/automator/bpmnengine/camunda8/TaskListClient.java b/src/main/java/org/camunda/automator/bpmnengine/camunda8/TaskListClient.java index 49a193e..ebabf0b 100644 --- a/src/main/java/org/camunda/automator/bpmnengine/camunda8/TaskListClient.java +++ b/src/main/java/org/camunda/automator/bpmnengine/camunda8/TaskListClient.java @@ -24,6 +24,8 @@ public class TaskListClient { BpmnEngineCamunda8 engineCamunda8; private CamundaTaskListClient taskClient; + private long lastCallToTaskList; + protected TaskListClient(BpmnEngineCamunda8 engineCamunda8) { this.engineCamunda8 = engineCamunda8; } @@ -61,7 +63,7 @@ public void connectTaskList(StringBuilder analysis) throws AutomatorException { taskListBuilder.taskListUrl(taskListUrl) .saaSAuthentication(serverDefinition.taskListClientId, serverDefinition.taskListClientSecret); } catch (Exception e) { - logger.error("Can't connect to SaaS environemnt[{}] Analysis:{} : {}", serverDefinition.name, analysis, e.getMessage()); + logger.error("Can't connect to SaaS environemnt[{}] Analysis:{} : {}", serverDefinition.name, analysis, e.getMessage(),e); throw new AutomatorException( "Can't connect to SaaS environment[" + serverDefinition.name + "] Analysis:" + analysis + " fail : " + e.getMessage()); @@ -105,16 +107,27 @@ public void connectTaskList(StringBuilder analysis) throws AutomatorException { taskClient = taskListBuilder.build(); analysis.append("successfully, "); + lastCallToTaskList= System.currentTimeMillis(); } catch (Exception e) { - logger.error("Can't connect to Server[{}] Analysis:{} : {}", serverDefinition.name, analysis, e.getMessage()); + logger.error("Can't connect to Server[{}] Analysis:{} : {}", serverDefinition.name, analysis, e.getMessage(),e); throw new AutomatorException( "Can't connect to Server[" + serverDefinition.name + "] Analysis:" + analysis + " Fail : " + e.getMessage()); } } + /** + * There is a timeout on the taskList, so reconnection may be necessary + * @param analysis analyse the result + */ + public void reconnect(StringBuilder analysis) throws AutomatorException { + connectTaskList(analysis); + } + + public List searchUserTasksByProcessInstance(String processInstanceId, String userTaskId, int maxResult) throws AutomatorException { + checkConnection(); try { // impossible to filter by the task name/ task type, so be ready to get a lot of flowNode and search the correct one Long processInstanceIdLong = Long.valueOf(processInstanceId); @@ -153,12 +166,13 @@ public List searchUserTasksByProcessInstance(String processInstanceId, S return listTasksResult; } catch (TaskListException e) { - logger.error("TaskListClient: error during search task: {}", e.getMessage()); + logger.error("TaskListClient: error during search task: processInstance[{}] : {} ", processInstanceId, e.getMessage(), e); throw new AutomatorException("Can't search users task " + e.getMessage()); } } public List searchUserTasks(String userTaskId, int maxResult) throws AutomatorException { + checkConnection(); try { // impossible to filter by the task name/ task type, so be ready to get a lot of flowNode and search the correct one @@ -181,22 +195,35 @@ public List searchUserTasks(String userTaskId, int maxResult) throws Aut return listTasksResult; } catch (TaskListException e) { - logger.error("SearchUserTask: userId[{}] : {}", userTaskId, e.getMessage()); + logger.error("SearchUserTask: userId[{}] : {}", userTaskId, e.getMessage(),e); throw new AutomatorException("Can't search users task " + e.getMessage()); } } public void executeUserTask(String userTaskId, String userId, Map variables) throws AutomatorException { + checkConnection(); try { taskClient.claim(userTaskId, engineCamunda8.getServerDefinition().operateUserName); taskClient.completeTask(userTaskId, variables); } catch (TaskListException e) { - logger.error("ExecuteUserTask: taskId[{}] userId[{}] : {}", userTaskId, userId, e.getMessage()); + logger.error("ExecuteUserTask: taskId[{}] userId[{}] : {}", userTaskId, userId, e.getMessage(),e); throw new AutomatorException("Can't execute task [" + userTaskId + "]"); } catch (Exception e) { - logger.error("ExecuteUserTask: Exception on taskId[{}] userId[{}] : {}", userTaskId, userId, e.getMessage()); + logger.error("ExecuteUserTask: Exception on taskId[{}] userId[{}] : {}", userTaskId, userId, e.getMessage(), e); throw new AutomatorException("Can't execute task [" + userTaskId + "]"); } } + + /** + * There is a timeout with taskList. + * If the last call was more than 4 minutes, then reconnect + */ + + private void checkConnection() throws AutomatorException { + StringBuilder analysis = new StringBuilder(); + if (lastCallToTaskList recordData, Integer } return (Integer) recordData.get(name); } catch (Exception e) { - logger.error("Variable [{}] {} bad definition {}", name, contextLog, e.getMessage()); + logger.error("Variable [{}] {} bad definition {}", name, contextLog, e.getMessage(),e); return defaultValue; } } @@ -483,7 +483,7 @@ private int parseInt(String label, String value, int defaultValue, String contex return defaultValue; return Integer.parseInt(value); } catch (Exception e) { - logger.error("Can't parse value [{}] at [{}] {}", value, label, contextLog); + logger.error("Can't parse value [{}] at [{}] {}", value, label, contextLog,e); return defaultValue; } } diff --git a/src/main/java/org/camunda/automator/configuration/ConfigurationStartup.java b/src/main/java/org/camunda/automator/configuration/ConfigurationStartup.java index fedc556..8b51322 100644 --- a/src/main/java/org/camunda/automator/configuration/ConfigurationStartup.java +++ b/src/main/java/org/camunda/automator/configuration/ConfigurationStartup.java @@ -60,7 +60,7 @@ public RunParameters.LOGLEVEL getLogLevelEnum() { try { return RunParameters.LOGLEVEL.valueOf(logLevel); } catch (Exception e) { - logger.error("Unknow LogLevel (automator.startup.loglevel) : [{}} ", logLevel); + logger.error("Unknow LogLevel (automator.startup.loglevel) : [{}} ", logLevel,e); return RunParameters.LOGLEVEL.MONITORING; } } @@ -137,7 +137,7 @@ public Duration getWarmingUpServer() { try { return Duration.parse(waitWarmupServer); } catch (Exception e) { - logger.error("Can't parse warmup [{}]", waitWarmupServer); + logger.error("Can't parse warmup [{}]", waitWarmupServer,e); return Duration.ZERO; } } diff --git a/src/main/java/org/camunda/automator/content/ContentManager.java b/src/main/java/org/camunda/automator/content/ContentManager.java index 0df289d..79f7c02 100644 --- a/src/main/java/org/camunda/automator/content/ContentManager.java +++ b/src/main/java/org/camunda/automator/content/ContentManager.java @@ -50,7 +50,7 @@ public void init() { loadUploadPath(); LoadContentResource(); } catch (Exception e) { - logger.error("ContentManager: error during initialization {}", e.getMessage()); + logger.error("ContentManager: error during initialization {}", e.getMessage(),e); } } @@ -113,7 +113,7 @@ private void LoadContentResource() { logger.info("ContentManager/LoadContentResource: Detect [Resource] name[{}]", scenarioResource.getFilename()); Path scenario = repositoryManager.addResource(scenarioResource); } catch (IOException e) { - logger.error("ContentManager/LoadContentResource: Error occurred: {} ", e.getMessage()); + logger.error("ContentManager/LoadContentResource: Error occurred: {} ", e.getMessage(),e); } } @@ -135,13 +135,13 @@ private void loadUploadPath() { repositoryManager.addFile(sourcePath); nbFilesCopied++; } catch (IOException e) { - logger.error("ContentManager/Upload: Error copying[{}] -> [{}] : {}", sourcePath, repositoryManager.getRepositoryPath(), e.getMessage()); + logger.error("ContentManager/Upload: Error copying[{}] -> [{}] : {}", sourcePath, repositoryManager.getRepositoryPath(), e.getMessage(),e); } } logger.info("ContentManager/Upload: upload {} files", nbFilesCopied); } catch (IOException e) { - logger.error("ContentManager/Upload: Error occurred: {} ", e.getMessage()); + logger.error("ContentManager/Upload: Error occurred: {} ", e.getMessage(),e); } } } diff --git a/src/main/java/org/camunda/automator/content/RepositoryManager.java b/src/main/java/org/camunda/automator/content/RepositoryManager.java index 08bd177..fe2c1d8 100644 --- a/src/main/java/org/camunda/automator/content/RepositoryManager.java +++ b/src/main/java/org/camunda/automator/content/RepositoryManager.java @@ -40,7 +40,7 @@ public void initializeRepository(String repositoryProposition) throws AutomatorE } catch (FileAlreadyExistsException e) { logger.info("RepositoryManager/initialization: File already exists [{}]", repositoryPath.toAbsolutePath()); } catch (Exception e) { - logger.error("RepositoryManager/initialization: Can't create folder [{}]", repositoryPath.toAbsolutePath()); + logger.error("RepositoryManager/initialization: Can't create folder [{}] : {}", repositoryPath.toAbsolutePath(),e.getMessage(),e); repositoryPath = null; throw new AutomatorException("Can't create folder[" + tempDir.toAbsolutePath() + "/repository]"); } @@ -85,7 +85,7 @@ public Path addFromInputStream(InputStream inputStream, String fileName) throws outputStream = null; return fileContent.toPath(); } catch (Exception e) { - logger.error("RepositoryManager/addFromInputStream: Can't upload File [" + fileName + "] : " + e.getMessage()); + logger.error("RepositoryManager/addFromInputStream: Can't upload File [{}] : {} ", fileName,e.getMessage(),e); throw e; } finally { if (outputStream != null) @@ -120,7 +120,7 @@ public List getContentRepository() { return files.filter(Files::isRegularFile) // You can filter by file type if needed .toList(); } catch (IOException e) { - logger.error("Error reading content [{}]", repositoryPath.toString()); + logger.error("Error reading content [{}] : {}", repositoryPath.toString(),e.getMessage(),e); return Collections.emptyList(); } } diff --git a/src/main/java/org/camunda/automator/definition/Scenario.java b/src/main/java/org/camunda/automator/definition/Scenario.java index 660b6c8..76a6876 100644 --- a/src/main/java/org/camunda/automator/definition/Scenario.java +++ b/src/main/java/org/camunda/automator/definition/Scenario.java @@ -65,7 +65,7 @@ public static Scenario createFromJson(String jsonContent) throws AutomatorExcept scenario.afterUnSerialize(); return scenario; } catch (Exception e) { - logger.error("Scenario: can't unparse Json content [{}]", jsonContent); + logger.error("Scenario: can't unparse Json content [{}] : {}", jsonContent,e.getMessage(),e); throw new AutomatorException("Scenario: can't unparse GSon file:" + e.getMessage()); } } @@ -107,7 +107,7 @@ public static Scenario createFromInputStream(InputStream scenarioInput, String o scnHead.initialize(); return scnHead; } catch (IOException e) { - logger.error("CreateScenarioFromInputString: origin[{}] error {} : {} ", origin, e.getMessage(), e.toString()); + logger.error("CreateScenarioFromInputString: origin[{}] error {} ", origin, e.getMessage(), e); throw new AutomatorException("Can't load content from [" + origin + "] " + e.getMessage()); } @@ -179,7 +179,7 @@ public File getScenarioFile() { try { return new File(scenarioFile); } catch (Exception e) { - logger.error("Can't access file [{}] ", scenarioFile); + logger.error("Can't access file [{}] : {} ", scenarioFile, e.getMessage(),e); return null; } } diff --git a/src/main/java/org/camunda/automator/engine/flow/RunObjectives.java b/src/main/java/org/camunda/automator/engine/flow/RunObjectives.java index 7017575..12b8181 100644 --- a/src/main/java/org/camunda/automator/engine/flow/RunObjectives.java +++ b/src/main/java/org/camunda/automator/engine/flow/RunObjectives.java @@ -268,7 +268,7 @@ private ObjectiveResult checkObjectiveFlowRate(ScenarioFlowControl.Objective obj objectiveResult.analysis += "AverageReach[" + averageValue + "]"; } } catch (Exception e) { - logger.error("Error during checkFlowRateObjective {}", e.getMessage()); + logger.error("Error during checkFlowRateObjective {}", e.getMessage(),e); objectiveResult.success = false; } return objectiveResult; diff --git a/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowServiceTask.java b/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowServiceTask.java index c4ed9d1..eb67e69 100644 --- a/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowServiceTask.java +++ b/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowServiceTask.java @@ -212,7 +212,7 @@ private void manageWaitExecution(org.camunda.bpm.client.task.ExternalTask extern } catch (Exception e) { logger.error("Error task[{}] PI[{}] : {}", flowServiceTask.getId(), (externalTask != null ? externalTask.getProcessDefinitionKey() : activatedJob.getProcessInstanceKey()), - e.getMessage()); + e.getMessage(),e); flowServiceTask.runResult.registerAddErrorStepExecution(); diff --git a/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowStartEvent.java b/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowStartEvent.java index c172353..8dc0842 100644 --- a/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowStartEvent.java +++ b/src/main/java/org/camunda/automator/engine/flow/RunScenarioFlowStartEvent.java @@ -72,7 +72,7 @@ public int getCurrentNumberOfThreads() { return startEventRunnable == null ? 0 : startEventRunnable.getNumberOfRunningThreads(); } catch (Exception e) { // do nothing - logger.error("During getCurrentNumberOfThreads : {}", e); + logger.error("During getCurrentNumberOfThreads : {}", e.getMessage(),e); return 0; } } diff --git a/src/main/java/org/camunda/automator/services/AutomatorStartup.java b/src/main/java/org/camunda/automator/services/AutomatorStartup.java index 11a776f..2b1d052 100644 --- a/src/main/java/org/camunda/automator/services/AutomatorStartup.java +++ b/src/main/java/org/camunda/automator/services/AutomatorStartup.java @@ -96,7 +96,7 @@ private List loadStartupScenario() { try { contentManager.addFile(scenarioFile); } catch (IOException e) { - logger.error("AutomatorStartup/StartupScenario: File [{}] Can't add in the repository: {}", scenarioFile.toAbsolutePath(), e.getMessage()); + logger.error("AutomatorStartup/StartupScenario: File [{}] Can't add in the repository: {}", scenarioFile.toAbsolutePath(), e.getMessage(),e); } } else { logger.error("AutomatorStartup/StartupScenario:: Can't find File [{}/{}] or [{}]", configurationStartup.scenarioPath, @@ -122,7 +122,7 @@ private List loadStartupScenario() { try { scenarioList.add(contentManager.addResource(resource)); } catch (IOException e) { - logger.error("Error loading resource [{}]", resource.getFilename()); + logger.error("Error loading resource [{}] ; {}", resource.getFilename(),e.getMessage(),e); } } } @@ -182,7 +182,7 @@ public void run() { String currentPath = new java.io.File(".").getCanonicalPath(); logger.info("Local Path[{}]", currentPath); } catch (Exception e) { - logger.error("Can't access Local Path : {} ", e.getMessage()); + logger.error("Can't access Local Path : {} ", e.getMessage(),e); } runFixedWarmup(); @@ -197,7 +197,7 @@ public void run() { scenario = automatorAPI.loadFromFile(scenarioPath); } catch (Exception e) { logger.error("Error during accessing InputStream from File [{}]: {}", scenarioPath.getFileName(), - e.getMessage()); + e.getMessage(),e); } diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index a99b1f0..bd9ccff 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -54,14 +54,14 @@ automator: # other way to provide the list of server connection serversList: - - type: "camunda7" - name: "camunda7Emeraud" + - name: "camunda7Emeraud" + type: "camunda7" url: "http://localhost:8080/engine-rest" workerMaxJobsActive: 1 - - type: "camunda8" + - name: "Camunda8Ruby" + type: "camunda8" description: "Simple authentication" - name: "Camunda8Ruby" zeebeGatewayAddress: "127.0.0.1:26500" zeebeRestAddress: "http://localhost:9600" operateUserName: "demo" @@ -74,9 +74,9 @@ automator: # -1 means : align the jobsActive to the workerExecutionThreads workerMaxJobsActive: -1 - - type: "camunda8" + - name: "Camunda8Topaz" + type: "camunda8" description: "Kubernetes, Simple authentication" - name: "Camunda8Topaz" zeebeGatewayAddress: "camunda-zeebe-gateway:26500" zeebeRestAddress: "http://camunda-zeebe-gateway:9600" operateUserName: "demo" @@ -89,8 +89,8 @@ automator: # -1 means : align the jobsActive to the workerExecutionThreads workerMaxJobsActive: -1 - - type: "camunda8" - name: "Camunda8Lazuli" + - name: "Camunda8Lazuli" + type: "camunda8" description: "A Zeebe+Identity server" zeebeGatewayAddress: "127.0.0.1:26500" zeebeRestAddress: "http://localhost:9600" @@ -117,8 +117,8 @@ automator: # -1 means : align the jobsActive to the workerExecutionThreads workerMaxJobsActive: -1 - - type: "camunda8" - name: "Camunda8ZeebeOnly" + - name: "Camunda8ZeebeOnly" + type: "camunda8" zeebeGatewayAddress: "127.0.0.1:26500" zeebeRestAddress: "http://localhost:9600" zeebePlainText: true @@ -127,8 +127,8 @@ automator: workerMaxJobsActive: -1 - - type: "camunda8saas" - name: "Camunda8Grena" + - name: "Camunda8Grena" + type: "camunda8saas" workerExecutionThreads: 200 # -1 means : align the jobsActive to the workerExecutionThreads workerMaxJobsActive: -1