Instead of going to DB table ACT_GE_PROPERTY and retrieve value for schema.version, just thinking if there is a service api from process engine factory which is readily available that might have a property (preloaded) or a getter for schema version.
Solved! Go to Solution.
If you want to get the version of Activiti source, you can get like the following code.
ProcessEngine.VERSION
If you want to get the version of schema.version, you can get like the following code.
String dbVersion = ((ProcessEngineConfigurationImpl) processEngineConfiguration).getCommandExecutor().execute(new Command<String>() {
public String execute(CommandContext commandContext) {
PropertyEntity dbVersionProperty = commandContext.getSession(DbSqlSession.class).selectById(PropertyEntity.class,"schema.version");
String dbVersion = dbVersionProperty.getValue();
return dbVersion;
}
});
If you want to get the version of Activiti source, you can get like the following code.
ProcessEngine.VERSION
If you want to get the version of schema.version, you can get like the following code.
String dbVersion = ((ProcessEngineConfigurationImpl) processEngineConfiguration).getCommandExecutor().execute(new Command<String>() {
public String execute(CommandContext commandContext) {
PropertyEntity dbVersionProperty = commandContext.getSession(DbSqlSession.class).selectById(PropertyEntity.class,"schema.version");
String dbVersion = dbVersionProperty.getValue();
return dbVersion;
}
});
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.