理解Table Event Rules
Table Event Rules 可以根据定义的Table事件自动的进行一些逻辑处理。
事件列表:
• After Record is Deleted ------ 记录删除后
• After Record is Fetched ------ 记录选取后
• After Record is Inserted ----- 记录新增后
• After Record is Updated ------ 记录更新后
• Before Record is Deleted ----- 记录删除前
• Before Record is Inserted ---- 记录新增前
• Before Record is Updated ---- 记录更新前
• Currency Conversion is On --- 货币转换打开
建立Table Event Rules必须进行一下工作:
• Create the table trigger in Event Rules Design. ------ 创建table trigger
• Generate the JD Edwards EnterpriseOne table trigger as C code. ------ 生成table trigger
• Build the table trigger. ------ 编译table trigger
新建一个Table Event Rules需要进行下面操作:
1. Check out the table to which you want to attach event rules and click Design.(签出Table)
2. On the Table Design form, select the Design Tools tab and click Start Table Trigger Design Aid.(在Design Form界面,选择Design Tools页中的Start Table Trigger Design Aid)
3. Select an event from the Events list.(选择事件类型)
4. On Event Rules Design, click one of the event rule buttons and complete the event rules.(完成Event Rules 编辑)
5. Click Save to save the event rule specifications and then click Close.(保存并关闭Event Rules)
6. If you are creating a new table in Oracle’s JD Edwards EnterpriseOne Table Design Aid, select theTable Operations tab and click Generate Table.(如果建立了一个新表,需要重新生成Table)
Important! Never perform this step on an existing table because it clears all data.(生成表操作会清空表内数据)
7. On the Generate Table form, complete these fields and click OK:
• DataSource
• Password
8. On the Table Design form, select the Design Tools tab and click Build Table Triggers.(编译Table Trigger)
9. To review a log of the build, select Generate Header File, and then open the file that the system created.The creation of the table event rules is complete. The newly created or modified table event rule iscalled from the JD Edwards EnterpriseOne database middleware whenever the corresponding eventoccurs against the table.(查看编译日志)