This topic describes how the developer created the VBScript rule to determine whether a vehicle has been checked in and whether it has been marked as damaged.
Finally, if the rule fails to execute for another reason, the error is captured by Aptify's Exception Manager for logging and the rule selects the Result Code of FAILED.
Try If oProperties.GetProperty("RAObject") Is Nothing Then oResultCode.Value = "FAILED" Else Dim oRentalAgreementGE As Aptify.Framework.BusinessLogic.GenericEntity.AptifyGenericEntityBase oRentalAgreementGE = CType(oProperties.GetProperty("RAObject"), Aptify.Framework.BusinessLogic.GenericEntity.AptifyGenericEntityBase) If oRentalAgreementGE.GetValue("ReturnCondition").ToString = "" Then 'This vehicle has not yet been returned. Nothing should be done. oResultCode.Value = "END" Else 'Vehicle is returned, check to see if Service Ticket is required. If oRentalAgreementGE.Fields("ReturnCondition").IsDirty _ AndAlso CBool(oRentalAgreementGE.GetValue("ReturnCondition").ToString.Contains("Damage")) Then oResultCode.Value = "DAMAGED" Else oResultCode.Value = "NEXT" End If End If End If Catch ex As System.Exception oResultCode.Value = "FAILED" Aptify.Framework.ExceptionManagement.ExceptionManager.Publish(ex) End Try |
Add RAObject as a custom input map to the step's Properties tab.
You will return later to this step to configure its Action Map (see Linking Sample Process Flow Steps Together). Aptify recommends waiting to configure the Action Map until later since there are no next steps to link to yet. Note that this step does not produce any output values so the Output Map is not configured. |