What is WRO and How to Write It?
Workcube Data Release Objects run newly opened tables and newly opened or changed columns in your database and the new version is synchronized with the database model. WRO also works to save data changes or new settings to the database.
There is a WRO folder in the Main Directory. (WRO= Workcube Relase Objects)
CFM pages to be added for DB manipulation or settings are placed in WRO.
ddmmyyyy_hh_filename.cfm CFMs are added to WRO by writing the Day, Month, Year, Time and file name.
.cfm structure
Developer: The person who wrote the file. Developer
Company: The company that wrote the file.
Destination: Which dsn will be run (main: dsn(Main Schema), product:dsn1(Common Product Schema), period:dsn2(Fiscal Period Schema), company: dsn3(Company Schema))
What we need to add as meta:
The queries to be run should be written between the two tags below.
Schema parameters used in query tags;
Table main schema: '@_dsn_main_@'
Table company schema : '@_dsn_company_@'
Table period schema : '@_dsn_period_@'
Table product schema : '@_dsn_product_@'
Example usage;
IF NOT EXISTS (SELECT 'Y' FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'EXPENSE_ITEM_PLAN_REQUESTS' AND TABLE_SCHEMA = '@_dsn_period_@' AND COLUMN_NAME = 'EXPENSE_TYPE')BEGINALTER TABLE EXPENSE_ITEM_PLAN_REQUESTS ADDEXPENSE_TYPE int NULLEND;
Feedback
Workcube Data Release Objects are used to run newly opened tables and newly opened or changed columns in the database.