예제 #1
0
        private WorkflowRuntime CreateRuntimeRavenDB()
        {
            var provider = new RavenDBProvider(new Raven.Client.Document.DocumentStore()
            {
                Url = Parameters.DBUrl,
                DefaultDatabase = Parameters.Database
            });

            callbackProvider = new WorkflowCallbackProvider(Parameters, provider);

            var builder = new WorkflowBuilder<XElement>(callbackProvider, new XmlWorkflowParser(), provider).WithDefaultCache();
            return new WorkflowRuntime(Parameters.RuntimeId)
                .WithBuilder(builder)
                .WithPersistenceProvider(provider);
        }
예제 #2
0
        private WorkflowRuntime CreateRuntimeMSSQL()
        {
            var generator = new OptimaJet.Workflow.DbPersistence.DbXmlWorkflowGenerator(Parameters.ConnectionString);
            callbackProvider = new WorkflowCallbackProvider(Parameters, generator);
            var builder = new WorkflowBuilder<XElement>(callbackProvider,
                new XmlWorkflowParser(),
                new OptimaJet.Workflow.DbPersistence.DbSchemePersistenceProvider(Parameters.ConnectionString)
                ).WithDefaultCache();

            return new WorkflowRuntime(Parameters.RuntimeId)
                .WithBuilder(builder)
                .WithPersistenceProvider(new OptimaJet.Workflow.DbPersistence.DbPersistenceProvider(Parameters.ConnectionString));
        }
예제 #3
0
 private WorkflowRuntime CreateRuntimePostgreSQL()
 {
     var provider = new OptimaJet.Workflow.PostgreSQL.PostgreSQLProvider(Parameters.ConnectionString);
     callbackProvider = new WorkflowCallbackProvider(Parameters, provider);
     var builder = new WorkflowBuilder<XElement>(callbackProvider, new XmlWorkflowParser(), provider).WithDefaultCache();
     return new WorkflowRuntime(Parameters.RuntimeId)
         .WithBuilder(builder)
         .WithPersistenceProvider(provider);
 }
예제 #4
0
        private WorkflowRuntime CreateRuntimeMongoDB()
        {
            var provider = new OptimaJet.Workflow.MongoDB.MongoDBProvider(new MongoClient(Parameters.DBUrl).GetServer().GetDatabase(Parameters.Database));
            callbackProvider = new WorkflowCallbackProvider(this.Parameters, provider);

            var builder = new WorkflowBuilder<XElement>(callbackProvider, new XmlWorkflowParser(), provider).WithDefaultCache();
            return new WorkflowRuntime(Parameters.RuntimeId)
                .WithBuilder(builder)
                .WithPersistenceProvider(provider);
        }