Saturday, April 25, 2015

IBM BPM Coach Validation Example

1-Create Human Service with name "testValidate"

 2-Create Private Variable "text"



3-add coach to the human service name it "testvalidation"



4-add text coach and bind it to the text variable


5-select the path from the TestValidation coach to the end event and then change fire validation setting to before then add a server script named "ValidationScript" and connect it like the screen shot



6-add server script and put the following code in it

if(tw.local.text=="bpm")
{
tw.system.addCoachValidationError(tw.system.coachValidation, "tw.local.text", "error in validation")
}

7- run the human service and write bpm at the screen shot then click ok you will see that the validation is fired



No comments:

Post a Comment