Описание
(Нет описания для триггера ORDERLOAD_POSTEVENT)
Определение
CREATE TRIGGER ORDERLOAD_POSTEVENT FOR ORDERLOAD
ACTIVE AFTER UPDATE POSITION 0
AS
begin
If (New.state <> Old.State and new.State <> 20 and new.State > 0 and new.operationid in (5,29)) then
begin
if (not exists (select * from orderloadevents where OrderLoadID = new.OrderLoadID)) then
insert into orderloadevents values (new.OrderLoadID);
post_event 'OrderLoads_StateChange';
end
if (new.state = 12 and old.state = 2) then
post_event 'AddaptOrderLoad';
end