BDM data in expression

Hi,

I am trying to design a system for users to request access to modules of the intranet.

I have a business object called Modules and another called AccessRequests. In the Access Request Form the user is sending a module id, and I want to check if the module id matches any id in the BDM and if it does then send for module owner for approval. I am trying to do this in expressions in an exclusive gateway.

This is my progress so far and it doesn’t work.

import com.company.model.DHRModules;
import com.company.model.DHRModulesDAO;

DHRModulesDAO dhrModDao;


DHRModules dhrMod = dhrModDao.findByMod_id(accessRequests.req_module);

if(dhrMod.mod_owner == "john") {
	return true;
}

Hi,

In order to help you, would you mind sharing your project? You can export it from Bonita Studio as a .bos file and share it using Google Drive, Dropbox…

Based on what you shared so far I don’t understand why this does not run properly.

Thanks