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();
}
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);
}
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);
}
}
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() + ")");
}
}
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);
}
}
Aggregations