<route id="quality-classifier-->demo-dedupe new route">
<from uri="eventbus://quality-classifier-new-bus-out" />
<log message="quality-classifier-->demo-dedupe new route ${bodyAs(String)}" />
<choice>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == true && @['internalError'] == true)]</jsonpath>
<to uri="workflow-cmd://mark-as-reprocess" />
</when>
<when>
<jsonpath>$.[?(@['isValid'] == false && @['internalError'] == false)]</jsonpath>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</when>
<when>
<jsonpath suppressExceptions="true">$.[?(@['tags']['BIOMETRIC_CORRECTION_FLOW_STATUS'] in ['FAILED'] || @['tags']['BIOMETRIC_CORRECTION_FLOW_STATUS'] in ['REJECTED'])]</jsonpath>
<setProperty propertyName="ADDITIONAL_INFO_PROCESS"><constant>BIOMETRIC_CORRECTION</constant></setProperty>
<setProperty propertyName="PAUSE_FOR"><constant>1296000</constant></setProperty>
<to uri="workflow-cmd://pause-and-request-additional-info" />
</when>
<when>
<jsonpath suppressExceptions="true">$.[?(@['tags']['Biometric_Quality-Iris'] in ['Average', 'Good','--Biometrics-Not-Available--'] && @['tags']['Biometric_Quality-Finger'] in ['Average', 'Good', '--Biometrics-Not-Available--'] && @['tags']['Biometric_Quality-Face'] in ['Average', 'Good', '--Biometrics-Not-Available--'])]</jsonpath>
<to uri="eventbus://demo-dedupe-bus-in" />
</when>
<when>
<jsonpath suppressExceptions="true">$.[?(@['tags']['Biometric_Quality-Iris'] in ['Poor'] || @['tags']['Biometric_Quality-Finger'] in ['Poor'] || @['tags']['Biometric_Quality-Face'] in ['Poor'])]</jsonpath>
<setProperty propertyName="ADDITIONAL_INFO_PROCESS"><constant>BIOMETRIC_CORRECTION</constant></setProperty>
<!-- PAUSE_FOR is in seconds -->
<setProperty propertyName="PAUSE_FOR"><constant>1296000</constant></setProperty>
<to uri="workflow-cmd://pause-and-request-additional-info" />
</when>
<otherwise>
<to uri="workflow-cmd://complete-as-failed" />
<to uri="workflow-cmd://anonymous-profile" />
</otherwise>
</choice>
</route>