Process Deployment Function works with manual connection but not datasource

So I’m using a hikari datasource to set up my process engine. I can query for tasks just fine. When I try to use the same data source to query for programmatic process deployment, it doesn’t work. I instead of have to manually construct a process engine connection to get it working. This is how I set up my process engine:

application.dsConfig = createObject(‘java’, ‘com.zaxxer.hikari.HikariConfig’).init();
application.dsConfig.setDriverClassName(“oracle.jdbc.OracleDriver”);
application.dsConfig.setJdbcUrl(“jdbc:oracle:thin:@localhost:1521:mydb”);
application.dsConfig.setUsername(“flowable_temp”);
application.dsConfig.setPassword(“mypassword”);
application.dsConfig.setIdleTimeout(30000);
application.dsConfig.setMaximumPoolSize(150);
application.dsConfig.setMinimumIdle(1);
application.dsConfig.addDataSourceProperty(“cachePrepStmts”, “true”);
application.dsConfig.addDataSourceProperty(“prepStmtCacheSize”, “250”);
application.dsConfig.addDataSourceProperty(“prepStmtCacheSqlLimit”, “2048”);

application.datasource = createObject(‘java’, ‘com.zaxxer.hikari.HikariDataSource’).init(application.dsConfig);

var config = createObject(‘java’, ‘org.flowable.engine.ProcessEngineConfiguration’);
var processEngineConfig = config.createStandaloneProcessEngineConfiguration();
var processEngineConfig = createObject(‘java’, ‘org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration’).init();

processEngineConfig.setDatabaseType(config.DATABASE_TYPE_ORACLE);
processEngineConfig.setDatabaseSchemaUpdate(config.DB_SCHEMA_UPDATE_TRUE);
processEngineConfig.setAsyncExecutorActivate(false);
processEngineConfig.setDataSource(application.datasource);
application.processEngine = processEngineConfig.buildProcessEngine();

And then this is the code I use to crawl a directory for deployable process definitions:

// Create a repository service
var repoService = application.processEngine.getRepositoryService();

// We want the files located in the processes folder, which need to be listed out
var directoryListing = directoryList(‘C:\inetpub\wwwroot\flowableDemo\processes’);

// For each item in the directory list, extract the last file name
for (filePath in directoryListing) {

var startIndex = findNoCase('processes\', filePath, 0) + 10;

var fileName = trim(mid(filePath, startIndex, 100));

var endIndex = findNoCase('.bpmn', fileName, 0) - 1;
var processName = trim(left(fileName, endIndex));

// Now we have both the file path and the file name.  Add the file to the processed list
ArrayAppend(result.deployedItems, processName);

// Build an input stream on this file, to add it to the deployment resources
var inFileStream = createObject('java', 'java.io.FileInputStream').init(filePath);
	

// Use our repoService to deploy the process definition file
var deployment = repoService.createDeployment();
deployment.name(processName);
deployment.addInputStream(fileName, inFileStream);
deployment.deploy();

}

As mentioned above, this fails when I use the datasource (I will get a timeout error that I have exceeded the connection timeout limit on the deploy() command). But if I configure the process engine with a direct connection, it seems to work fine. So I’m missing something, but I can’t figure out what it is.

For those wondering, this is ColdFusion code.