Online Validation
Use case
Tell the user instantly whether an input value is correct
Return additional steps - based on the input
Limitations
You will limit the Offline capability because a request is made for each order lines registration
Types of Online Validation
Standard steps (steps in the standard Workflows)
Custom steps
Standard Step Validation
Standard validation can be set up in the following steps from the "standard" workflow
ToBin / FromBin
Lot number
Tote
Serial number
Quantity
Step 1: Setup In the mobile configuration
Add the "<validation>" tag in the service section, to enable the validators needed. Each required element needs to be enabled and have a document type set.
The "includeCollectedValues" attribute defines whether previously gathered steps should be added to the request
<service id="Pick" type="Order" orderType="Pick">
<requests>
<..>
</requests>
<validation>
<!-- Validators -->
<lotNumberValidation online="true" documentName="ValidateLotNumber" includeCollectedValues="true"/>
<serialNumberValidation online="true" documentName="ValidateSerialNumber"/>
<fromBinValidation online="true" documentName="ValidateFromBin"/>
<toBinValidation online="true" documentName="ValidateToBin"/>
<toteValidation online="true" documentName="ValidateTote"/>
<quantityValidation online="true" documentName="ValidateQuantity"/>
</validation>
</service>
OnlineValidation Request
ItemNumber, lineNumber and orderBackendId are always included, followed by the step setup for validation, and previously gathered steps if setup to do so.
XML Example
<?xml version="1.0" encoding="utf-8"?>
<request name="ValidateLotNumber" created="2021-12-14T11:22:30+01:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request">
<requestData name="ValidateLotNumber">
<itemNumber>TF-003</itemNumber>
<lineNumber>20000</lineNumber>
<orderBackendId>RE000160</orderBackendId>
<ExpirationDate>13-07-2022</ExpirationDate>
<lotNumber>ScannedLotNumber</lotNumber>
</requestData>
</request>
The online validation responses should look as follows.
XML Example
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response" messageid="07E64DA6-2335-40C1-83DB-5C40E3043083" status="Completed">
<responseData xmlns="http://schemas.taskletfactory.com/MobileWMS/BaseDataModel" />
</response>
If the status is returned as Completed, then the application will take that as a positive response. Another status will be interpreted as an error and will prevent the user from going forward.
Custom Step Validation
Generic step validation is a mechanism for validating any step in the workflow configuration, which does not have a specific validation element in the services section. This type of online validation still has the possibility to validate the current step and any previous step if set up to do so.
Configuration is done inside the workflow and looks as follows.
The request and response will look the same as the specific validation types.
Extended online validation functionality
Besides the capability to validate whether or not an entered value is accepted by the backend, several online validators also support returning additional information, and changing behavior.
Step Updates from Custom Validation
Available from v. 1.9.1
Step updates lets the backend return values as a response to an online request. The individual <step /> element needs to contain a name and a value. The name is used to identify a step in the current registration collector workflow, and the value is applied to that step. Currently step updates will only be applied to steps past the validating step.
The response should look as follows, where step updates is the wrapper element containing any specific step update.
Response for Type and Quantity
The generic online validator does have an extra feature when it comes to the Collector Step TypeAndQuantity step , which allows the backend to return a new display name for the scanned value.
So instead of e.g. displaying a serial number, the item number or a human-readable name can be displayed on the control.
Notice that the display value (TypeDisplay) needs to contain all the information.
XML Example
Returning a quantity
When utilizing lot or serial number validation, a quantity can be returned, which will be used as the quantity going forward.
Whether or not the user is allowed to edit the quantity can be set by the <ValueInteractionPermission> element.
ValueInteractionPermission can have three states.
AllowEdit - Allows the user to edit the value in the quantity step. User still sees quantity step
ApplyDirectly - Hides the quantity step altogether
VerifyOnly - "Disables" the quantity step. User still sees quantity step, but cannot edit it
XML Example
Returning registration collector steps
Available from v. 1.5.12
All standard online validators can return steps as part of the response to validation.
The response should look as follows:
XML Example
The registration collector configuration element can be combined with lot and serial number information elements, and should exist on the same xml node level.
Setting Serial Number Validation Level (optional)
When using Serial Number validation, you can also set the "ValidationLevel" for how restrictive to validating serial numbers.
The levels are:
Item: The same serial number can only be registered once per item, but multiple times across items.
Line: A serial number can only be registered once per order line, but multiple times per order.
Order (default): A serial number can only be registered once per order
None: Does not check for serial number uniqueness.
Empty input validation
Requirement: Tasklet Mobile WMS version 1.11.2
By default, the online validation does not handle empty input values. However, by adding the attribute validateEmptyValue
to the online
validator and set its corresponding step configuration in the workflow to optional
, the online validation will now work on empty input values as well. The following is an example on how this can be configured:
XML Example
Step 2: Handle validation in backend
See How-to: Online Validation for Line step
See also