private void validate() { InternalRuntimeManager manager = (InternalRuntimeManager) getKnowledgeRuntime().getEnvironment().get("RuntimeManager"); if (manager != null) { // check if process instance is owned by the same manager as the one owning ksession if (hasDeploymentId() && !manager.getIdentifier().equals(getDeploymentId())) { throw new IllegalStateException("Process instance " + getId() + " is owned by another deployment " + getDeploymentId() + " != " + manager.getIdentifier()); } } }
when(processInstance.getDeploymentId()).thenReturn("test"); when(processInstance.getCorrelationKey()).thenReturn("key"); when(processInstance.getParentProcessInstanceId()).thenReturn(-1L);
when(processInstance.getDeploymentId()).thenReturn("test"); when(processInstance.getCorrelationKey()).thenReturn("key"); when(processInstance.getParentProcessInstanceId()).thenReturn(-1L);
_instance.setDescription(workFlow.getDescription()); if (workFlow.getDeploymentId() != null) { _instance.setDeploymentId(workFlow.getDeploymentId());
private void validate() { InternalRuntimeManager manager = (InternalRuntimeManager) getKnowledgeRuntime().getEnvironment().get("RuntimeManager"); if (manager != null) { // check if process instance is owned by the same manager as the one owning ksession if (hasDeploymentId() && !manager.getIdentifier().equals(getDeploymentId())) { throw new IllegalStateException("Process instance " + getId() + " is owned by another deployment " + getDeploymentId() + " != " + manager.getIdentifier()); } } }
_instance.setDescription(workFlow.getDescription()); if (workFlow.getDeploymentId() != null) { _instance.setDeploymentId(workFlow.getDeploymentId());