snippets/get-servlet-context-by-process-definition/src/main/java/org/example/get_servlet_context_by_process_definition/ProcessApplicationHelper.java
public static ProcessApplicationInfo getProcessApplicationInfo(
			ProcessEngine processEngine, String processDefinitionId) {
		ProcessDefinition processDefinition = processEngine.getRepositoryService().getProcessDefinition(processDefinitionId);

		// get the name of the process application that made the deployment
		String processApplicationName = processEngine.getManagementService()
				.getProcessApplicationForDeployment(processDefinition.getDeploymentId());

		if (processApplicationName == null) {
			// not a process application deployment
			return null;
		} else {
			ProcessApplicationService processApplicationService = BpmPlatform.getProcessApplicationService();
			return processApplicationService.getProcessApplicationInfo(processApplicationName);
		}
	}
public static ProcessApplicationInfo getProcessApplicationInfo(
			ProcessEngine processEngine, String processDefinitionId) {
		ProcessDefinition processDefinition = processEngine.getRepositoryService().getProcessDefinition(processDefinitionId);

		// get the name of the process application that made the deployment
		String processApplicationName = processEngine.getManagementService()
				.getProcessApplicationForDeployment(processDefinition.getDeploymentId());

		if (processApplicationName == null) {
			// not a process application deployment
			return null;
		} else {
			ProcessApplicationService processApplicationService = BpmPlatform.getProcessApplicationService();
			return processApplicationService.getProcessApplicationInfo(processApplicationName);
		}
	}
Retrieve the application info of a process definition from a known process engine.