// Check if data is in Input and if data is an Array
if(data && Array.isArray(data)){
// Iterate over data array
// Check if dat (member of data array) has parameter date;
// Create BULK input data for DT
log(JSON.stringify(DTdata));
// Call first DT with FIRST_MATCH strategy
const DTresult = DR.solve("0000-0000-0000-0000", DTdata, 1, SolverStrategy.FIRST_MATCH);
log(JSON.stringify(DTresult));
// transform data from DT to another DT
for(let res of DTresult){
if(res[0].result && res[0].result == "BLOCKED"){
// Create input data for DT
"total amount": dates.length,
log(JSON.stringify(DTdata2));
// Call second DT with FIRST_MATCH strategy
const DTresult2 = DR.solve("1111-1111-1111-1111", DTdata2, 1, SolverStrategy.FIRST_MATCH);
log(JSON.stringify(DTresult2));
// pass result from DT to SR result
output.result = DTresult2[0].result;