Skip to content

Commit b0fadf4

Browse files
authored
Create MID Server availability inside MID cluster.js
1 parent 8bd1843 commit b0fadf4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var flag = 0; //initial flag to 0
2+
var glideCluster = new GlideRecord('ecc_agent_cluster_member_m2m'); //m2m table stores cluser and all the midserver relation
3+
glideCluster.addQuery('cluster', "sys_id of the cluster"); //replace "sys_id of the cluster" with sys_id of the MID server cluster
4+
glideCluster.query();
5+
while(glideCluster.next()){
6+
if(glideCluster.agent.status=='Up'){
7+
outputs.flag = 1; //if any one MID server is up proceed next step in the integration
8+
break;
9+
}
10+
//else returns 0 and no MID server are up inside the cluster, abort integration logic and report to the concerened team

0 commit comments

Comments
 (0)