use of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity in project camunda-bpm-platform by camunda.
the class EventSubscriptionJobDeclaration method newJobInstance.
protected MessageEntity newJobInstance(EventSubscriptionEntity eventSubscription) {
MessageEntity message = new MessageEntity();
// initialize job
message.setActivityId(eventSubscription.getActivityId());
message.setExecutionId(eventSubscription.getExecutionId());
message.setProcessInstanceId(eventSubscription.getProcessInstanceId());
ProcessDefinitionEntity processDefinition = eventSubscription.getProcessDefinition();
if (processDefinition != null) {
message.setProcessDefinitionId(processDefinition.getId());
message.setProcessDefinitionKey(processDefinition.getKey());
}
return message;
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity in project camunda-bpm-platform by camunda.
the class UserOperationLogContextEntryBuilder method inContextOf.
public UserOperationLogContextEntryBuilder inContextOf(JobDefinitionEntity jobDefinition) {
entry.setJobDefinitionId(jobDefinition.getId());
entry.setProcessDefinitionId(jobDefinition.getProcessDefinitionId());
entry.setProcessDefinitionKey(jobDefinition.getProcessDefinitionKey());
if (jobDefinition.getProcessDefinitionId() != null) {
ProcessDefinitionEntity processDefinition = Context.getProcessEngineConfiguration().getDeploymentCache().findDeployedProcessDefinitionById(jobDefinition.getProcessDefinitionId());
entry.setDeploymentId(processDefinition.getDeploymentId());
}
return this;
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity in project camunda-bpm-platform by camunda.
the class DefaultConditionHandler method evaluateConditionStartByEventSubscription.
protected List<ConditionHandlerResult> evaluateConditionStartByEventSubscription(CommandContext commandContext, ConditionSet conditionSet) {
List<EventSubscriptionEntity> subscriptions = findConditionalStartEventSubscriptions(commandContext, conditionSet);
if (subscriptions.isEmpty()) {
throw LOG.exceptionWhenEvaluatingConditionalStartEvent();
}
List<ConditionHandlerResult> results = new ArrayList<ConditionHandlerResult>();
for (EventSubscriptionEntity subscription : subscriptions) {
ProcessDefinitionEntity processDefinition = subscription.getProcessDefinition();
if (!processDefinition.isSuspended()) {
ActivityImpl activity = subscription.getActivity();
if (evaluateCondition(conditionSet, activity)) {
results.add(new ConditionHandlerResult(processDefinition, activity));
}
}
}
return results;
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity in project camunda-bpm-platform by camunda.
the class DeploymentCacheCfgTest method testPlugInOwnCacheImplementation.
@Test
public void testPlugInOwnCacheImplementation() {
// given
DeploymentCache deploymentCache = processEngineConfiguration.getDeploymentCache();
// when
Cache<String, ProcessDefinitionEntity> cache = deploymentCache.getProcessDefinitionCache();
// then
assertThat(cache, instanceOf(MyCacheImplementation.class));
}
use of org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity in project camunda-bpm-platform by camunda.
the class FormPropertyHelper method initFormPropertiesOnScope.
public static void initFormPropertiesOnScope(VariableMap variables, PvmExecutionImpl execution) {
ProcessDefinitionEntity pd = (ProcessDefinitionEntity) execution.getProcessDefinition();
StartFormHandler startFormHandler = pd.getStartFormHandler();
startFormHandler.submitFormVariables(variables, execution);
}
Aggregations