Universal Messaging 10.1 | Administration Guide | Universal Messaging Enterprise Manager | Administration Using Enterprise Manager | Scheduling | Universal Messaging Scheduling : Cluster Triggers Example
 
Universal Messaging Scheduling : Cluster Triggers Example

/*
This script tests the cluster triggers. It is assumed the cluster is created with 4 realms
named realm1, realm2, realm3, realm4
*/

scheduler myCluster{

declare Cluster myNode1("realm1");
declare Cluster myNode2("realm2");
declare Cluster myNode3("realm3");
declare Cluster myNode4("realm4");

/*
This will trigger when realm1 is online to the cluster
*/
when ( myNode1.nodeOnline == true ){
Logger.report("Realm1 online");
}

/*
This can also be written as
*/
when ( Cluster.nodeOnline("realm1") == true ){
Logger.report("Realm1 online");
}

when ( myNode2.nodeOnline == true ){
Logger.report("Realm2 online");
}

when ( myNode3.nodeOnline ==true ){
Logger.report("Realm3 online");
}

when ( myNode4.nodeOnline == true ){
Logger.report("Realm4 online");
}

when ( Cluster.hasQuorum == true ){
Logger.report("Cluster now has quorum and is running" );
}

when ( Cluster.isMaster("realm1") == true){
Logger.report("This local realm is the master realm of the cluster");
}

}

Copyright © 2013-2017 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release