06-15-2017 03:30 PM
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.
06-15-2017 05:36 PM
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;
}
});
06-15-2017 05:36 PM
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;
}
});
Explore our Alfresco products with the links below. Use labels to filter content by product module.