ValidateRequest

Workflow Manager 2020

The ValidateRequest method is called when a user clicks the Submit Request button on the final data entry screen at the beginning of the workflow. Workflow Manager passes the names of the data elements and their values so that the function can validate them.

Syntax

This method has the following syntax:

ValidateRequest(string strAppId, ref string strAppXMLInfo)

Parameters

This method implements the following parameters:

ValidateRequest Method Parameters

Parameter

Description

strAppId

Application ID of the current workflow request.

strAppXMLInfo

XML formatted string for the current workflow request.

Example of strAppXMLInfo for ValidateRequest

The following is an example of a strAppXMLInfo string for ValidateRequest, with returned messages.

<ApplicationInfo>

   <CompanyName>Niranjan</CompanyName>

   <AppId>d037b0db-8f09-430c-84c6-abb8413bf745</AppId>

   <AppSName>Plugin Wor</AppSName>

   <AppLName>Plugin Workflow</AppLName>

   <UserName>admin@servicer.com</UserName>

   <StepID>6391226d-aead-48b0-9942-24254364e163</StepID>

   <DataGroups>

      <DataGroup DataGroupName="DataGroup2">

         <DataElement>

            <DataElementId>8e71a923-d9ca-463e-b397-d271a31d4430</DataElementId>

            <DataElementName>ram</DataElementName>

            <DataElementValue>6</DataElementValue>

            <Message>The data element Ram should be less than 5GB</Message>

            <IsValid>false</IsValid>

         </DataElement>

      </DataGroup>

      <DataGroup DataGroupName="DataGroup1">

         <DataElement>

            <DataElementId>97a825fb-35de-43ba-9d31-a3a99da1b81f</DataElementId>

            <DataElementName>Element1</DataElementName>

            <DataElementValue>asdf</DataElementValue>

            <Message />

            <IsValid />

         </DataElement>

      </DataGroup>

      <DataGroup DataGroupName="DataGroup5">

         <DataElement>

            <DataElementId>c3d1b2d7-767c-4fa7-9b63-fe01ab9e88e4</DataElementId>

            <DataElementName>processor</DataElementName>

            <DataElementValue>4</DataElementValue>

            <Message>The data element Processor should be less than 3GHZ</Message>

            <IsValid>false</IsValid>

         </DataElement>

      </DataGroup>

      <DataGroup DataGroupName="DataGroup3">

         <DataElement>

            <DataElementId>730eb7a0-ea80-45f3-a69c-be846912b9e7</DataElementId>

            <DataElementName>harddisk</DataElementName>

            <DataElementValue>300</DataElementValue>

            <Message>The data element harddisk should be less than 200GB</Message>

            <IsValid>false</IsValid>

         </DataElement>

      </DataGroup>

      <DataGroup DataGroupName="DataGroup4">

         <DataElement>

            <DataElementId>607ad242-16d8-4f0f-bdae-8d94e60fa7a7</DataElementId>

            <DataElementName>Normal Element</DataElementName>

            <DataElementValue>44</DataElementValue>

            <Message />

            <IsValid />

         </DataElement>

      </DataGroup>

   </DataGroups>

</ApplicationInfo>

Return Values

The ValidateRequest event returns the following:

True / False—Boolean (True/False) value to indicate whether all of the values are valid.
Messages—A set of error messages (strings) to display on the screen.

If ValidateRequest returns a False value, indicating that at least one value is invalid, Workflow Manager does not advance to the next screen.

See Also