There may be a couple of issues causing the infinite execution that causes the hanging issue:
If the JavaScript block is trying to execute a rule that itself contains JavaScript that calls the same rule, it could create an infinite loop
The execute() command might need to be handled asynchronously
I suggest you try these approaches:
// Option 1: Use async/await
execute JavaScript text starting from next line and ending with [END]
var tenantName = "Ford CSP";
await testRigor.execute('map tenant name "' + tenantName + '" to vinDecoder domain');
[END]
// Option 2: Use a callback
execute JavaScript text starting from next line and ending with [END]
var tenantName = "Ford CSP";
testRigor.execute('map tenant name "' + tenantName + '" to vinDecoder domain', function(result) {
// Handle the result here
console.log('Rule execution completed');
});
[END]
Do you mind sharing what’s inside the reusable rule you’re trying to execute?
And are you seeing any specific error massages in the logs?