use of org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl in project camunda-bpm-platform by camunda.
the class OnlyDispatchVariableEventOnExistingConditionsTest method testProcessWithoutConditionalEvent.
@Test
public void testProcessWithoutConditionalEvent() {
// given
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess(CONDITIONAL_EVENT_PROCESS_KEY).startEvent().serviceTask().camundaClass(CheckNoDelayedVariablesDelegate.class.getName()).userTask().endEvent().done();
// when process is deployed and instance created
rule.manageDeployment(rule.getRepositoryService().createDeployment().addModelInstance(CONDITIONAL_MODEL, modelInstance).deploy());
ProcessInstanceWithVariablesImpl processInstance = (ProcessInstanceWithVariablesImpl) rule.getRuntimeService().startProcessInstanceByKey(CONDITIONAL_EVENT_PROCESS_KEY);
// then process definition contains no property which indicates that conditional events exists
Object property = processInstance.getExecutionEntity().getProcessDefinition().getProperty(BpmnParse.PROPERTYNAME_HAS_CONDITIONAL_EVENTS);
assertNull(property);
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl in project camunda-bpm-platform by camunda.
the class TargetVariableScopeTest method testExecutionWithDelegateProcess.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/variables/scope/TargetVariableScopeTest.testExecutionWithDelegateProcess.bpmn", "org/camunda/bpm/engine/test/api/variables/scope/doer.bpmn" })
public void testExecutionWithDelegateProcess() {
// Given we create a new process instance
VariableMap variables = Variables.createVariables().putValue("orderIds", Arrays.asList(new int[] { 1, 2, 3 }));
ProcessInstance processInstance = engineRule.getRuntimeService().startProcessInstanceByKey("Process_MultiInstanceCallAcitivity", variables);
// it runs without any problems
assertThat(processInstance.isEnded(), is(true));
assertThat(((ProcessInstanceWithVariablesImpl) processInstance).getVariables().containsKey("targetOrderId"), is(false));
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl in project camunda-bpm-platform by camunda.
the class TargetVariableScopeTest method testExecutionWithScriptTargetScope.
@Test
@Deployment(resources = { "org/camunda/bpm/engine/test/api/variables/scope/TargetVariableScopeTest.testExecutionWithScriptTargetScope.bpmn", "org/camunda/bpm/engine/test/api/variables/scope/doer.bpmn" })
public void testExecutionWithScriptTargetScope() {
VariableMap variables = Variables.createVariables().putValue("orderIds", Arrays.asList(new int[] { 1, 2, 3 }));
ProcessInstance processInstance = engineRule.getRuntimeService().startProcessInstanceByKey("Process_MultiInstanceCallAcitivity", variables);
// it runs without any problems
assertThat(processInstance.isEnded(), is(true));
assertThat(((ProcessInstanceWithVariablesImpl) processInstance).getVariables().containsKey("targetOrderId"), is(false));
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessInstanceWithVariablesImpl in project camunda-bpm-platform by camunda.
the class FoxFailedJobParseListenerTest method findActivity.
protected ActivityImpl findActivity(ProcessInstance pi, String activityId) {
ProcessInstanceWithVariablesImpl entity = (ProcessInstanceWithVariablesImpl) pi;
ProcessDefinitionEntity processDefEntity = entity.getExecutionEntity().getProcessDefinition();
assertNotNull(processDefEntity);
ActivityImpl activity = processDefEntity.findActivity(activityId);
assertNotNull(activity);
return activity;
}
Aggregations