Validating coach data after exiting a coach
To validate the coach data in a client-side human service after exiting the coach, you can use a called service or a client-side script to validate the coach data.
About this task
You can use coach data validation in a client-side human
service after exiting the coach when the following situations
apply:
- The validation must access private or confidential data that should not be made available to the client. Server-side validation is the more secure approach.
- The validation must access server-based data or large amounts of data to do the validation. For example, you have an Order coach in which users can order parts and you want to validate that a part is in stock. It is not practical to use a coach data validation without exiting the coach in this situation. Loading large amounts of data impacts the performance of the client.
- You are migrating heritage human services to client-side human services and you want to reuse some or all of the validation scripts you had in the heritage human service. The client-side human services call the validation service that you previously used. However, examine the script logic to move appropriate validation code to the client to minimize server calls.
The following procedure uses a help desk client-side human service
as an example. The human service consists of several fields and
a Create Ticket button.
Tip: Where possible, combine your
server-side validation with server-side logic that does work
as shown in the examples in this procedure. That is, a single server-side
service validates the ticket and also saves it. While you could do
this in separate steps in the human service, combining them in
this way provides better performance. It also places related
logic together to produce more maintainable models.
Procedure
To validate the coach data after exiting the coach, complete the following steps: