i checked cawemo docs and find this
Spring Boot
If you’re using Java configuration you have to register the engine plugin as a bean:
@Bean
@Order(Ordering.DEFAULT_ORDER + 1)
public static ProcessEnginePlugin cawemoEnginePlugin() {
CawemoEnginePlugin plugin = new CawemoEnginePlugin();
plugin.setCawemoUrl("http://localhost:8080");
plugin.setUserId(userId);
plugin.setApiKey("apiKey");
plugin.setProjectName("engineProject");
plugin.setAuthMode("BASIC"); // or "QUERY_PARAM"
plugin.setCustomBasicAuth(false);
return plugin;
}
so why get 401 and 500 response?
userId and api key
when i deploy a process definition
2023-05-08 14:29:45.803 INFO 9420 --- [nio-8443-exec-8] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2023-05-08 14:29:59.623 INFO 9420 --- [nio-8443-exec-4] org.camunda.cawemo.plugin : CAWEMO-PLUGIN-01002 Handling process definition 'Process_1mxugun' of deployment 'aa7e1bf8-ed93-11ed-af6f-8245e2bb3867'
2023-05-08 14:30:00.413 ERROR 9420 --- [pool-1-thread-1] org.camunda.cawemo.plugin : CAWEMO-PLUGIN-01001 Couldn't connect to Cawemo. Response: HTTP 401
2023-05-08 14:30:00.445 ERROR 9420 --- [pool-1-thread-1] org.camunda.cawemo.plugin : CAWEMO-PLUGIN-01001 Couldn't connect to Cawemo. Response: HTTP 500
Hi @Rasim_Savas,
Let’s go over the steps:
- I assume that you use Camunda as a Spring Boot App or Camunda Run. Is that correct?
If so, you have added the plugin by either adding the dependency to your pom.xml
or by adding the plugin’s jar file to your classpath, right?
- You have created an API key in Cawemo
If my assumptions are right, there is no need to implement the configuration as a Bean. You can simply add it to the application.yml
of your Spring Boot app or the default.yml
or production.yml
file of your Camunda run installation. Simply add:
camunda.bpm.run.process-engine-plugins:
plugin-class: org.camunda.cawemo.plugin.CawemoEnginePlugin
plugin-parameters:
CawemoUrl: http://localhost:8080
UserId: 414c4d5c-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ApiKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ProjectName: engineProject
AuthMode: BASIC
CustomBasicAuth: false
I hope this information helps.
It is correct that I am using Camunda Run.
I added the specified jar file under userlib.
and this is the settings in my “production.yml” file.
but nothing happens. so in the past it was returning a response like 401, nothing happens with the new setting.
i.e. i don’t get error but my process is not added to cawemo.
Hi @Rasim_Savas,
I made a typo in my configuration. Here, the updated values (I forgot the hyphen before plugin-class):
camunda.bpm.run.process-engine-plugins:
- plugin-class: org.camunda.cawemo.plugin.CawemoEnginePlugin
plugin-parameters:
CawemoUrl: http://localhost:8080
UserId: 414c4d5c-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ApiKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ProjectName: engineProject
AuthMode: BASIC
CustomBasicAuth: false
The plugin uploads models to Cawemo when they are deployed to the engine. So to see a model, you have to deploy it, but already deployed models will not be uploaded automatically.
1 Like
thank you Stephan, works great now.
1 Like