Search in sources :

Example 86 with ActivityImpl

use of org.camunda.bpm.engine.impl.pvm.process.ActivityImpl in project camunda-bpm-platform by camunda.

the class FoxFailedJobParseListenerTest method testUserTaskParseFailedJobRetryTimeCycle.

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/parse/FoxFailedJobParseListenerTest.testUserTask.bpmn20.xml" })
public void testUserTaskParseFailedJobRetryTimeCycle() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("asyncUserTaskFailedJobRetryTimeCycle");
    ActivityImpl userTask = findActivity(pi, "task");
    checkFoxFailedJobConfig(userTask);
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 87 with ActivityImpl

use of org.camunda.bpm.engine.impl.pvm.process.ActivityImpl in project camunda-bpm-platform by camunda.

the class FoxFailedJobParseListenerTest method testTimerStartEventWithFailedJobRetryTimeCycle.

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/parse/FoxFailedJobParseListenerTest.testTimer.bpmn20.xml" })
public void testTimerStartEventWithFailedJobRetryTimeCycle() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("startEventWithFailedJobRetryTimeCycle");
    ActivityImpl startEvent = findActivity(pi, "startEventFailedJobRetryTimeCycle");
    checkFoxFailedJobConfig(startEvent);
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 88 with ActivityImpl

use of org.camunda.bpm.engine.impl.pvm.process.ActivityImpl in project camunda-bpm-platform by camunda.

the class FoxFailedJobParseListenerTest method testAsyncUserTaskButWithoutParseFailedJobRetryTimeCycle.

@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/parse/FoxFailedJobParseListenerTest.testUserTask.bpmn20.xml" })
public void testAsyncUserTaskButWithoutParseFailedJobRetryTimeCycle() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("asyncUserTaskButWithoutFailedJobRetryTimeCycle");
    ActivityImpl userTask = findActivity(pi, "asyncTaskWithoutFailedJobRetryTimeCycle");
    checkNotContainingFoxFailedJobConfig(userTask);
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 89 with ActivityImpl

use of org.camunda.bpm.engine.impl.pvm.process.ActivityImpl in project camunda-bpm-platform by camunda.

the class FoxFailedJobParseListenerTest method testMultiInstanceBodyAndInnerActivityWithFailedJobRetryTimeCycle.

@Deployment
public void testMultiInstanceBodyAndInnerActivityWithFailedJobRetryTimeCycle() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("process");
    ActivityImpl miBody = findMultiInstanceBody(pi, "task");
    checkFoxFailedJobConfig(miBody);
    ActivityImpl innerActivity = findActivity(pi, "task");
    checkFoxFailedJobConfig(innerActivity);
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) ProcessInstance(org.camunda.bpm.engine.runtime.ProcessInstance) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 90 with ActivityImpl

use of org.camunda.bpm.engine.impl.pvm.process.ActivityImpl in project camunda-bpm-platform by camunda.

the class EntitySerializationTest method testExecutionEntitySerialization.

public void testExecutionEntitySerialization() throws Exception {
    ExecutionEntity execution = new ExecutionEntity();
    ActivityImpl activityImpl = new ActivityImpl("test", null);
    activityImpl.getExecutionListeners().put("start", Collections.<ExecutionListener>singletonList(new TestExecutionListener()));
    execution.setActivity(activityImpl);
    ProcessDefinitionImpl processDefinitionImpl = new ProcessDefinitionImpl("test");
    processDefinitionImpl.getExecutionListeners().put("start", Collections.<ExecutionListener>singletonList(new TestExecutionListener()));
    execution.setProcessDefinition(processDefinitionImpl);
    TransitionImpl transitionImpl = new TransitionImpl("test", new ProcessDefinitionImpl("test"));
    transitionImpl.addExecutionListener(new TestExecutionListener());
    execution.setTransition(transitionImpl);
    execution.getProcessInstanceStartContext().setInitial(activityImpl);
    execution.setSuperExecution(new ExecutionEntity());
    execution.setActive(true);
    execution.setCanceled(false);
    execution.setBusinessKey("myBusinessKey");
    execution.setDeleteReason("no reason");
    execution.setActivityInstanceId("123");
    execution.setScope(false);
    byte[] data = writeObject(execution);
    execution = (ExecutionEntity) readObject(data);
    assertEquals("myBusinessKey", execution.getBusinessKey());
    assertEquals("no reason", execution.getDeleteReason());
    assertEquals("123", execution.getActivityInstanceId());
}
Also used : TransitionImpl(org.camunda.bpm.engine.impl.pvm.process.TransitionImpl) ExecutionEntity(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity) ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) ProcessDefinitionImpl(org.camunda.bpm.engine.impl.pvm.process.ProcessDefinitionImpl)

Aggregations

ActivityImpl (org.camunda.bpm.engine.impl.pvm.process.ActivityImpl)94 Deployment (org.camunda.bpm.engine.test.Deployment)29 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)12 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)12 ProcessDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity)10 ScopeImpl (org.camunda.bpm.engine.impl.pvm.process.ScopeImpl)10 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)8 TransitionImpl (org.camunda.bpm.engine.impl.pvm.process.TransitionImpl)8 EventSubscriptionEntity (org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity)7 PvmExecutionImpl (org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl)7 MigrationInstruction (org.camunda.bpm.engine.migration.MigrationInstruction)5 ActivityBehavior (org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior)4 ArrayList (java.util.ArrayList)3 DeploymentCache (org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache)3 PvmTransition (org.camunda.bpm.engine.impl.pvm.PvmTransition)3 ConditionalEventBehavior (org.camunda.bpm.engine.impl.bpmn.behavior.ConditionalEventBehavior)2 MultiInstanceActivityBehavior (org.camunda.bpm.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior)2 SequentialMultiInstanceActivityBehavior (org.camunda.bpm.engine.impl.bpmn.behavior.SequentialMultiInstanceActivityBehavior)2 CoreModelElement (org.camunda.bpm.engine.impl.core.model.CoreModelElement)2 AsyncContinuationConfiguration (org.camunda.bpm.engine.impl.jobexecutor.AsyncContinuationJobHandler.AsyncContinuationConfiguration)2