Skip to content

Commit

Permalink
fix(engine): Moved setting of processDefinitionId to RestartJobHandler
Browse files Browse the repository at this point in the history
related to camunda#4205
  • Loading branch information
punitdarira committed Jun 29, 2024
1 parent af36f9b commit bdde986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import org.camunda.bpm.engine.impl.persistence.entity.JobEntity;
import org.camunda.bpm.engine.impl.persistence.entity.MessageEntity;
import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.camunda.bpm.engine.impl.util.JsonUtil;

import static org.camunda.bpm.engine.impl.RestartProcessInstancesBatchConfigurationJsonConverter.PROCESS_DEFINITION_ID;

/**
*
Expand All @@ -54,6 +57,7 @@ protected void postProcessJob(RestartProcessInstancesBatchConfiguration configur
.findDeployedProcessDefinitionById(configuration.getProcessDefinitionId());
job.setDeploymentId(processDefinitionEntity.getDeploymentId());
}
job.setProcessDefinitionId(configuration.getProcessDefinitionId());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import org.camunda.bpm.engine.impl.util.ClockUtil;
import org.camunda.bpm.engine.impl.util.JsonUtil;

import static org.camunda.bpm.engine.impl.RestartProcessInstancesBatchConfigurationJsonConverter.PROCESS_DEFINITION_ID;

/**
* Common methods for batch job handlers based on list of ids, providing serialization, configuration instantiation, etc.
*
Expand Down Expand Up @@ -174,8 +172,6 @@ protected void createJobEntities(BatchEntity batch, T configuration, String depl

if (jobConfiguration.getIds() != null && jobConfiguration.getIds().size() == 1) {
job.setProcessInstanceId(jobConfiguration.getIds().get(0));
String processDefinitionId = JsonUtil.getString(JsonUtil.asObject(batch.getConfigurationBytes()), PROCESS_DEFINITION_ID, null);
job.setProcessDefinitionId(processDefinitionId);
}

job.setDeploymentId(deploymentId);
Expand Down

0 comments on commit bdde986

Please sign in to comment.