Skip to content

Instantly share code, notes, and snippets.

@avernet
Created April 5, 2017 23:43
Show Gist options
  • Save avernet/364ab7efe66b685a9b6b82032a780e45 to your computer and use it in GitHub Desktop.
Save avernet/364ab7efe66b685a9b6b82032a780e45 to your computer and use it in GitHub Desktop.
<property
as="xs:string"
name="oxf.fr.detail.process.save.bolero-bill-of-lading.bolero-bill-of-lading-sd-705-dev-v1-uday">
unvisit-all
then
if
("
(count(//form/ReferencesAndRelatedDocs/ReferencesGrid/ReferencesGrid-iteration[ReferenceValue != ''])=0)
and //form/RequestInfo/amendStatusCode ne '15'
")
then
error-message(message = "At least one reference number in the references section is required.")
else (
if
("
(
string-length(//form/Parties/ShipperSection/ShipperRID)
+ string-length(//form/Parties/SurrenderPartySection/SurrenderPartyRID)
+ string-length(//form/Parties/ConsigneeSection/ConsigneeRID)
+ string-length(//form/Parties/ToOrderSection/ToOrderRID)
+ string-length(//form/Parties/PublishToSection/PublishToRID)
= 0
)
")
then
error-message(message = "You must enter at least one Party RID to indicate who has requested the booking")
else (
set-data-status(status="safe")
then send(uri = "http://localhost:8080/ROOT/saveStructBill" , method="POST", data-format-version="edge", prune="false")
then xf:show("result-dialog")
then success-message(message="Save is Successful!")
)
)
recover navigate("javascript:alert('Validation is failed');")'
</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment