Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testGetVariablesTyped()
        public virtual void testGetVariablesTyped()
        {
            VariableMap variables = variableScope.VariablesTyped;

            assertNotNull(variables);
            assertEquals(VAR_VALUE_STRING, variables.get(VAR_NAME));
            assertEquals(variables, variableScope.getVariablesTyped(true));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testVariableAccessOnDeleteInCalledProcess()
        public virtual void testVariableAccessOnDeleteInCalledProcess()
        {
            // given
            VariablesCollectingListener.reset();

            BpmnModelInstance callActivityProcess = Bpmn.createExecutableProcess("calling").startEvent().callActivity().camundaIn("foo", "foo").calledElement("called").endEvent().done();

//JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            BpmnModelInstance calledProcess = Bpmn.createExecutableProcess("called").startEvent().userTask().camundaTaskListenerClass([email protected]_Fields.EVENTNAME_DELETE, typeof(VariablesCollectingListener).FullName).endEvent().done();

            testRule.deploy(callActivityProcess, calledProcess);
            ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("calling", Variables.createVariables().putValue("foo", "bar"));

            // when
            runtimeService.deleteProcessInstance(processInstance.Id, null);

            // then
            VariableMap collectedVariables = VariablesCollectingListener.CollectedVariables;

            assertNotNull(collectedVariables);
            assertEquals(1, collectedVariables.size());
            assertEquals("bar", collectedVariables.get("foo"));
        }