Exemple #1
0
 protected internal virtual string describeContext <T1>(JobDeclaration <T1> jobDeclaration, ExecutionEntity executionEntity)
 {
     return("Job " + jobDeclaration.ActivityId + "/" + jobDeclaration.JobHandlerType + " instantiated "
            + "in context of " + executionEntity);
 }
Exemple #2
0
        protected internal override long?getProcessDefinitionPriority <T1>(ExecutionEntity execution, JobDeclaration <T1> jobDeclaration)
        {
            ProcessDefinitionImpl processDefinition = jobDeclaration.ProcessDefinition;

            return(getProcessDefinedPriority(processDefinition, BpmnParse.PROPERTYNAME_JOB_PRIORITY, execution, describeContext(jobDeclaration, execution)));
        }
Exemple #3
0
 protected internal virtual long?getActivityPriority <T1>(ExecutionEntity execution, JobDeclaration <T1> jobDeclaration)
 {
     if (jobDeclaration != null)
     {
         ParameterValueProvider priorityProvider = jobDeclaration.JobPriorityProvider;
         if (priorityProvider != null)
         {
             return(evaluateValueProvider(priorityProvider, execution, describeContext(jobDeclaration, execution)));
         }
     }
     return(null);
 }
Exemple #4
0
        protected internal override long?getSpecificPriority <T1>(ExecutionEntity execution, JobDeclaration <T1> param, string jobDefinitionId)
        {
            long?specificPriority             = null;
            JobDefinitionEntity jobDefinition = getJobDefinitionFor(jobDefinitionId);

            if (jobDefinition != null)
            {
                specificPriority = jobDefinition.OverridingJobPriority;
            }

            if (specificPriority == null)
            {
                ParameterValueProvider priorityProvider = param.JobPriorityProvider;
                if (priorityProvider != null)
                {
                    specificPriority = evaluateValueProvider(priorityProvider, execution, describeContext(param, execution));
                }
            }
            return(specificPriority);
        }