Search in sources :

Example 16 with ActivityImpl

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

the class ExecutionEntity method getProcessInstanceStartContext.

@Override
public ProcessInstanceStartContext getProcessInstanceStartContext() {
    if (isProcessInstanceExecution()) {
        if (startContext == null) {
            ActivityImpl activity = getActivity();
            startContext = new ProcessInstanceStartContext(activity);
        }
    }
    return super.getProcessInstanceStartContext();
}
Also used : ProcessInstanceStartContext(org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext) ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl)

Example 17 with ActivityImpl

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

the class ExecutionEntity method startWithFormProperties.

public void startWithFormProperties(VariableMap properties) {
    provideTenantId(properties);
    if (isProcessInstanceExecution()) {
        ActivityImpl initial = processDefinition.getInitial();
        ProcessInstanceStartContext processInstanceStartContext = getProcessInstanceStartContext();
        if (processInstanceStartContext != null) {
            initial = processInstanceStartContext.getInitial();
        }
        FormPropertyStartContext formPropertyStartContext = new FormPropertyStartContext(initial);
        formPropertyStartContext.setFormProperties(properties);
        startContext = formPropertyStartContext;
        initialize();
        initializeTimerDeclarations();
        fireHistoricProcessStartEvent();
    }
    performOperation(PvmAtomicOperation.PROCESS_START);
}
Also used : ProcessInstanceStartContext(org.camunda.bpm.engine.impl.pvm.runtime.ProcessInstanceStartContext) ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl) FormPropertyStartContext(org.camunda.bpm.engine.impl.persistence.entity.util.FormPropertyStartContext)

Example 18 with ActivityImpl

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

the class OnlyOnceMappedActivityInstructionValidator method validate.

public void validate(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) {
    ActivityImpl sourceActivity = instruction.getSourceActivity();
    List<ValidatingMigrationInstruction> instructionsForSourceActivity = instructions.getInstructionsBySourceScope(sourceActivity);
    if (instructionsForSourceActivity.size() > 1) {
        addFailure(sourceActivity.getId(), instructionsForSourceActivity, report);
    }
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl)

Example 19 with ActivityImpl

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

the class SameBehaviorInstructionValidator method validate.

public void validate(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) {
    ActivityImpl sourceActivity = instruction.getSourceActivity();
    ActivityImpl targetActivity = instruction.getTargetActivity();
    Class<?> sourceBehaviorClass = sourceActivity.getActivityBehavior().getClass();
    Class<?> targetBehaviorClass = targetActivity.getActivityBehavior().getClass();
    if (!sameBehavior(sourceBehaviorClass, targetBehaviorClass)) {
        report.addFailure("Activities have incompatible types " + "(" + sourceBehaviorClass.getSimpleName() + " is not compatible with " + targetBehaviorClass.getSimpleName() + ")");
    }
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl)

Example 20 with ActivityImpl

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

the class GatewayMappingValidator method validate.

@Override
public void validate(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) {
    ActivityImpl targetActivity = instruction.getTargetActivity();
    if (isWaitStateGateway(targetActivity)) {
        validateIncomingSequenceFlows(instruction, instructions, report);
        validateParentScopeMigrates(instruction, instructions, report);
        validateSingleInstruction(instruction, instructions, report);
    }
}
Also used : ActivityImpl(org.camunda.bpm.engine.impl.pvm.process.ActivityImpl)

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