Using this Java api, iteratively we can create muliple process engine for each tenant in Standalone process engine deployment approach.
ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
In this case, how to remove/disable the default process engine being created?
How to map the rest api calls of specific tenant to appropriate process engines?
Hi @aravindhrs ,
the default process engine is a regular process engine object with the predefined name default
.
You can easly change it with ProcessEngineConfiguration#setProcessEngineName()
.
The engine can be referenced in the URL of the REST resource: https://docs.camunda.org/manual/latest/reference/rest/overview/#engine-usage .
I haven’t tried anything than the default engine up to now, so maybe I missed something inbetween the mapping. But it’s worth to try it out.
Hope this helps, Ingo
@Ingo_Richtsmeier lets say to complete a task using default process engine i use below url:
http://localhost:8080/rest-engine/task/someTaskId/complete
Suppose if i want to specify the other process engine called “newProcessEngine ” then the url would look like below?
http://localhost:8080/rest-engine/newProcessEngine/task/someTaskId/complete
If my understanding is correct, in the case of default process engine we no need to specify processengine name in the url, if we want to direct request to specific process engine we have to specify processEngine name in the request url right?
If yes, what happened if i overwrite the name of the default process engine and want to route the request to default engine, do i need to specify process engine name in that case?
Thanks @Ingo_Richtsmeier .
what if i overwrite the name of the default process engine as “customEngine ” and want to route the request to default engine, do i need to specify process engine name in that case?
http://localhost:8080/rest/engine/customEngine/process-definition and http://localhost:8080/rest/process-definition .
Will both the above url works???
Hi @aravindhrs ,
I havn’t use this option by myself right now.
The implementation in the REST api seems quite abstract, so a lot of possiblities there:
/*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.camunda.bpm.engine.rest.util;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.rest.exception.RestException;
This file has been truncated. show original
/*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.camunda.bpm.engine.rest.impl.application;
import org.camunda.bpm.BpmPlatform;
import org.camunda.bpm.ProcessEngineService;
This file has been truncated. show original
I don’t know how they managed the ContainerManagedProcessEngineProvider in the camunda-bpm-spring-boot-starter-rest . But, as it’s open source your can figure it out by yourself.
Hope this helps, Ingo
1 Like