Is there an Activiti API method to get the schema version ?

cancel
Showing results for 
Search instead for 
Did you mean: 
badrisudheer
Member II

Is there an Activiti API method to get the schema version ?

Jump to solution

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.

1 Solution

Accepted Solutions
daisuke-yoshimo
Senior Member

Re: Is there an Activiti API method to get the schema version ?

Jump 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;

    }

});

View solution in original post

1 Reply
daisuke-yoshimo
Senior Member

Re: Is there an Activiti API method to get the schema version ?

Jump 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;

    }

});