
coreStartup._startup.rfx Maven / Gradle / Ivy
/**
* The MIT License (MIT)
*
* Copyright (c) 2011-2016 Incapture Technologies LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
//
// Copyright (C) 2011-2012 Incapture Technologies LLC
//
// This is an autogenerated license statement. When copyright notices appear below
// this one that copyright supercedes this statement.
//
// Unless required by applicable law or agreed to in writing, software is distributed
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied.
//
// Unless explicit permission obtained in writing this software cannot be distributed.
//
// A Reflex startup script
println("Standard Rapture Core _startup");
// Setup default templates for in memory use
#admin.addTemplate("STD", "NREP {} using MEMORY {}", false);
#admin.addTemplate("STDTMP", "NREP {} using MEMORY {}", false);
#audit.setup(false);
// Create exchange information if it does not exist for the kernel pipeline
xDomainName = "main";
#pipeline.registerExchangeDomain("//" + xDomainName,_cfg.DefaultExchange());
// Create a topic exchange for internal subscription
#pipeline.createTopicExchange(xDomainName, "raptureTopic");
categories = _cfg.Categories();
for category in categories.split(",") do
#pipeline.setupStandardCategory(category);
end
// Register a kernel notification handler if one is not setup
if ! ( #notification.notificationManagerExists('//system/kernel') ) do
println("Creating notification provider for the kernel");
#notification.createNotificationManager('//system/kernel', _cfg.DefaultNotification(), 'kernel');
end
//set up the decision process storage
#decision.setWorkOrderIdGenConfig(_cfg.DefaultDecisionIdGenConfig(), false);
#idGen.setupDefaultIdGens(false);
#lock.createLockManager("lock://kernel", "LOCKING USING MEMORY {}", "");
#lock.createLockManager("lock://semaphore", "LOCKING USING MEMORY {}", "");
#lock.createLockManager("lock://workflow", "LOCKING USING MEMORY {}", "");
//set up the blob storage for the system blob
if _cfg.SystemBlobConfigOn() do
systemBlobRepo = "//sys.blob";
if !#blob.blobRepoExists(systemBlobRepo) do
println("Blob repo does not exist, creating...");
#blob.createBlobRepo(systemBlobRepo, _cfg.DefaultSystemBlobConfig(), _cfg.DefaultSystemBlobFoldersConfig());
end
end
if (!#audit.doesAuditLogExist("//workflow")) do
println("Workflow log does not exist, creating...");
#audit.createAuditLog("//workflow", _cfg.DefaultWorkflowAuditLog());
end
if (!#audit.doesAuditLogExist("//perf")) do
println("Perf audit log does not exist, creating...");
#audit.createAuditLog("//perf", _cfg.DefaultPerfAuditLog());
end
#async.setupDefaultWorkflows(false);
#event.addEventMessage("//event/alert", 'application/vnd.rapture.event.alert', 'alpha', {});
// set up elastic search
#sys.putConnectionInfo("ES", fromjson("{ \"host\" : \"127.0.0.1\", \"port\" : 9300, \"username\" : \"rapture\", \"password\" : \"rapture\", \"dbName\" : \"default\", \"instanceName\" : \"default\", \"CLASS\" : \"rapture.common.ConnectionInfo\" }"));
if _cfg.FullTextSearchOn() do
if !#search.searchRepoExists(_cfg.FullTextSearchDefaultRepo()) do
println("Creating search repo " + _cfg.FullTextSearchDefaultRepo());
#search.createSearchRepo(_cfg.FullTextSearchDefaultRepo(), _cfg.FullTextSearchDefaultConfig());
end
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy