protected void localize(HistoricProcessInstance processInstance, CommandContext commandContext) { processInstance.setLocalizedName(null); processInstance.setLocalizedDescription(null); if (locale != null && processInstance.getProcessDefinitionId() != null) { ProcessDefinition processDefinition = commandContext.getProcessEngineConfiguration().getDeploymentManager().findDeployedProcessDefinitionById(processInstance.getProcessDefinitionId()); ObjectNode languageNode = Context.getLocalizationElementProperties(locale, processDefinition.getKey(), processInstance.getProcessDefinitionId(), withLocalizationFallback); if (languageNode != null) { JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME); if (languageNameNode != null && !languageNameNode.isNull()) { processInstance.setLocalizedName(languageNameNode.asText()); } JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION); if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) { processInstance.setLocalizedDescription(languageDescriptionNode.asText()); } } } }