Links may not function; however, this content may be relevant to outdated versions of the product.
How to expose a work object property as a column and update data views
Summary
You may determine that you need to expose additional top-level properties or new properties created for the classes that represent the work objects of your applications.
Use the following procedure to ensure that upgrades to the tables do not alter database views to existing properties.
Suggested Approach
Assume that you want to add a property called MyFirstName and use this in reporting making it available for new and old items.
- Identify where the changes are and whether a new (copy) of the
pc_work
table should be created so that it is specific to your database configuration and does not get changed when you make your upgrades.
Important:It is strongly recommended that you copy
pc_work
andpr_history
tables and use the copies as the basis for updates If you copy the view and/or tables, the Data-Admin-DB-Table mapping entries need to be updated to point to your copies.
- Add the property to Process Commander and then add it to the database table in question (for instance, mypc_work) and set the attributes (such as VARCHAR or BINARY) to match the property definition (such as Text or TrueFalse) as closely as possible.
- Since copies of the
pc_work
andpr_history
tables are being used, copy the views that reference them to avoid later issues with upgrades. An upgrade of Process Commander requires that the views are dropped and are recreated. This ensures that if you have your own views, they will remain intact.
- Update your view(s) so that they also include the new MyFirstName column reference and use the view for reporting as well.
- After you have updated the tables and views, and the Process Commander system includes the property, re-save the Data-Admin-DB-Table mapping rule.
- If necessary, run the ResaverServlet to populate the data in the newly created column.
- If the property existed and rows of the table have non-blank data for the property data has been entered, the ResaverServlet value populates the old items and all new items going forward will automatically be populated.
- If the property and the column are created at the same time, there will be nothing to populate.
Depending on the size of the database table being resaved, it can take several minutes to several hours to populate your work objects. The system can still be used during this process (although the processing can affect performance).
Related Information
Administration and Security Guide, v5.1, Chapter 5.