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); }
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)); }
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); }
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); }