- type: javascript
name: validate_replica_lists
script: |
try {
// Retrieve the replica list variables from the context.
// These variables should have been set in a prior state.
let listV1 = replica_list_V1;
let listV2 = replica_list_V2;
let listV3 = replica_list_V3;
// Verify that each variable is defined and non-empty.
if (!listV1) throw new Error("replica_list_V1 not found");
if (!listV2) throw new Error("replica_list_V2 not found");
if (!listV3) throw new Error("replica_list_V3 not found");
// All required variables are found: proceed to the next state.
proceed("✅ All replica lists were successfully found.\n" +
"List V1: " + listV1 + "\n" +
"List V2: " + listV2 + "\n" +
"List V3: " + listV3);
} catch (err) {
// If any error occurs, record the failure and output the error message.
fail("❌ Error: " + err.message);
}





0 comments:
Post a Comment