Chapter 39. Database connection

Business Central provides a dedicated UserGroupCallback implementation for database server with Red Hat Process Automation Manager to enable the user task service. The user task service helps in retrieving information on users and groups (roles) directly from databases.

You can configure the following database UserGroupCallback implementation properties:

Table 39.1. Database UserGroupCallback properties


JNDI name of the data source used for connections


Verifies the user existence


Collects the groups for a given user


Verifies the group existence

39.1. Database UserGroupCallback implementation

In database UserGroupCallback implementation, you must create the required database. You can use this implementation by configuring the respective database properties in one of the following ways:

  • Programmatically: Build a properties object with the respective DBUserGroupCallbackImpl properties and create DBUserGroupCallbackImpl using the same properties object as its parameter.

    For example:

    import static;
    import static;
    import static;
    import static;
    props = new Properties();
    props.setProperty(DS_JNDI_NAME, "jdbc/jbpm-ds");
    props.setProperty(PRINCIPAL_QUERY, "select userId from Users where userId = ?");
    props.setProperty(ROLES_QUERY, "select groupId from UserGroups where groupId = ?");
    props.setProperty(USER_ROLES_QUERY, "select groupId from UserGroups where userId = ?");
    callback = new DBUserGroupCallbackImpl(props);
  • Declaratively: Create the file in the root of your application or specify the file location as a system property.

    For example:

    Ensure that you register the database callback when starting the user task server.

    For example:

    System.setProperty("", "/");
    callback = new DBUserGroupCallbackImpl(true);
    ... = jdbc/jbpm-ds
    db.user.query = select userId from Users where userId = ?
    db.roles.query = select groupId from UserGroups where groupId = ?
    db.user.roles.query = select groupId from UserGroups where userId = ?

Additional resources