Audit workflow conditional routing based on audit type not evaluating correctly

We have conditional routing in our audit workflow that should direct internal audits to one approval path and external audits to a different path. The routing rule evaluates the ‘Audit Type’ field and routes accordingly. However, all audits are being routed to the internal audit path regardless of the selected audit type. I’ve verified the conditional routing rule syntax looks correct and the field reference appears valid. The audit type field mapping shows ‘INTERNAL’ and ‘EXTERNAL’ as valid values. What could cause the workflow condition evaluation to always return the same result?

Routing condition:


IF auditType == 'EXTERNAL' THEN route_external_path
ELSE route_internal_path

Data type mismatch is very likely. If the audit type field is defined as an integer lookup (ID reference) rather than a string, your string comparison will always fail. Check if AUDIT_TYPE is storing the ID of the lookup value (like 1, 2) instead of the code (‘INT’, ‘EXT’). You might need to use AUDIT_TYPE_CODE field instead of AUDIT_TYPE, or compare against the numeric ID: auditType == 2 for external audits.

I’ve encountered this before. The field reference in your condition needs to include the proper object path. Instead of just ‘auditType’, you might need ‘audit.auditType’ or ‘currentRecord.auditType’ depending on your workflow context. TrackWise workflow conditions require explicit object references when evaluating field values. Check the workflow documentation for the correct syntax for your version.

I checked the field definition and the stored values are indeed ‘INT’ for internal and ‘EXT’ for external, not the full words. But even after changing my condition to use ‘EXT’, all audits still route to the internal path. The workflow logs show the condition is evaluating but always returns false for the external check. Could there be a data type mismatch?

Another thing to verify - is the audit type field populated at the time the routing condition evaluates? If your workflow routes immediately upon creation before the user saves the form, the field might be null. Add a null check to your condition and log the actual field value during evaluation. This will show you exactly what value the workflow engine is seeing when it makes the routing decision.

Check if you’re comparing the field value or the field display text. In TrackWise, dropdown fields store a code but display a label. Your condition might be comparing against ‘EXTERNAL’ when the actual stored value is ‘EXT’ or ‘2’. Look at the field definition in Form Designer to see the actual code values.