Implementing immediate validation examples

The examples outlines how immediate validation works in core (SSP) forms by applying custom validation actions alongside core actions. Each example shows how validation logic actively responds to different posting and withdrawal actions, highlights error handling, and user feedback.

Use these examples to guide your implementation and ensure that validation rules enforce business requirements and improve the user experience.

Actions Custom validation Result
Posting a block of shift to the billboard for ASV, RQ, or CS using createActionResponse API workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away. FAILED",true) An error message is displayed indicating the shift is less than two days away.
Posting a single or a block of shift for ASV, RQ, or CS using createActionResponseException API workflowService.createActionResponseException("Shift is less than 2 days away.", null,true) An error message is displayed indicating that an application error has occurred and provides a reference ID to contact system admin support.
Posting a single shift to the billboard for ASV, RQ, or CS using createActionResponse API workflowService.createActionResponse(context,"Failure","Failed to Post",true) An error message is displayed: Failed to Post.
Posting one or multiple shifts on LFSO workflowService.createActionResponse(context,"Failure","Failed Post",true) An error message is displayed: Failed Post and indicates the failed shifts that are not posted.
Posting an unassigned shift on the SSP Manage Schedule using createActionResponseException API workflowService.createActionResponseException("Shift is less than 2 days away.", null,true)

An error message is displayed indicating that an application error has occurred and provides a reference ID to contact system admin support.

You can view the error details in Error Log Management.

Posting an unassigned shift on the SSP Manage Schedule using createActionResponse API workflowService.createActionResponse(context,"Failure","Failed Post",true) An error message is displayed: Failure Post.
Posting a single shift to the billboard for SSP

workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true)

workflowService.createActionResponseException("Shift is less than 2 days away.", null,true)

An error message is displayed indicating the shift is less than two days away.
Withdrawing a posted shift (either unassigned or assigned) on the Admin Portal for CS workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true) An error message is displayed asking for a confirmation on cancelling a posted shift.
Withdrawing a block of posted shifts using the Open Shift Manager in Admin Portal and SSP. workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true) An error message is displayed: Failed Post and indicates the shifts that are not withdrawn.
Withdrawing a single posted shift on the Admin Portal for ASV workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away. WITHDRAW",true) An error message is displayed indicating the shift is less than two days away.
Withdrawing a block of posted shifts on the Admin Portal for ASV workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true) An error message is displayed indicating the shift is less than two days away and the shifts that are not withdrawn.
Withdrawing a posted shift (either unassigned or assigned) on the SSP Manage Schedule workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true) An error message is displayed indicating the shift is less than two days away.
Swapping a shift where the validation checks if the swap is less than two hours away workflowService.createActionResponseException("Shift is less than 2 days away.", null,true) No error message is displayed but the workflow proceeds to the failure branch, and the swap is not allowed.
Swapping a shift for less than two hours on SSP workflowService.createActionResponse(context,"Failure","Shift is less than 2 days away.",true) An error message is displayed: Failed Trade.