Vous êtes sur la page 1sur 36

Ensure that data inserted into application satisfies predetermined formats and other defined input criteria

Client-side Validation
Server-side Validation

Processing takes place on the client


User enters data into a field
A script is run within the web-browser
If valid data, user proceeds to next step
If not valid, user is not allowed to proceed

To implement Client Side Validation, go to the HTML tab on


a harness or flow action rule and select the Enable Client
Side Validation check box

Read Only?
Displays as Read Only

Client Event
Controls dynamic form
actions on user updates
or values for this field

Read Only?
Displays as Read Only

There are two steps in implementing conditional displays:

Set the Controlling Field


Set Conditions for the Controlled Element

Open the Harness or Flow Action


rule that you want a conditional display.

Click the icon


to turn on wireframes

Select the field that you want


to be the controlling field.
The Field panel appears at the bottom of the left pane.

Find the Client Event row in the


Field panel of the screen and click the Find icon.

The Client Event Editor appears


Select one of the following values
for the event field:
OnChange:The event occurs
whenever the contents of the input
field changes
OnBlur:This event occurs
when the input field on the form loses focus

OnClick :The event occurs when the user clicks the the
check box or radio button.

Use the Action drop down to select


one of the following actions:

Hide/Show Elements:Causes properties,


sections, or layouts (the controlled elements)
to become visible or hidden dynamically,
based on the value of this controlling property

Refresh This Section Causes the section to be refreshed,


based on the value of this controlling property. The updated
form may contain different values supplied by an activity.

The address details will be


displayed only when the
user checks Add Shipping
Details check box

At runtime, a controlled element is visible or hidden


dynamically. You can control the following elements:
Fields in a cell
A layout
An included section
A container in a Harness rule

Complete the following steps to set the conditions for the


controlled element:
Open the rule that contains the element that you want to control
Click the
icon to turn on wireframes
Select the field, layout, section, or container that you want to be
the controlled element
Go to the Field, Layout, Section Include, or Container panel and fill
out the Visible When field. Enter a test condition for the property
value in the controlling field.
Select the Run on Client? check box

Processing takes place on the server

User enters data into a field


User makes a request to move to next step
Request is sent to server
Data is then validated on the server
If valid data, user proceeds to next step
If not valid, user is not allowed to proceed

Constraints
Edit Validate
Validate

Allows a comparative relationship to be defined between


property values that is expected to be true at all times.
If the constraint is not met, a message is displayed and the page is
marked as invalid
Are listed in the Decision Rule category

Is made up of three distinct parts


When
Require that
Else
.pyThreshold has a Value

When

False
GO

True
.pyThreshold between 0 and 100

Require that

True

False
Threshold is a percentage.
It should be between 0 and 100

Display Message

STOP

Each row defines a separate constraint


Order is not significant for different properties
Use expressions in the When and Require that conditions
to perform more complex processing

1.
2.
3.

Complete the New Rule form


Complete the Constraint Tab
Save the rule

Complete the New Rule form as appropriate

Rule Name should be reflective of


Purpose

Select from the standard When and Require that condition


templates that are available
2.Specify properties, other values, or freeform expressions as appropriate

1.Select a condition

Complete the History Tab and save


The fields on the History tab are not required for constraints, but it is
recommended that you enter values

Define a Java routine that tests the validity of an input value


Are listed in the Property rule category

Typically, the input value arrives from an operator who completes an


HTML form, but it may also arrive through an interface with an
external system
If validation fails, the input is rejected

Many standard edit validate rules are provided

1.
2.

Referenced in Property Rules


Referenced in Validate Rules

Edit validate rules can be


referenced directly against
a property
Causes the property to be
validated whenever the
harness is refreshed

Validate data entered by users or received from another


system or source
Allow edit validate rules to be called
Allow standard or custom error messages to be displayed
Are listed in the Process rule category

Must be explicitly called


By an activity
By a flow action

Edit Validate

Two standard validation are rules called by default


OnAdd
Is called when a new work object is created
Validate
Is called whenever there is a transition from one step to another in a
business process

1. Choosing the validation point


2. Creating the validation rule
3. Completing the entries

When do you want the operators input to be validated?


When the operator processes the Create button to create a new
work object?
Name your rule OnAdd - it will be calculated automatically

Whenever there is a transition from one step to another in the


flow?
Name your rule Validate - it will be called automatically

When the operator selects a particular flow action?


Choose a name of your choice you can specify the rule you have
created in the flow action rule form

When the operator presses a custom button?


Choose a name of your choice you can call the rule directly from the
activity that runs as a result of the button click

Complete the new rule form as appropriate


Name the rule OnAdd or Validate to have it called automatically

Enter appropriate name

Using the following as a guide


Validate Type
Validate Directly validates a top level property
Validate Each Directly validates an embedded property
Call Calls another validate record
Call for Each Calls another validate record
on an embedded page

For Validate/Validate Each we define the following:

Property to be validated
Expression - to be checked
Message - to be displayed when the validation fails
Required - to check if the property is non blank
Conditions - to enable expression and message fields
Continue - to proceed with later validations even when the current
validate entry fails

For Call/Call each we define the following:


Steppage Page on which the validate rule has to be executed.
Validate The Validate Rule to be executed

Allows server side validation rules to be processed without


refreshing the screen
Uses Asynchronous Java and XML technology (AJAX)

Error notification occurs when user focus leaves the field

1. User tabs out of field

2. Server validation
rules are run

3. Screen is updated
without need for refresh

Must be enabled on the harness


Allows the specialized JavaScript required to be embedded into
the HTML generated by the harness rule
Allows the specialized JavaScript required to be embedded into the
HTML generated by the harness rule

The following server-side validation rules are called:


Edit validate rules specified on property rules
Constraint rules
Validate rules (OnAdd and Validate)

Enables immediate
validation and display

Vous aimerez peut-être aussi