Beispiel #1
0
        public static void Main(string[] args)
        {
            ProcessEngineImpl processEngine   = (ProcessEngineImpl)ProcessEngines.DefaultProcessEngine;
            CommandExecutor   commandExecutor = processEngine.ProcessEngineConfiguration.CommandExecutorTxRequired;

            commandExecutor.execute(new CommandAnonymousInnerClass());
        }
Beispiel #2
0
        // queries /////////////////////////////////

        protected internal virtual CaseSentryPartQueryImpl createCaseSentryPartQuery()
        {
            ProcessEngine processEngine = rule.ProcessEngine;
            ProcessEngineConfigurationImpl processEngineConfiguration = (ProcessEngineConfigurationImpl)processEngine.ProcessEngineConfiguration;
            CommandExecutor commandExecutor = processEngineConfiguration.CommandExecutorTxRequiresNew;

            return(new CaseSentryPartQueryImpl(commandExecutor));
        }
Beispiel #3
0
            public virtual Void execute(CommandContext commandContext)
            {
                assertEquals(this, Context.CommandInvocationContext.Command);

                if (innerCommand != null)
                {
                    CommandExecutor commandExecutor = Context.ProcessEngineConfiguration.CommandExecutorTxRequired;
                    commandExecutor.execute(innerCommand);

                    // should still be correct after command invocation
                    assertEquals(this, Context.CommandInvocationContext.Command);
                }

                return(null);
            }
Beispiel #4
0
        protected internal virtual HistoryCleanupHandler initCleanupHandler(HistoryCleanupJobHandlerConfiguration configuration, CommandContext commandContext)
        {
            HistoryCleanupHandler cleanupHandler = null;

            if (isHistoryCleanupStrategyRemovalTimeBased(commandContext))
            {
                cleanupHandler = new HistoryCleanupRemovalTime();
            }
            else
            {
                cleanupHandler = new HistoryCleanupBatch();
            }

            CommandExecutor commandExecutor = commandContext.ProcessEngineConfiguration.CommandExecutorTxRequiresNew;

            string jobId = commandContext.CurrentJob.Id;

            return(cleanupHandler.setConfiguration(configuration).setCommandExecutor(commandExecutor).setJobId(jobId));
        }
Beispiel #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testTablePresentWithSchemaAndPrefix() throws java.sql.SQLException
        public virtual void testTablePresentWithSchemaAndPrefix()
        {
            PooledDataSource pooledDataSource = new PooledDataSource(ReflectUtil.ClassLoader, "org.h2.Driver", "jdbc:h2:mem:DatabaseTablePrefixTest;DB_CLOSE_DELAY=1000", "sa", "");

            Connection connection = pooledDataSource.Connection;

            connection.createStatement().execute("drop schema if exists " + SCHEMA_NAME);
            connection.createStatement().execute("create schema " + SCHEMA_NAME);
            connection.createStatement().execute("create table " + SCHEMA_NAME + "." + PREFIX_NAME + "SOME_TABLE(id varchar(64));");
            connection.close();

            ProcessEngineConfigurationImpl config1 = createCustomProcessEngineConfiguration().setProcessEngineName("DatabaseTablePrefixTest-engine1").setDataSource(pooledDataSource).setDatabaseSchemaUpdate("NO_CHECK");

            config1.DatabaseTablePrefix       = SCHEMA_NAME + "." + PREFIX_NAME;
            config1.DatabaseSchema            = SCHEMA_NAME;
            config1.DbMetricsReporterActivate = false;
            ProcessEngine   engine          = config1.buildProcessEngine();
            CommandExecutor commandExecutor = config1.CommandExecutorTxRequired;

            commandExecutor.execute(new CommandAnonymousInnerClass(this));

            engine.close();
        }
Beispiel #6
0
 public DeleteDeploymentFailListener(string deploymentId, ProcessApplicationReference processApplicationReference, CommandExecutor commandExecutor)
 {
     this.deploymentId = deploymentId;
     this.processApplicationReference = processApplicationReference;
     this.commandExecutor             = commandExecutor;
 }
Beispiel #7
0
        protected internal virtual CaseSentryPartEntity readCaseSentryPart()
        {
            CommandExecutor commandExecutor = processEngineConfiguration.CommandExecutorTxRequiresNew;

            return((new CaseSentryPartQueryImpl(commandExecutor)).singleResult());
        }
Beispiel #8
0
 public virtual void executeJob(string job, CommandExecutor commandExecutor)
 {
     ExecuteJobHelper.executeJob(job, commandExecutor);
 }
Beispiel #9
0
 public DbMetricsReporter(MetricsRegistry metricsRegistry, CommandExecutor commandExecutor)
 {
     this.metricsRegistry = metricsRegistry;
     this.commandExecutor = commandExecutor;
     initMetricsCollectionTask();
 }
Beispiel #10
0
 public UpdateJobSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
 {
     this.commandExecutor = commandExecutor;
 }
Beispiel #11
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        public virtual void setUp()
        {
            commandExecutor = ((ProcessEngineConfigurationImpl)bootstrapRule.ProcessEngine.ProcessEngineConfiguration).CommandExecutorTxRequired;
            historyService  = bootstrapRule.ProcessEngine.HistoryService;
        }