It's all about the answers!

Ask a question

Validator scripting help

Paul Grayem (21810) | asked Sep 18 '12, 4:09 a.m.
 Hi I'm trying to code a validator but struggling to get it working.

I have a WI and one of the tabs has a 20 or so review questions which has the custom enumeration values PASS and FAIL.

The reviewer should be able to answer these questions as necessary when in the REVIEW state so that any rework can be carried out by the producer. However once the review has been passed and sent to moderation state all the questions must be in a passed state. 

I have looked at examples to ty and code this but nothing seems to work

One answer

permanent link
Ralph Schoon (61.8k33643) | answered Sep 18 '12, 5:42 a.m.

I am not sure what you try. If you try to make sure the work item can only moved into the Moderation State if all questions/answers are pass then I think you can't do this with a validator.

I think you would have to use a java based plug in precondition or advisor. It can detect a state change to the Moderation State and prevent the work item from saving. has some gudance how this works. It implements a follow up action, but an advisor is only different as
  • It uses
  • It also uses as operation ID (see for all id's)
  • It needs to implement IOperationAdvisor
The rest is pretty much the same.

Your answer

Register or to post your answer.