Ejemplo n.º 1
0
 public override void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new ControlledCommand <Void>(activeThread, new SetJobDefinitionPriorityCmd(jobDefinitionId, priority, cascade)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
 }
Ejemplo n.º 2
0
 public virtual void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.Execute(new ControlledCommand <object>(activeThread, new SignalCmd(executionId, null, null, null)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     Debug.WriteLine(TestContext.CurrentContext.Test.Name + " ends");
 }
Ejemplo n.º 3
0
 public virtual void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new ControlledCommand(activeThread, new ActivityInstanceCancellationCmd(processInstanceId, activityInstanceId)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
Ejemplo n.º 4
0
 public override void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new ControlledCommand <Void>(activeThread, createSuspendCommand()));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
Ejemplo n.º 5
0
 public virtual void run()
 {
     try
     {
         outerInstance.runtimeService.signal(executionId);
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
Ejemplo n.º 6
0
 public virtual void run()
 {
     try
     {
         outerInstance.runtimeService.Signal(executionId);
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     Debug.WriteLine(TestContext.CurrentContext.Test.Name + " ends");
 }
 public virtual void run()
 {
     try
     {
         ESS.FW.Bpm.Engine.Impl.JobExecutor.JobExecutor jobExecutor = outerInstance.processEngineConfiguration.JobExecutor;
         jobs = outerInstance.processEngineConfiguration.CommandExecutorTxRequired.Execute(new ControlledCommand <AcquiredJobs>(activeThread, new AcquireJobsCmd(jobExecutor)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     Debug.WriteLine(TestContext.CurrentContext.Test.Name + " ends");
 }
Ejemplo n.º 8
0
 public virtual void run()
 {
     try
     {
         JobExecutor jobExecutor = outerInstance.processEngineConfiguration.JobExecutor;
         jobs = (AcquiredJobs)outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new ControlledCommand(activeThread, new AcquireJobsCmd(jobExecutor)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
Ejemplo n.º 9
0
 public override void run()
 {
     try
     {
         JobFailureCollector jobFailureCollector = new JobFailureCollector(jobId);
         ExecuteJobHelper.executeJob(jobId, outerInstance.processEngineConfiguration.CommandExecutorTxRequired, jobFailureCollector, new ControlledCommand <Void>(activeThread, new ExecuteJobsCmd(jobId, jobFailureCollector)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
 public virtual void run()
 {
     try
     {
         // Todo: ControlledCommand<T>构造,传参是否正确。
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.Execute(new ControlledCommand <ActivityInstanceCancellationCmd>(activeThread, new ActivityInstanceCancellationCmd(ProcessInstanceId, activityInstanceId) as ICommand <ActivityInstanceCancellationCmd>));
         //outerInstance.processEngineConfiguration.CommandExecutorTxRequired.Execute(new ControlledCommand<ActivityInstanceCancellationCmd>(activeThread, new ActivityInstanceCancellationCmd(ProcessInstanceId, activityInstanceId)));
     }
     catch (OptimisticLockingException e)
     {
         this.exception = e;
     }
     Debug.WriteLine(TestContext.CurrentContext.Test.Name + " ends");
 }
 public virtual void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.Execute(new ControlledCommand <object>(activeThread, new SetTaskVariablesCmd(taskId, Collections.SingletonMap(VariableName, variableValue), false)));
     }
     catch (OptimisticLockingException e)
     {
         this.optimisticLockingException = e;
     }
     catch (System.Exception e)
     {
         this.exception = e;
     }
     Debug.WriteLine(TestContext.CurrentContext.Test.Name + " ends");
 }
Ejemplo n.º 12
0
 public virtual void run()
 {
     try
     {
         outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new ControlledCommand(activeThread, new SetTaskVariablesCmd(taskId, Collections.singletonMap(variableName, variableValue), false)));
     }
     catch (OptimisticLockingException e)
     {
         this.optimisticLockingException = e;
     }
     catch (Exception e)
     {
         this.exception = e;
     }
     LOG.debug(Name + " ends");
 }
Ejemplo n.º 13
0
            public virtual void run()
            {
                IDictionary <string, TopicFetchInstruction> instructions = new Dictionary <string, TopicFetchInstruction>();

                TopicFetchInstruction instruction = new TopicFetchInstruction(topic, 10000L);

                instructions[topic] = instruction;

                try
                {
                    fetchedTasks = outerInstance.processEngineConfiguration.CommandExecutorTxRequired.execute(new FetchExternalTasksCmd(workerId, results, instructions));
                }
                catch (OptimisticLockingException e)
                {
                    exception = e;
                }
            }
Ejemplo n.º 14
0
        protected internal static void InvokeJobListener(ICommandExecutor commandExecutor, JobFailureCollector jobFailureCollector)
        {
            if (!string.IsNullOrEmpty((jobFailureCollector.jobId)))
            {
                if (jobFailureCollector.Failure != null)
                {
                    // the failed job listener is responsible for decrementing the retries and logging the exception to the DB.
                    var failedJobListener = CreateFailedJobListener(commandExecutor, jobFailureCollector.Failure, jobFailureCollector.JobId);

                    OptimisticLockingException exception = CallFailedJobListenerWithRetries(commandExecutor, failedJobListener);
                    if (exception != null)
                    {
                        throw exception;
                    }
                }
                else
                {
                    var successListener = CreateSuccessfulJobListener(commandExecutor);
                    commandExecutor.Execute(successListener);
                }
            }
        }
Ejemplo n.º 15
0
        protected internal static void invokeJobListener(CommandExecutor commandExecutor, JobFailureCollector jobFailureCollector)
        {
            if (!string.ReferenceEquals(jobFailureCollector.JobId, null))
            {
                if (jobFailureCollector.Failure != null)
                {
                    // the failed job listener is responsible for decrementing the retries and logging the exception to the DB.

                    FailedJobListener failedJobListener = createFailedJobListener(commandExecutor, jobFailureCollector.Failure, jobFailureCollector.JobId);

                    OptimisticLockingException exception = callFailedJobListenerWithRetries(commandExecutor, failedJobListener);
                    if (exception != null)
                    {
                        throw exception;
                    }
                }
                else
                {
                    SuccessfulJobListener successListener = createSuccessfulJobListener(commandExecutor);
                    commandExecutor.execute(successListener);
                }
            }
        }
Ejemplo n.º 16
0
 public virtual void debugCaughtOptimisticLockingException(OptimisticLockingException e)
 {
     logDebug("008", "caught optimistic locking excpetion", e);
 }