I tried to make mini workflow for status in application.
If i have one status of a issue then i can change it only on one defined
else you get a information from application that You can't change it
code is compiled and used by application caled IFS ERP
i think it is simple but i have few errors when the trigger is on
for example: Failed executing statement (ORA-06550: linia 3, kolumna 27: PLS-00201: identifier 'WORKDONE' must be declared
Declare
status_old varchar2(20) :=&OLD:WO_STATUS_ID;
status_new varchar2(20) :=&NEW:WO_STATUS_ID;
begin
if status_old like 'WorkRequest' and status_new not like 'UnderPreparation' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1','You can't change status on W przygotowaniu ');
ELSIF
status_old like 'UnderPreparation' and status_new not like 'Prepared' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1','You can't change status on Przygotowane ');
ELSIF
status_old like 'Prepared' and status_new not like 'Released' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1','You can't change status on Aktywowane');
ELSIF
status_old like 'Released' and status_new not like'Started' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1','You can't change status on Rozpoczęte ');
ELSIF
status_old like 'STARTED' and status_new not like 'WorkDone' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1','You can't change status on Wykonane');
ELSIF
status_old like 'WorkDone' and status_new not like 'Reported' then
IFSAPP.Error_SYS.Record_General('C_PURCH_REQ_SUB1',' You can't change status on Odebrane');
end if;
end;
Is it possible to make it simplier ?