Process validations are used to determine whether a process can proceed. Currently, process validations are available for determining whether a user can Request Approval for an Action and determining whether an Action can be issued. Process validations should be written to receive an input parameter, which in both of these cases will be the Action ID.
Process validations should return a logical value (i.e. true or false)
The following example shows a sample process validation that checks whether an Action has an entry in the ‘ContractID field prior to issue.
Public Function ValidateAction(rActionID As Long) As Boolean
Dim cn As ADODB.Connection
Dim rs As New ADODB.Recordset
The next line gets the current connection to the Conquest database
Set cn = Run("GetConnection")
rs.Open "Select ContractID From tblAction Where ActionID=" & ActionID, cn
If IsNull(rs!ContractID) Then
MsgBox "You have not assigned this Action to a Contractor!" & vbCrlf & vbCrlf & "You cannot issue this Action."
Exit Function
End If
ValidateAction = True
End Function
The relevant process aborts if the process validation returns False.
Process Validations can be implemented on the following events:
• When an Asset is Saved
• When Approval is Requested for an Action
• When an Action Issued
• When an Action is Completed
• When an Action is Assigned to an Organisation Unit
• When a Request is Saved