Tables Affected By Renew

This section contains information about the database tables that are key to renew and that are affected by renew commands. It also provides useful SQL queries you can run.

Key Tables

The following tables are key to the renew –clear command:

The entries in these two tables should correspond to each other. There will be one version for each time the orchestration workflow has been deployed since the database was created or since renew –clear was last run.

After renew –clear, both tables will be empty. After renew –redeploy, the tables will each contain one entry for each orchestration workflow deployed, with a version of "1".

This table will have an entry for each orchestration workflow that has been executed since the database was created or since the purge or renew utility was last run. Purge will not completely clear this table, but renew –clear will do this. New entries will be created as orchestration workflows are executed.

It is recommended that you capture the query results before you run renew –redeploy (to see the most recent orchestration workflow versions), and then again after you run renew –redeploy (to ensure that all of the expected orchestration workflows were redeployed).  The VERSION_ number in the JBPM_PROCESSDEFINITION  table will be incremented for each redeployed orchestration workflow. If you discover orchestration workflows that were not redeployed, you might need to redeploy the process apps that contain them.

Important: Orchestration workflows that have been deleted could still be present in the JBPM_PROCESSDEFINITION table. Running renew –redeploy leaves their VERSION_ unchanged. This is normal. The orchestration workflows will be removed after you run renew –clear. You may want to verify that they are obsolete before proceeding.

SQL Queries

The following SQL queries are useful:

select ID_, NAME_, VERSION_  from JBPM_PROCESSDEFINITION
select NAME_, max(VERSION_)  as maxversion from
  JBPM_PROCESSDEFINITION group by NAME_
SELECT * from
  (select NAME_, max(VERSION_) as  maxversion from
  JBPM_PROCESSDEFINITION group by  NAME_) as mv inner join
  JBPM_PROCESSDEFINITION as pd
  on pd.NAME_ = mv.NAME_ and  pd.VERSION_ = mv.maxversion

Affected Tables

The renew -clear command drops and recreates the following tables: