How to create Business Rules & Database Triggers:

--------------------------------------------------
Environment Headstart utility

  1. go to the Function Hierarchy Diagramer
  2. select the container that you wish to create the business rule in, or just create a new sheet
  3. click on Function icon "small white square on the right top of the screen", then place it in the sheet
  4. type the lable and short definition of that function.

Note:

in this step you are building your business rules tree, so you may keep the root as a description for your business rules to be grouped under. Ex: for PMS, first we start with the root BR_PMS, and its definition is PMS Business Rules. Then for each system model, we have a group of business rules, like Funds/Portfolios Business Rules, or Securities Business Rules...etc.

  1. pick again the function icon, and type the label according to the following convention:

· BR_TableShortName001_CEV (change event)

· BR_TableShortName002_TRS (transition event)

· BR_TableShortName003_IER (inter-relation event)

· BR_TableShortName004_ENT (entity event)

· BR_TableShortName005_DEL (delete event)

· BR_TableShortName006_UPD (update event)

· BR_TableShortName007_TPL (topple event, used to verify between columns on the table)

è for more description on those event, please reference the oracle manual.

  1. double click on the function and assign the Entity Usage.
  2. assign Attribute Usage
  3. Save the diagram
  4. go to the Repository Object Navigator
  5. under the selected container, go to Process Events
  6. select the event on which you want to fire the trigger, either on the table or a specific column, usually the STATUS column.

Note:

If you do not find your table there, then do the following:

- go to the http://iai2.iai.org.kw:7778/forms/frmservlet?config=hsd65_utilities

- Productivity Booster --> Analysis --> Maintain Default Events for Entities

- pick your table and run.

- this will generate the needed events for the table.

  1. under Triggering Functions, right click --> create reference --> select the business rule name that you created in the Function Hierarchy Diagramer, and save
  2. go to the http://iai2.iai.org.kw:7778/forms/frmservlet?config=hsd65_utilities
  3. Productivity Boosters --> Business Logic Layer --> Rule Layer
  4. select the Business Rule Design Transformer
  5. Select the Business Rule Function that you have created, and run
  6. from the Server Model, refresh your table triggers and you will find your trigger assigned.
  7. Edit trigger logic, and then generate table CAPI from the utilities and then table API.

Comments

Popular posts from this blog

Another user has changed the row with primary key oracle.jbo.Key[12 ].

weblogic windows JPS-01050: Opening of wallet based credential store failed. Reason java.io.IOException: Failed to lock cwallet.sso.lck

Working With File Throgh WebUtill