"Cryptographic module: 'sn_vaccine_sm.vm_crypto_module' does not exist or access denied" error from flow action 'Populate Vaccination Phase and Method'


Description

If the Eligibility Criteria condition on the Phase [sn_vaccine_sm_phase] is based on an encrypted field on the Vaccination Request table (i.e. 'Age Group'), the flow action 'Populate Vaccination Phase and Method' in the Flow 'Handle Self-Service Vaccination Request' throws the following error:

Cryptographic module: 'sn_vaccine_sm.vm_crypto_module' does not exist or access denied

Steps to Reproduce

1. Open the Program 'Covid 19 Vaccination'
/sn_vaccine_sm_program.do?sys_id=610233d13b112010c24e870044efc46b

2. Under the 'Phases' related list, create extra Phases with Eligibility Criteria having a condition on 'Age Group' (which is an encrypted field on Vaccination Requests) - or any other encrypted field. 

3. From the /vam portal, schedule a vaccination request.

4. In Flow Designer, open flow 'Handle Self-Service Vaccination Request', navigate to the Executions and open the newly created one. 

5. From the Logs for flow action 'Populate Vaccination Phase and Method' notice how the following error is thrown:

"Cryptographic module: 'sn_vaccine_sm.vm_crypto_module' does not exist or access denied"

6. On the Properties for flow 'Handle Self-Service Vaccination Request', change the 'Run As' from 'System User' to 'User who initiates session' 

7. Repeat above steps and notice how the error message is not being thrown anymore

Workaround

On the Properties for flow 'Handle Self-Service Vaccination Request', change the 'Run As' from 'System User' to 'User who initiates session'.


Related Problem: PRB1473920