AnsweredAssumed Answered

setOperatorStatus not working

Question asked by alex.zwinge on Mar 30, 2016
Latest reply on Mar 31, 2016 by IanRich

Just want to make sure I'm not crazy before I open a support ticket. I've think I've seen this behavior a few times before but it wasn't vital in those cases so I sort of didn't mind but in this case, it's vital the op fail, I suppose i could just throw an error but this is the PAM way of doing it so I thought I should get it working. Anyways, this snipped of code doesn't seem to work inside the 'main' portion of a javascript operator:

 

(function () {
     // other code

     if (!profiles[profileName]) { // confirmed this evaluates to true
          setOperatorStatus('failure', -1, 'blah blah blah'); // this does not work, the op hits the return and exits normally
          return;
     }

     // other code 
}());

 

I don't see anything wrong with this, should work, right? I removed the return thinking maybe it's an asynchronous operation on the back end so it was just hitting the return before failing the op, but that didn't work either (and really doenst make sense for it to work like that). Any ideas?

Outcomes