IDEMPIERE-391 Scheduler improvements / Peer review, tests, some refactoring

This commit is contained in:
Carlos Ruiz 2012-10-02 23:16:41 -05:00
parent 993116f1ea
commit 110618d495
22 changed files with 1375 additions and 446 deletions

View File

@ -764,6 +764,31 @@ UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200495
UPDATE AD_Column SET AD_Reference_ID=20,Updated=TO_DATE('2012-09-18 14:14:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200478
;
-- Sep 28, 2012 5:40:09 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_Schedule_UU',200158,'D','AD_Schedule_UU','AD_Schedule_UU','027b3c04-57c2-4df2-bae1-daffffa41fa7',0,TO_DATE('2012-09-28 17:40:07','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-28 17:40:07','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
;
-- Sep 28, 2012 5:40:09 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200158 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 28, 2012 5:40:56 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200559,'D','N','N','N',0,'N',36,'N',10,'N','N',200158,'N','Y','b4867242-4498-4608-aa86-c262f3af378e','N','Y','N','AD_Schedule_UU','AD_Schedule_UU','N',0,TO_DATE('2012-09-28 17:40:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-28 17:40:55','YYYY-MM-DD HH24:MI:SS'),0,0,0)
;
-- Sep 28, 2012 5:40:56 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200559 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 28, 2012 5:40:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD AD_Schedule_UU NVARCHAR2(36) DEFAULT NULL
;
-- Sep 20, 2012 9:38:20 AM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (1,0,0,200000,TO_DATE('2012-09-20 09:38:18','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-20 09:38:18','YYYY-MM-DD HH24:MI:SS'),100,'Y','D','F',0,'1 Day')
@ -1064,6 +1089,7 @@ UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-20 11:53:05','YYYY-MM
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-20 11:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11522
;
-- Sep 20, 2012 6:24:20 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,695,200490,'D','N','N','N',0,'N',10,'N',19,'N','N',200132,'N','Y','7e549561-f9c8-44b7-9bc2-9e1d1bb4c728','N','Y','N','AD_Schedule_ID','AD_Schedule_ID','Y',100,TO_DATE('2012-09-20 18:24:18','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-20 18:24:18','YYYY-MM-DD HH24:MI:SS'),100,0,0)
@ -1186,7 +1212,7 @@ UPDATE AD_Field SET ColumnSpan=3,Updated=TO_DATE('2012-09-20 18:28:12','YYYY-MM-
-- Sep 20, 2012 6:29:41 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (10,0,0,200002,TO_DATE('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'10 Minutes')
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name,Description) VALUES (10,0,0,200002,TO_DATE('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'10 Minutes','(do not delete, used in Initial Client Setup)')
;
-- Sep 20, 2012 6:31:38 PM COT
@ -1431,7 +1457,7 @@ UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-20 19:37:41','YYYY-MM
-- Sep 20, 2012 7:39:26 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (15,0,0,200003,TO_DATE('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'15 Minutes')
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name,Description) VALUES (15,0,0,200003,TO_DATE('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'15 Minutes','(do not delete, used in Initial Client Setup)')
;
-- Sep 20, 2012 7:55:53 PM COT
@ -1559,6 +1585,106 @@ UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-09-24 15:50:11','YYYY-
ALTER TABLE AD_Schedule ADD IsIgnoreProcessingTime CHAR(1) DEFAULT 'N' CHECK (IsIgnoreProcessingTime IN ('Y','N'))
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSystemSchedule',200157,'D','IsSystemSchedule','Schedule Just For System','System Schedule','0fcff3a8-e3d4-4d54-a060-7aa225b329c6',0,TO_DATE('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200157 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200558,'D','N','N','N',0,'N',1,'N',20,'N','N',200157,'N','Y','f5b750f4-c9a7-4dfb-a4de-17f8431a1f47','N','Y','N','IsSystemSchedule','Schedule Just For System','N','IsSystemSchedule','Y',100,TO_DATE('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200558 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 24, 2012 5:06:23 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD IsSystemSchedule CHAR(1) DEFAULT 'N' CHECK (IsSystemSchedule IN ('Y','N'))
;
/* Create schedule records for actual configuration */
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextidfunc( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
,sysdate,100,null,'Y',null,sysdate,100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' ')||' '||nvl(cronpattern,' '),'N'
from (
select distinct frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
from ad_scheduler
where not exists (select 1 from ad_schedule where
coalesce(ad_scheduler.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_scheduler.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
coalesce(ad_scheduler.weekday,' ') =coalesce(ad_schedule.weekday,' ') and
coalesce(ad_scheduler.scheduletype,' ') =coalesce(ad_schedule.scheduletype,' ') and
coalesce(ad_scheduler.isignoreprocessingtime,' ')=coalesce(ad_schedule.isignoreprocessingtime,' ') and
nvl(ad_scheduler.cronpattern,' ') =nvl(ad_schedule.cronpattern,' ')
)
)
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextidfunc( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,sysdate,100,null,'Y',null,sysdate,100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from c_acctprocessor
where not exists (select 1 from ad_schedule where
coalesce(c_acctprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(c_acctprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
)
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextidfunc( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,sysdate,100,null,'Y',null,sysdate,100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from ad_alertprocessor
where not exists (select 1 from ad_schedule where
coalesce(ad_alertprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_alertprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
)
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextidfunc( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,sysdate,100,null,'Y',null,sysdate,100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from r_requestprocessor
where not exists (select 1 from ad_schedule where
coalesce(r_requestprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(r_requestprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
)
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextidfunc( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,sysdate,100,null,'Y',null,sysdate,100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from ad_workflowprocessor
where not exists (select 1 from ad_schedule where
coalesce(ad_workflowprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_workflowprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
)
;
-- Sep 24, 2012 3:50:36 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table SET AD_Window_ID=200012,Updated=TO_DATE('2012-09-24 15:50:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200020
@ -1589,31 +1715,6 @@ UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-24 15:51:17','YYYY-MM
UPDATE AD_Field SET IsDisplayed='N', IsActive='N',Updated=TO_DATE('2012-09-24 15:52:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58773
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSystemSchedule',200157,'D','IsSystemSchedule','Schedule Just For System','System Schedule','0fcff3a8-e3d4-4d54-a060-7aa225b329c6',0,TO_DATE('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200157 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200558,'D','N','N','N',0,'N',1,'N',20,'N','N',200157,'N','Y','f5b750f4-c9a7-4dfb-a4de-17f8431a1f47','N','Y','N','IsSystemSchedule','Schedule Just For System','N','IsSystemSchedule','Y',100,TO_DATE('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200558 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 24, 2012 5:06:23 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD IsSystemSchedule CHAR(1) DEFAULT 'N' CHECK (IsSystemSchedule IN ('Y','N'))
;
-- Sep 24, 2012 5:06:51 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200019,1,'N','N',200558,'Y',200553,'N','D','Schedule Just For System','IsSystemSchedule','Y','N','1a29d07e-df06-4d49-bab4-733c0f547714',100,0,TO_DATE('2012-09-24 17:06:50','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-09-24 17:06:50','YYYY-MM-DD HH24:MI:SS'),'Y')
@ -1641,7 +1742,7 @@ INSERT INTO AD_Val_Rule (Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU
-- Sep 24, 2012 5:32:02 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Val_Rule SET Name='AD_schedule for System',Updated=TO_DATE('2012-09-24 17:32:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200007
UPDATE AD_Val_Rule SET Name='AD_Schedule for System',Updated=TO_DATE('2012-09-24 17:32:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200007
;
-- Sep 24, 2012 5:32:06 PM COT
@ -1665,164 +1766,493 @@ UPDATE AD_Column SET AD_Val_Rule_ID=200007,Updated=TO_DATE('2012-09-24 17:51:36'
;
-- Sep 27, 2012 10:19:28 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 10:19:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11348
;
-- Sep 27, 2012 10:19:30 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE C_AcctProcessor MODIFY Frequency NUMBER(10) DEFAULT NULL
;
-- Sep 27, 2012 10:19:30 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE C_AcctProcessor MODIFY Frequency NULL
;
-- Sep 27, 2012 11:05:06 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:05:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11348
;
-- Sep 27, 2012 11:36:59 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:36:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11441
;
-- Sep 27, 2012 11:37:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_AlertProcessor MODIFY Frequency NUMBER(10) DEFAULT NULL
;
-- Sep 27, 2012 11:37:18 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:37:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11441
;
-- Sep 27, 2012 11:37:24 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:37:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11440
;
-- Sep 27, 2012 11:37:28 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_AlertProcessor MODIFY FrequencyType CHAR(1) DEFAULT NULL
;
-- Sep 27, 2012 11:37:34 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:37:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11440
;
-- Sep 27, 2012 11:38:29 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:38:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5480
;
-- Sep 27, 2012 11:38:33 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE R_RequestProcessor MODIFY Frequency NUMBER(10) DEFAULT 1
;
-- Sep 27, 2012 11:38:33 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE R_RequestProcessor MODIFY Frequency NULL
;
-- Sep 27, 2012 11:38:38 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:38:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5480
;
-- Sep 27, 2012 11:38:45 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5481
;
-- Sep 27, 2012 11:38:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE R_RequestProcessor MODIFY FrequencyType CHAR(1) DEFAULT NULL
;
-- Sep 27, 2012 11:38:50 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE R_RequestProcessor MODIFY FrequencyType NULL
;
-- Sep 27, 2012 11:38:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:38:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5481
;
-- Sep 27, 2012 11:39:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:39:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11391
;
-- Sep 27, 2012 11:39:56 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_WorkflowProcessor MODIFY Frequency NUMBER(10) DEFAULT NULL
;
-- Sep 27, 2012 11:39:56 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_WorkflowProcessor MODIFY Frequency NULL
;
-- Sep 27, 2012 11:40:03 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:40:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11391
;
-- Sep 27, 2012 11:40:11 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N', IsActive='N',Updated=TO_DATE('2012-09-27 11:40:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11382
;
-- Sep 27, 2012 11:45:45 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:45:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247
;
-- Sep 27, 2012 11:45:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_Scheduler MODIFY Frequency NUMBER(10) DEFAULT NULL
;
-- Sep 27, 2012 11:45:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_Scheduler MODIFY Frequency NULL
;
-- Sep 27, 2012 11:45:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:45:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247
;
-- Sep 27, 2012 11:46:03 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-09-27 11:46:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255
;
-- Sep 27, 2012 11:46:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_Scheduler MODIFY FrequencyType CHAR(1) DEFAULT NULL
;
-- Sep 27, 2012 11:46:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
ALTER TABLE AD_Scheduler MODIFY FrequencyType NULL
;
-- Sep 27, 2012 11:46:10 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-09-27 11:46:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255
;
-- Sep 27, 2012 11:49:52 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Window SET WindowType='M',Updated=TO_DATE('2012-09-27 11:49:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200012
;
-- Sep 28, 2012 5:38:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table SET Name='Schedule',Updated=TO_DATE('2012-09-28 17:38:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Table_ID=200020
;
-- Sep 28, 2012 5:38:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=200020
;
-- Sep 28, 2012 5:42:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('RunOnlyOnIP',200159,'D','Run only on IP','Run only on IP','090ed7f1-67f7-4d25-ac6b-c4de976b732b',0,TO_DATE('2012-09-28 17:42:09','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-09-28 17:42:09','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
;
-- Sep 28, 2012 5:42:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200159 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET AD_Element_ID=200159, ColumnName='RunOnlyOnIP', Description=NULL, Help=NULL, Name='Run only on IP',Updated=TO_DATE('2012-09-28 17:42:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200486
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200486
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='Run only on IP', Description=NULL, Help=NULL WHERE AD_Column_ID=200486 AND IsCentrallyMaintained='Y'
;
CREATE UNIQUE INDEX ad_schedule_uu_idx ON ad_schedule (ad_schedule_uu)
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element SET Name='System Schedule',Updated=TO_DATE('2012-09-28 18:21:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL, AD_Element_ID=200157 WHERE UPPER(ColumnName)='ISSYSTEMSCHEDULE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Element_ID=200157 AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200157) AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_PrintFormatItem pi SET PrintName='System Schedule', Name='System Schedule' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200157)
;
-- Sep 28, 2012 6:22:28 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y', FieldLength=60, IsUpdateable='Y',Updated=TO_DATE('2012-09-28 18:22:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:22:53 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET Name='2 Hours',Updated=TO_DATE('2012-09-28 18:22:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Schedule_ID=200004
;
-- Sep 28, 2012 6:23:11 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY Name NVARCHAR2(60)
;
-- Sep 28, 2012 6:23:11 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY Name NOT NULL
;
-- Sep 28, 2012 6:26:22 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsIdentifier='N', SeqNo=0, IsUpdateable='N',Updated=TO_DATE('2012-09-28 18:26:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200473
;
-- Sep 28, 2012 6:26:38 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET SeqNo=1,Updated=TO_DATE('2012-09-28 18:26:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:26:53 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET SeqNoSelection=1,Updated=TO_DATE('2012-09-28 18:26:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:28:29 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:28:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200557
;
-- Sep 28, 2012 6:28:30 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY IsIgnoreProcessingTime CHAR(1) DEFAULT 'N'
;
-- Sep 28, 2012 6:28:31 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET IsIgnoreProcessingTime='N' WHERE IsIgnoreProcessingTime IS NULL
;
-- Sep 28, 2012 6:28:31 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY IsIgnoreProcessingTime NOT NULL
;
-- Sep 28, 2012 6:28:42 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:28:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200558
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY IsSystemSchedule CHAR(1) DEFAULT 'N'
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET IsSystemSchedule='N' WHERE IsSystemSchedule IS NULL
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule MODIFY IsSystemSchedule NOT NULL
;
-- ?? MIGRATE ACTUAL DATA
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element SET Name='Schedule',Updated=TO_DATE('2012-09-28 18:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL, AD_Element_ID=200132 WHERE UPPER(ColumnName)='AD_SCHEDULE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL WHERE AD_Element_ID=200132 AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='Schedule', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200132) AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_PrintFormatItem pi SET PrintName='Schedule', Name='Schedule' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200132)
;
-- Sep 28, 2012 6:32:24 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Scheduler SET Record_ID=NULL, AD_Schedule_ID=200001,Updated=TO_DATE('2012-09-28 18:32:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Scheduler_ID=100
;
-- Sep 28, 2012 6:34:29 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200491
;
/* Set schedules for actual records before making them mandatory */
update ad_scheduler set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_scheduler.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_scheduler.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
coalesce(ad_scheduler.weekday,' ') =coalesce(ad_schedule.weekday,' ') and
coalesce(ad_scheduler.scheduletype,' ') =coalesce(ad_schedule.scheduletype,' ') and
coalesce(ad_scheduler.isignoreprocessingtime,' ')=coalesce(ad_schedule.isignoreprocessingtime,' ') and
nvl(ad_scheduler.cronpattern,' ') =nvl(ad_schedule.cronpattern,' '))
;
update c_acctprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(c_acctprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(c_acctprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update ad_alertprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_alertprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_alertprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update ad_workflowprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_workflowprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_workflowprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update r_requestprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(r_requestprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(r_requestprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
-- Sep 28, 2012 6:34:33 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_AlertProcessor MODIFY AD_Schedule_ID NUMBER(10)
;
-- Sep 28, 2012 6:34:33 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_AlertProcessor MODIFY AD_Schedule_ID NOT NULL
;
-- Sep 28, 2012 6:34:50 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:34:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200489
;
-- Sep 28, 2012 6:34:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Scheduler MODIFY AD_Schedule_ID NUMBER(10)
;
-- Sep 28, 2012 6:34:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Scheduler MODIFY AD_Schedule_ID NOT NULL
;
-- Sep 28, 2012 6:35:38 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_WorkflowProcessor SET AD_Schedule_ID=200004,Updated=TO_DATE('2012-09-28 18:35:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_WorkflowProcessor_ID=100
;
-- Sep 28, 2012 6:36:15 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:36:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200493
;
-- Sep 28, 2012 6:36:16 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_WorkflowProcessor MODIFY AD_Schedule_ID NUMBER(10)
;
-- Sep 28, 2012 6:36:16 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_WorkflowProcessor MODIFY AD_Schedule_ID NOT NULL
;
-- Sep 28, 2012 6:37:32 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE C_AcctProcessor SET AD_Schedule_ID=200002,Updated=TO_DATE('2012-09-28 18:37:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctProcessor_ID=100
;
-- Sep 28, 2012 6:38:02 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE R_RequestProcessor SET AD_Schedule_ID=200003,Updated=TO_DATE('2012-09-28 18:38:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE R_RequestProcessor_ID=100
;
-- Sep 28, 2012 6:38:36 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:38:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200490
;
-- Sep 28, 2012 6:38:37 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE C_AcctProcessor MODIFY AD_Schedule_ID NUMBER(10)
;
-- Sep 28, 2012 6:38:37 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE C_AcctProcessor MODIFY AD_Schedule_ID NOT NULL
;
-- Sep 28, 2012 6:39:50 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-09-28 18:39:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200492
;
-- Sep 28, 2012 6:39:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE R_RequestProcessor MODIFY AD_Schedule_ID NUMBER(10)
;
-- Sep 28, 2012 6:39:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE R_RequestProcessor MODIFY AD_Schedule_ID NOT NULL
;
-- Sep 28, 2012 6:47:43 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET AD_Val_Rule_ID=200007,Updated=TO_DATE('2012-09-28 18:47:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200489
;
-- Oct 2, 2012 8:02:11 PM COT
UPDATE AD_Field SET DisplayLogic='@ScheduleType@=F',Updated=TO_DATE('2012-10-02 20:02:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200495
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Element SET Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html',Updated=TO_DATE('2012-10-02 20:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Column SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Process_Para SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html', AD_Element_ID=54124 WHERE UPPER(ColumnName)='CRONPATTERN' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Process_Para SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Element_ID=54124 AND IsCentrallyMaintained='Y'
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Field SET Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54124) AND IsCentrallyMaintained='Y'
;
ALTER TABLE C_AcctProcessor MODIFY FrequencyType NULL
;
ALTER TABLE AD_AlertProcessor MODIFY Frequency NULL
;
ALTER TABLE AD_WorkflowProcessor MODIFY FrequencyType NULL
;
-- Oct 2, 2012 10:44:20 PM COT
UPDATE AD_Field SET IsDisplayed='N',Updated=TO_DATE('2012-10-02 22:44:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9434
;
SELECT register_migration_script('912_IDEMPIERE-391.sql') FROM dual
;

View File

@ -220,6 +220,7 @@ UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200486
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='RunOnlyOnIP', Description='Defines the IP address to transfer data to', Help='Contains info on the IP address to which we will transfer data' WHERE AD_Column_ID=200486 AND IsCentrallyMaintained='Y'
;
-- Sep 18, 2012 12:06:20 PM COT
-- IDEMPIERE-391 Scheduler improvements
CREATE TABLE AD_Schedule (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Schedule_ID NUMERIC(10) DEFAULT NULL , Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, CronPattern VARCHAR(255) DEFAULT NULL , Description VARCHAR(225) DEFAULT NULL , Frequency NUMERIC(10) DEFAULT NULL , FrequencyType CHAR(1) DEFAULT NULL , IsActive VARCHAR(1) DEFAULT 'Y' NOT NULL, MonthDay NUMERIC(10) DEFAULT NULL , RunOnlyOnIP VARCHAR(60) DEFAULT NULL , ScheduleType CHAR(1) DEFAULT 'F', Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, WeekDay CHAR(1) DEFAULT NULL , CONSTRAINT AD_Schedule_Key PRIMARY KEY (AD_Schedule_ID))
@ -538,7 +539,6 @@ UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200498
UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200488
;
-- Sep 18, 2012 1:47:15 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET DisplayLogic='@ScheduleType@=F',Updated=TO_TIMESTAMP('2012-09-18 13:47:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=200496
@ -764,6 +764,31 @@ UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200495
UPDATE AD_Column SET AD_Reference_ID=20,Updated=TO_TIMESTAMP('2012-09-18 14:14:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200478
;
-- Sep 28, 2012 5:40:09 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('AD_Schedule_UU',200158,'D','AD_Schedule_UU','AD_Schedule_UU','027b3c04-57c2-4df2-bae1-daffffa41fa7',0,TO_TIMESTAMP('2012-09-28 17:40:07','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-28 17:40:07','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
;
-- Sep 28, 2012 5:40:09 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200158 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 28, 2012 5:40:56 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200559,'D','N','N','N',0,'N',36,'N',10,'N','N',200158,'N','Y','b4867242-4498-4608-aa86-c262f3af378e','N','Y','N','AD_Schedule_UU','AD_Schedule_UU','N',0,TO_TIMESTAMP('2012-09-28 17:40:55','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-28 17:40:55','YYYY-MM-DD HH24:MI:SS'),0,0,0)
;
-- Sep 28, 2012 5:40:56 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200559 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 28, 2012 5:40:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD COLUMN AD_Schedule_UU VARCHAR(36) DEFAULT NULL
;
-- Sep 20, 2012 9:38:20 AM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (1,0,0,200000,TO_TIMESTAMP('2012-09-20 09:38:18','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-20 09:38:18','YYYY-MM-DD HH24:MI:SS'),100,'Y','D','F',0,'1 Day')
@ -903,6 +928,7 @@ UPDATE AD_Field SET SeqNoGrid=180,IsDisplayedGrid='Y' WHERE AD_Field_ID=200501
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET SeqNoSelection=2,Updated=TO_TIMESTAMP('2012-09-20 10:27:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 20, 2012 11:23:10 AM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsSelectionColumn='N', IsUpdateable='N', SeqNoSelection=0,Updated=TO_TIMESTAMP('2012-09-20 11:23:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
@ -1186,7 +1212,7 @@ UPDATE AD_Field SET ColumnSpan=3,Updated=TO_TIMESTAMP('2012-09-20 18:28:12','YYY
-- Sep 20, 2012 6:29:41 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (10,0,0,200002,TO_TIMESTAMP('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'10 Minutes')
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name,Description) VALUES (10,0,0,200002,TO_TIMESTAMP('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-20 18:29:40','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'10 Minutes','(do not delete, used in Initial Client Setup)')
;
-- Sep 20, 2012 6:31:38 PM COT
@ -1431,7 +1457,7 @@ UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-20 19:37:41','YY
-- Sep 20, 2012 7:39:26 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name) VALUES (15,0,0,200003,TO_TIMESTAMP('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'15 Minutes')
INSERT INTO AD_Schedule (Frequency,AD_Client_ID,AD_Org_ID,AD_Schedule_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,FrequencyType,ScheduleType,MonthDay,Name,Description) VALUES (15,0,0,200003,TO_TIMESTAMP('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-09-20 19:39:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','M','F',0,'15 Minutes','(do not delete, used in Initial Client Setup)')
;
-- Sep 20, 2012 7:55:53 PM COT
@ -1559,6 +1585,106 @@ UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-09-24 15:50:11','
ALTER TABLE AD_Schedule ADD COLUMN IsIgnoreProcessingTime CHAR(1) DEFAULT 'N' CHECK (IsIgnoreProcessingTime IN ('Y','N'))
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSystemSchedule',200157,'D','IsSystemSchedule','Schedule Just For System','System Schedule','0fcff3a8-e3d4-4d54-a060-7aa225b329c6',0,TO_TIMESTAMP('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200157 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200558,'D','N','N','N',0,'N',1,'N',20,'N','N',200157,'N','Y','f5b750f4-c9a7-4dfb-a4de-17f8431a1f47','N','Y','N','IsSystemSchedule','Schedule Just For System','N','IsSystemSchedule','Y',100,TO_TIMESTAMP('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200558 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 24, 2012 5:06:23 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD COLUMN IsSystemSchedule CHAR(1) DEFAULT 'N' CHECK (IsSystemSchedule IN ('Y','N'))
;
/* Create schedule records for actual configuration */
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextid( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
,now(),100,null,'Y',null,now(),100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' ')||' '||coalesce(cronpattern,' '),'N'
from (
select distinct frequencytype, frequency, weekday, scheduletype, isignoreprocessingtime, cronpattern
from ad_scheduler
where not exists (select 1 from ad_schedule where
coalesce(ad_scheduler.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_scheduler.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
coalesce(ad_scheduler.weekday,' ') =coalesce(ad_schedule.weekday,' ') and
coalesce(ad_scheduler.scheduletype,' ') =coalesce(ad_schedule.scheduletype,' ') and
coalesce(ad_scheduler.isignoreprocessingtime,' ')=coalesce(ad_schedule.isignoreprocessingtime,' ') and
coalesce(ad_scheduler.cronpattern,' ') =coalesce(ad_schedule.cronpattern,' ')
)
) as x
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextid( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,now(),100,null,'Y',null,now(),100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from c_acctprocessor
where not exists (select 1 from ad_schedule where
coalesce(c_acctprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(c_acctprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
) as x
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextid( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,now(),100,null,'Y',null,now(),100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from ad_alertprocessor
where not exists (select 1 from ad_schedule where
coalesce(ad_alertprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_alertprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
) as x
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextid( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,now(),100,null,'Y',null,now(),100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from r_requestprocessor
where not exists (select 1 from ad_schedule where
coalesce(r_requestprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(r_requestprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
) as x
;
insert into ad_schedule (ad_schedule_id, ad_schedule_uu, ad_client_id, ad_org_id, frequencytype, frequency, scheduletype, isignoreprocessingtime
,created, createdby,description,isactive,runonlyonip,updated,updatedby,name,issystemschedule)
select distinct nextid( 200020 , 'N'), generate_uuid(), 0, 0, frequencytype, frequency, scheduletype, isignoreprocessingtime
,now(),100,null,'Y',null,now(),100,coalesce(frequencytype,' ')||' '||coalesce(frequency,-1)||' '||coalesce(scheduletype,' '),'N'
from (
select distinct frequencytype, frequency, 'F' as scheduletype, 'Y' as isignoreprocessingtime
from ad_workflowprocessor
where not exists (select 1 from ad_schedule where
coalesce(ad_workflowprocessor.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_workflowprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1)
)
) as x
;
-- Sep 24, 2012 3:50:36 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table SET AD_Window_ID=200012,Updated=TO_TIMESTAMP('2012-09-24 15:50:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200020
@ -1589,31 +1715,6 @@ UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-24 15:51:17','YY
UPDATE AD_Field SET IsDisplayed='N', IsActive='N',Updated=TO_TIMESTAMP('2012-09-24 15:52:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58773
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSystemSchedule',200157,'D','IsSystemSchedule','Schedule Just For System','System Schedule','0fcff3a8-e3d4-4d54-a060-7aa225b329c6',0,TO_TIMESTAMP('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-24 17:05:07','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y')
;
-- Sep 24, 2012 5:05:08 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200157 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,200020,200558,'D','N','N','N',0,'N',1,'N',20,'N','N',200157,'N','Y','f5b750f4-c9a7-4dfb-a4de-17f8431a1f47','N','Y','N','IsSystemSchedule','Schedule Just For System','N','IsSystemSchedule','Y',100,TO_TIMESTAMP('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-09-24 17:06:09','YYYY-MM-DD HH24:MI:SS'),100,0,0)
;
-- Sep 24, 2012 5:06:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200558 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;
-- Sep 24, 2012 5:06:23 PM COT
-- IDEMPIERE-391 Scheduler improvements
ALTER TABLE AD_Schedule ADD COLUMN IsSystemSchedule CHAR(1) DEFAULT 'N' CHECK (IsSystemSchedule IN ('Y','N'))
;
-- Sep 24, 2012 5:06:51 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200019,1,'N','N',200558,'Y',200553,'N','D','Schedule Just For System','IsSystemSchedule','Y','N','1a29d07e-df06-4d49-bab4-733c0f547714',100,0,TO_TIMESTAMP('2012-09-24 17:06:50','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-09-24 17:06:50','YYYY-MM-DD HH24:MI:SS'),'Y')
@ -1665,165 +1766,514 @@ UPDATE AD_Column SET AD_Val_Rule_ID=200007,Updated=TO_TIMESTAMP('2012-09-24 17:5
;
-- Sep 27, 2012 10:19:28 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 10:19:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11348
;
-- Sep 27, 2012 10:19:30 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('c_acctprocessor','Frequency','NUMERIC(10)',null,'NULL')
;
-- Sep 27, 2012 10:19:30 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('c_acctprocessor','Frequency',null,'NULL',null)
;
-- Sep 27, 2012 11:05:06 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:05:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11348
;
-- Sep 27, 2012 11:36:59 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:36:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11441
;
-- Sep 27, 2012 11:37:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_alertprocessor','Frequency','NUMERIC(10)',null,'NULL')
;
-- Sep 27, 2012 11:37:18 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:37:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11441
;
-- Sep 27, 2012 11:37:24 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:37:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11440
;
-- Sep 27, 2012 11:37:28 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_alertprocessor','FrequencyType','CHAR(1)',null,'NULL')
;
-- Sep 27, 2012 11:37:34 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:37:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11440
;
-- Sep 27, 2012 11:38:29 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:38:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5480
;
-- Sep 27, 2012 11:38:33 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('r_requestprocessor','Frequency','NUMERIC(10)',null,'1')
;
-- Sep 27, 2012 11:38:33 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('r_requestprocessor','Frequency',null,'NULL',null)
;
-- Sep 27, 2012 11:38:38 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:38:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5480
;
-- Sep 27, 2012 11:38:45 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5481
;
-- Sep 27, 2012 11:38:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('r_requestprocessor','FrequencyType','CHAR(1)',null,'NULL')
;
-- Sep 27, 2012 11:38:50 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('r_requestprocessor','FrequencyType',null,'NULL',null)
;
-- Sep 27, 2012 11:38:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:38:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5481
;
-- Sep 27, 2012 11:39:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:39:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11391
;
-- Sep 27, 2012 11:39:56 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_workflowprocessor','Frequency','NUMERIC(10)',null,'NULL')
;
-- Sep 27, 2012 11:39:56 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_workflowprocessor','Frequency',null,'NULL',null)
;
-- Sep 27, 2012 11:40:03 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:40:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11391
;
-- Sep 27, 2012 11:40:11 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N', IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:40:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11382
;
-- Sep 27, 2012 11:45:45 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:45:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247
;
-- Sep 27, 2012 11:45:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_scheduler','Frequency','NUMERIC(10)',null,'NULL')
;
-- Sep 27, 2012 11:45:49 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_scheduler','Frequency',null,'NULL',null)
;
-- Sep 27, 2012 11:45:55 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:45:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247
;
-- Sep 27, 2012 11:46:03 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-09-27 11:46:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255
;
-- Sep 27, 2012 11:46:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_scheduler','FrequencyType','CHAR(1)',null,'NULL')
;
-- Sep 27, 2012 11:46:05 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
INSERT INTO t_alter_column values('ad_scheduler','FrequencyType',null,'NULL',null)
;
-- Sep 27, 2012 11:46:10 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-09-27 11:46:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255
;
-- Sep 27, 2012 11:49:52 AM COT
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Window SET WindowType='M',Updated=TO_TIMESTAMP('2012-09-27 11:49:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200012
;
-- Sep 28, 2012 5:38:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table SET Name='Schedule',Updated=TO_TIMESTAMP('2012-09-28 17:38:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Table_ID=200020
;
-- Sep 28, 2012 5:38:59 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=200020
;
-- Sep 28, 2012 5:42:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('RunOnlyOnIP',200159,'D','Run only on IP','Run only on IP','090ed7f1-67f7-4d25-ac6b-c4de976b732b',0,TO_TIMESTAMP('2012-09-28 17:42:09','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-09-28 17:42:09','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
;
-- Sep 28, 2012 5:42:10 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200159 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET AD_Element_ID=200159, ColumnName='RunOnlyOnIP', Description=NULL, Help=NULL, Name='Run only on IP',Updated=TO_TIMESTAMP('2012-09-28 17:42:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200486
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200486
;
-- Sep 28, 2012 5:42:18 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='Run only on IP', Description=NULL, Help=NULL WHERE AD_Column_ID=200486 AND IsCentrallyMaintained='Y'
;
CREATE UNIQUE INDEX ad_schedule_uu_idx ON ad_schedule (ad_schedule_uu)
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element SET Name='System Schedule',Updated=TO_TIMESTAMP('2012-09-28 18:21:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Element_ID=200157
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL, AD_Element_ID=200157 WHERE UPPER(ColumnName)='ISSYSTEMSCHEDULE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='IsSystemSchedule', Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Element_ID=200157 AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='System Schedule', Description='Schedule Just For System', Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200157) AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:21:19 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_PrintFormatItem SET PrintName='System Schedule', Name='System Schedule' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200157)
;
-- Sep 28, 2012 6:22:28 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y', FieldLength=60, IsUpdateable='Y',Updated=TO_TIMESTAMP('2012-09-28 18:22:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:22:53 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET Name='2 Hours',Updated=TO_TIMESTAMP('2012-09-28 18:22:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Schedule_ID=200004
;
-- Sep 28, 2012 6:23:11 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','Name','VARCHAR(60)',null,null)
;
-- Sep 28, 2012 6:23:11 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','Name',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:26:22 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsIdentifier='N', SeqNo=0, IsUpdateable='N',Updated=TO_TIMESTAMP('2012-09-28 18:26:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200473
;
-- Sep 28, 2012 6:26:38 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET SeqNo=1,Updated=TO_TIMESTAMP('2012-09-28 18:26:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:26:53 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET SeqNoSelection=1,Updated=TO_TIMESTAMP('2012-09-28 18:26:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200487
;
-- Sep 28, 2012 6:28:29 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:28:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200557
;
-- Sep 28, 2012 6:28:30 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','IsIgnoreProcessingTime','CHAR(1)',null,'N')
;
-- Sep 28, 2012 6:28:31 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET IsIgnoreProcessingTime='N' WHERE IsIgnoreProcessingTime IS NULL
;
-- Sep 28, 2012 6:28:31 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','IsIgnoreProcessingTime',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:28:42 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:28:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200558
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','IsSystemSchedule','CHAR(1)',null,'N')
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Schedule SET IsSystemSchedule='N' WHERE IsSystemSchedule IS NULL
;
-- Sep 28, 2012 6:28:48 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_schedule','IsSystemSchedule',null,'NOT NULL',null)
;
-- ?? MIGRATE ACTUAL DATA
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element SET Name='Schedule',Updated=TO_TIMESTAMP('2012-09-28 18:30:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL WHERE AD_Element_ID=200132
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL, AD_Element_ID=200132 WHERE UPPER(ColumnName)='AD_SCHEDULE_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Process_Para SET ColumnName='AD_Schedule_ID', Name='Schedule', Description=NULL, Help=NULL WHERE AD_Element_ID=200132 AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Field SET Name='Schedule', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200132) AND IsCentrallyMaintained='Y'
;
-- Sep 28, 2012 6:30:44 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_PrintFormatItem SET PrintName='Schedule', Name='Schedule' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200132)
;
-- Sep 28, 2012 6:32:24 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Scheduler SET Record_ID=NULL, AD_Schedule_ID=200001,Updated=TO_TIMESTAMP('2012-09-28 18:32:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Scheduler_ID=100
;
-- Sep 28, 2012 6:34:29 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:34:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200491
;
/* Set schedules for actual records before making them mandatory */
update ad_scheduler set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_scheduler.frequencytype,' ') =coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_scheduler.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
coalesce(ad_scheduler.weekday,' ') =coalesce(ad_schedule.weekday,' ') and
coalesce(ad_scheduler.scheduletype,' ') =coalesce(ad_schedule.scheduletype,' ') and
coalesce(ad_scheduler.isignoreprocessingtime,' ')=coalesce(ad_schedule.isignoreprocessingtime,' ') and
coalesce(ad_scheduler.cronpattern,' ') =coalesce(ad_schedule.cronpattern,' '))
;
update c_acctprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(c_acctprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(c_acctprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update ad_alertprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_alertprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_alertprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update ad_workflowprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(ad_workflowprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(ad_workflowprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
update r_requestprocessor set ad_schedule_id=(select min(ad_schedule_id) from ad_schedule where
coalesce(r_requestprocessor.frequencytype,' ')=coalesce(ad_schedule.frequencytype,' ') and
coalesce(r_requestprocessor.frequency,-1) =coalesce(ad_schedule.frequency,-1) and
ad_schedule.scheduletype='F')
;
-- Sep 28, 2012 6:34:33 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_alertprocessor','AD_Schedule_ID','NUMERIC(10)',null,null)
;
-- Sep 28, 2012 6:34:33 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_alertprocessor','AD_Schedule_ID',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:34:50 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:34:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200489
;
-- Sep 28, 2012 6:34:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_scheduler','AD_Schedule_ID','NUMERIC(10)',null,null)
;
-- Sep 28, 2012 6:34:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_scheduler','AD_Schedule_ID',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:35:38 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_WorkflowProcessor SET AD_Schedule_ID=200004,Updated=TO_TIMESTAMP('2012-09-28 18:35:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_WorkflowProcessor_ID=100
;
-- Sep 28, 2012 6:36:15 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:36:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200493
;
-- Sep 28, 2012 6:36:16 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_workflowprocessor','AD_Schedule_ID','NUMERIC(10)',null,null)
;
-- Sep 28, 2012 6:36:16 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('ad_workflowprocessor','AD_Schedule_ID',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:37:32 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE C_AcctProcessor SET AD_Schedule_ID=200002,Updated=TO_TIMESTAMP('2012-09-28 18:37:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctProcessor_ID=100
;
-- Sep 28, 2012 6:38:02 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE R_RequestProcessor SET AD_Schedule_ID=200003,Updated=TO_TIMESTAMP('2012-09-28 18:38:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE R_RequestProcessor_ID=100
;
-- Sep 28, 2012 6:38:36 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:38:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200490
;
-- Sep 28, 2012 6:38:37 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('c_acctprocessor','AD_Schedule_ID','NUMERIC(10)',null,null)
;
-- Sep 28, 2012 6:38:37 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('c_acctprocessor','AD_Schedule_ID',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:39:50 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-09-28 18:39:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200492
;
-- Sep 28, 2012 6:39:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('r_requestprocessor','AD_Schedule_ID','NUMERIC(10)',null,null)
;
-- Sep 28, 2012 6:39:52 PM COT
-- IDEMPIERE-391 Scheduler improvements
INSERT INTO t_alter_column values('r_requestprocessor','AD_Schedule_ID',null,'NOT NULL',null)
;
-- Sep 28, 2012 6:47:43 PM COT
-- IDEMPIERE-391 Scheduler improvements
UPDATE AD_Column SET AD_Val_Rule_ID=200007,Updated=TO_TIMESTAMP('2012-09-28 18:47:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200489
;
-- Oct 2, 2012 8:02:11 PM COT
UPDATE AD_Field SET DisplayLogic='@ScheduleType@=F',Updated=TO_TIMESTAMP('2012-10-02 20:02:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200495
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Element SET Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html',Updated=TO_TIMESTAMP('2012-10-02 20:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Column SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Element_ID=54124
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Process_Para SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html', AD_Element_ID=54124 WHERE UPPER(ColumnName)='CRONPATTERN' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Process_Para SET ColumnName='CronPattern', Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Element_ID=54124 AND IsCentrallyMaintained='Y'
;
-- Oct 2, 2012 8:06:14 PM COT
UPDATE AD_Field SET Name='Cron Scheduling Pattern', Description='Cron pattern to define when the process should be invoked.', Help='Cron pattern to define when the process should be invoked. See http://www.sauronsoftware.it/projects/cron4j/api/it/sauronsoftware/cron4j/SchedulingPattern.html' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54124) AND IsCentrallyMaintained='Y'
;
ALTER TABLE C_AcctProcessor ALTER FrequencyType DROP NOT NULL
;
ALTER TABLE C_AcctProcessor ALTER Frequency DROP NOT NULL
;
ALTER TABLE AD_AlertProcessor ALTER FrequencyType DROP NOT NULL
;
ALTER TABLE AD_AlertProcessor ALTER Frequency DROP NOT NULL
;
ALTER TABLE R_RequestProcessor ALTER FrequencyType DROP NOT NULL
;
ALTER TABLE R_RequestProcessor ALTER Frequency DROP NOT NULL
;
ALTER TABLE AD_Scheduler ALTER FrequencyType DROP NOT NULL
;
ALTER TABLE AD_Scheduler ALTER Frequency DROP NOT NULL
;
ALTER TABLE AD_WorkflowProcessor ALTER FrequencyType DROP NOT NULL
;
ALTER TABLE AD_WorkflowProcessor ALTER Frequency DROP NOT NULL
;
-- Oct 2, 2012 10:44:20 PM COT
UPDATE AD_Field SET IsDisplayed='N',Updated=TO_TIMESTAMP('2012-10-02 22:44:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9434
;
SELECT register_migration_script('912_IDEMPIERE-391.sql') FROM dual
;

View File

@ -59,6 +59,18 @@ public interface AdempiereProcessor
*/
public String getFrequencyType();
/**
* Get the schedule type
* @return schedule type
*/
public String getScheduleType();
/**
* Get the cron pattern
* @return cron pattern
*/
public String getCronPattern();
/**
* Get the frequency
* @return frequency

View File

@ -71,6 +71,15 @@ public interface I_AD_Schedule
/** Get AD_Schedule_ID */
public int getAD_Schedule_ID();
/** Column name AD_Schedule_UU */
public static final String COLUMNNAME_AD_Schedule_UU = "AD_Schedule_UU";
/** Set AD_Schedule_UU */
public void setAD_Schedule_UU (String AD_Schedule_UU);
/** Get AD_Schedule_UU */
public String getAD_Schedule_UU();
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
@ -165,6 +174,19 @@ public interface I_AD_Schedule
*/
public boolean isIgnoreProcessingTime();
/** Column name IsSystemSchedule */
public static final String COLUMNNAME_IsSystemSchedule = "IsSystemSchedule";
/** Set IsSystemSchedule.
* Schedule Just For System
*/
public void setIsSystemSchedule (boolean IsSystemSchedule);
/** Get IsSystemSchedule.
* Schedule Just For System
*/
public boolean isSystemSchedule();
/** Column name MonthDay */
public static final String COLUMNNAME_MonthDay = "MonthDay";
@ -194,14 +216,10 @@ public interface I_AD_Schedule
/** Column name RunOnlyOnIP */
public static final String COLUMNNAME_RunOnlyOnIP = "RunOnlyOnIP";
/** Set RunOnlyOnIP.
* Defines the IP address to transfer data to
*/
/** Set Run only on IP */
public void setRunOnlyOnIP (String RunOnlyOnIP);
/** Get RunOnlyOnIP.
* Defines the IP address to transfer data to
*/
/** Get Run only on IP */
public String getRunOnlyOnIP();
/** Column name ScheduleType */

View File

@ -37,12 +37,10 @@ import org.compiere.util.Msg;
public class MAcctProcessor extends X_C_AcctProcessor
implements AdempiereProcessor, AdempiereProcessor2
{
/**
*
*/
private static final long serialVersionUID = -7574845047521861399L;
private static final long serialVersionUID = -4760475718973777369L;
/**
* Get Active
@ -102,8 +100,23 @@ public class MAcctProcessor extends X_C_AcctProcessor
setSupervisor_ID (Supervisor_ID);
} // MAcctProcessor
/**
* Before Save
* @param newRecord new
* @return true
*/
@Override
protected boolean beforeSave(boolean newRecord)
{
if (newRecord || is_ValueChanged("AD_Schedule_ID")) {
long nextWork = MSchedule.getNextRunMS(System.currentTimeMillis(), getScheduleType(), getFrequencyType(), getFrequency(), getCronPattern());
if (nextWork > 0)
setDateNextRun(new Timestamp(nextWork));
}
return true;
} // beforeSave
/**
* Get Server ID
* @return id
@ -155,33 +168,29 @@ public class MAcctProcessor extends X_C_AcctProcessor
return no;
} // deleteLog
@Override
public String getFrequencyType() {
int AD_Schedule_ID = this.getAD_Schedule_ID();
if( AD_Schedule_ID > 0)
{
MSchedule schedule=MSchedule.get(getCtx(), AD_Schedule_ID);
return schedule.getFrequencyType();
}
return "";
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequencyType();
}
@Override
public int getFrequency() {
int AD_Schedule_ID = this.getAD_Schedule_ID();
if( AD_Schedule_ID > 0)
{
MSchedule schedule=MSchedule.get(getCtx(),AD_Schedule_ID);
return schedule.getFrequency();
}
return 0;
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequency();
}
@Override
public boolean isIgnoreProcessingTime() {
MSchedule schedule=MSchedule.get(getCtx(),getAD_Schedule_ID());
return schedule.isIgnoreProcessingTime();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).isIgnoreProcessingTime();
}
@Override
public String getScheduleType() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getScheduleType();
}
@Override
public String getCronPattern() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getCronPattern();
}
} // MAcctProcessor

View File

@ -38,8 +38,7 @@ public class MAlertProcessor extends X_AD_AlertProcessor
/**
*
*/
private static final long serialVersionUID = 9060358751064718910L;
private static final long serialVersionUID = -6566030540146374829L;
/**
* Get Active
@ -162,22 +161,46 @@ public class MAlertProcessor extends X_AD_AlertProcessor
return alerts;
} // getAlerts
/**
* Before Save
* @param newRecord new
* @return true
*/
@Override
public int getFrequency() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequency();
}
protected boolean beforeSave(boolean newRecord)
{
if (newRecord || is_ValueChanged("AD_Schedule_ID")) {
long nextWork = MSchedule.getNextRunMS(System.currentTimeMillis(), getScheduleType(), getFrequencyType(), getFrequency(), getCronPattern());
if (nextWork > 0)
setDateNextRun(new Timestamp(nextWork));
}
return true;
} // beforeSave
@Override
public String getFrequencyType() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequencyType();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequencyType();
}
@Override
public int getFrequency() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequency();
}
@Override
public boolean isIgnoreProcessingTime() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.isIgnoreProcessingTime();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).isIgnoreProcessingTime();
}
@Override
public String getScheduleType() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getScheduleType();
}
@Override
public String getCronPattern() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getCronPattern();
}
} // MAlertProcessor

View File

@ -50,8 +50,8 @@ public class MIMPProcessor
/**
*
*/
private static final long serialVersionUID = 8634765494025824138L;
/** Static Logger */
private static final long serialVersionUID = 4477942100661801354L;
private static CLogger s_log = CLogger.getCLogger (MIMPProcessor.class);
public MIMPProcessor(Properties ctx,
@ -215,5 +215,15 @@ public class MIMPProcessor
list.toArray(retValue);
return retValue;
} // getActive
@Override
public String getScheduleType() {
return MSchedule.SCHEDULETYPE_Frequency;
}
@Override
public String getCronPattern() {
return null;
}
}

View File

@ -39,7 +39,7 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
/**
*
*/
private static final long serialVersionUID = 7577593682255409240L;
private static final long serialVersionUID = -1477519989047580644L;
/**
* Get Active LDAP Server
@ -525,4 +525,14 @@ public class MLdapProcessor extends X_AD_LdapProcessor implements AdempiereProce
access.save ();
} // logAccess
@Override
public String getScheduleType() {
return MSchedule.SCHEDULETYPE_Frequency;
}
@Override
public String getCronPattern() {
return null;
}
} // MLdapProcessor

View File

@ -39,8 +39,7 @@ public class MRequestProcessor extends X_R_RequestProcessor
/**
*
*/
private static final long serialVersionUID = -3149710397208186523L;
private static final long serialVersionUID = 8231854734466233461L;
/**
* Get Active Request Processors
@ -256,22 +255,46 @@ public class MRequestProcessor extends X_R_RequestProcessor
return "RequestProcessor" + get_ID();
} // getServerID
/**
* Before Save
* @param newRecord new
* @return true
*/
@Override
protected boolean beforeSave(boolean newRecord)
{
if (newRecord || is_ValueChanged("AD_Schedule_ID")) {
long nextWork = MSchedule.getNextRunMS(System.currentTimeMillis(), getScheduleType(), getFrequencyType(), getFrequency(), getCronPattern());
if (nextWork > 0)
setDateNextRun(new Timestamp(nextWork));
}
return true;
} // beforeSave
@Override
public String getFrequencyType() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequencyType();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequencyType();
}
@Override
public int getFrequency() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequency();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequency();
}
@Override
public boolean isIgnoreProcessingTime() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.isIgnoreProcessingTime();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).isIgnoreProcessingTime();
}
@Override
public String getScheduleType() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getScheduleType();
}
@Override
public String getCronPattern() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getCronPattern();
}
} // MRequestProcessor

View File

@ -22,9 +22,6 @@ import it.sauronsoftware.cron4j.SchedulingPattern;
import java.net.InetAddress;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.logging.Level;
@ -32,24 +29,20 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.compiere.util.DisplayType;
import org.compiere.util.CCache;
public class MSchedule extends X_AD_Schedule
{
/**
*
*/
private static final long serialVersionUID = 2532063246191430056L;
private static final long serialVersionUID = -3319184522988847237L;
private static Pattern VALID_IPV4_PATTERN = null;
private static Pattern VALID_IPV6_PATTERN = null;
private static final String ipv4Pattern = "(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])";
private static final String ipv6Pattern = "([0-9a-f]{1,4}:){7}([0-9a-f]){1,4}";
private it.sauronsoftware.cron4j.Scheduler cronScheduler;
private Predictor predictor;
public MSchedule(Properties ctx, int AD_Schedule_ID, String trxName) {
super(ctx, AD_Schedule_ID, trxName);
// TODO Auto-generated constructor stub
@ -60,8 +53,8 @@ public class MSchedule extends X_AD_Schedule
// TODO Auto-generated constructor stub
}
protected boolean beforeSave()
{
@Override
protected boolean beforeSave(boolean newRecord) {
// Set Schedule Type & Frequencies
if (SCHEDULETYPE_Frequency.equals(getScheduleType()))
{
@ -85,10 +78,7 @@ public class MSchedule extends X_AD_Schedule
}
return true;
}
/**
* Brought from Compiere Open Source Community version 3.3.0
* Is it OK to Run process On IP of this box
@ -123,7 +113,7 @@ public class MSchedule extends X_AD_Schedule
{
InetAddress box = InetAddress.getLocalHost();
String ip = box.getHostAddress();
if (chekIPFormat()) {
if (chekIPFormat(ipOnly)) {
if (ipOnly.indexOf(ip) == -1) {
log.fine("Not allowed here - IP=" + ip + " does not match "+ ipOnly);
@ -133,7 +123,7 @@ public class MSchedule extends X_AD_Schedule
}
else{
String hostname=box.getHostName();
if(ipOnly.equals(hostname)){
if(! ipOnly.equals(hostname)){
log.fine("Not Allowed here -hostname " + hostname + " does not match "+ipOnly);
return false;
}
@ -150,27 +140,31 @@ public class MSchedule extends X_AD_Schedule
public static MSchedule get(Properties ctx, int AD_Schedule_ID)
{
if(AD_Schedule_ID > 0)
{
MSchedule schedule=new MSchedule(ctx, AD_Schedule_ID, null);
return schedule;
}
return null;
Integer key = new Integer (AD_Schedule_ID);
MSchedule retValue = (MSchedule)s_cache.get (key);
if (retValue != null)
return retValue;
retValue = new MSchedule (ctx, AD_Schedule_ID, null);
if (retValue.get_ID() != 0)
s_cache.put (key, retValue);
return retValue;
}
public boolean chekIPFormat()
/** Cache */
private static CCache<Integer, MSchedule> s_cache = new CCache<Integer, MSchedule> ("AD_Schedule", 10);
public boolean chekIPFormat(String ipOnly)
{
boolean IsIp = false;
try {
VALID_IPV4_PATTERN = Pattern.compile(ipv4Pattern,Pattern.CASE_INSENSITIVE);
VALID_IPV6_PATTERN = Pattern.compile(ipv6Pattern,Pattern.CASE_INSENSITIVE);
Matcher m1 = VALID_IPV4_PATTERN.matcher(getRunOnlyOnIP());
Matcher m1 = VALID_IPV4_PATTERN.matcher(ipOnly);
if (m1.matches()) {
IsIp = true;
} else {
Matcher m2 = VALID_IPV6_PATTERN.matcher(getRunOnlyOnIP());
Matcher m2 = VALID_IPV6_PATTERN.matcher(ipOnly);
if (m2.matches()) {
IsIp = true;
} else {
@ -183,91 +177,55 @@ public class MSchedule extends X_AD_Schedule
}
return IsIp;
}
/**
* Brought from Compiere 330
* Get Next Run
* @param last in MS
* @return next run in MS
*/
public long getNextRunMS (long last)
public static long getNextRunMS (long last, String scheduleType, String frequencyType, int frequency, String cronPattern)
{
Calendar calNow = Calendar.getInstance();
calNow.setTimeInMillis (last);
//
Calendar calNext = Calendar.getInstance();
calNext.setTimeInMillis (last);
String scheduleType = getScheduleType();
if (SCHEDULETYPE_Frequency.equals(scheduleType))
long now = System.currentTimeMillis();
if (MSchedule.SCHEDULETYPE_Frequency.equals(scheduleType))
{
String frequencyType = getFrequencyType();
int frequency = getFrequency();
// Calculate sleep interval based on frequency defined
if (frequency < 1)
frequency = 1;
long typeSec = 600; // 10 minutes
if (frequencyType == null)
typeSec = 300; // 5 minutes
else if (MSchedule.FREQUENCYTYPE_Minute.equals(frequencyType))
typeSec = 60;
else if (MSchedule.FREQUENCYTYPE_Hour.equals(frequencyType))
typeSec = 3600;
else if (MSchedule.FREQUENCYTYPE_Day.equals(frequencyType))
typeSec = 86400;
long sleepInterval = typeSec * 1000 * frequency; // ms
boolean increment=true;
/***** DAY ******/
if (X_AD_Schedule.FREQUENCYTYPE_Day.equals(frequencyType))
long next = last + sleepInterval;
while (next < now)
{
calNext.set (Calendar.HOUR_OF_DAY, 0);
calNext.set (Calendar.MINUTE, 0);
if(increment)
{
calNext.add(Calendar.DAY_OF_YEAR, frequency);
}
} // Day
/***** HOUR ******/
else if (X_AD_Schedule.FREQUENCYTYPE_Hour.equals(frequencyType))
{
calNext.set (Calendar.MINUTE, 0);
if(increment)
{
calNext.add (Calendar.HOUR_OF_DAY, frequency);
}
} // Hour
/***** MINUTE ******/
else if (X_AD_Schedule.FREQUENCYTYPE_Minute.equals(frequencyType))
{
if(increment)
{
calNext.add(Calendar.MINUTE, frequency);
}
} // Minute
long delta = calNext.getTimeInMillis() - calNow.getTimeInMillis();
StringBuilder info = new StringBuilder("Now=") .append(calNow.getTime().toString())
.append( ", Next=" + calNext.getTime().toString())
.append( ", Delta=" + delta)
.append( ", " + toString());
if (delta < 0)
{
log.warning(info.toString());
next = next + sleepInterval;
}
else
log.info (info.toString());
return calNext.getTimeInMillis();
return next;
}
else
else if (MSchedule.SCHEDULETYPE_CronSchedulingPattern.equals(scheduleType))
{
String cronPattern = (String) getCronPattern();
if (cronPattern != null && cronPattern.trim().length() > 0
&& SchedulingPattern.validate(cronPattern)) {
cronScheduler = new it.sauronsoftware.cron4j.Scheduler();
predictor = new Predictor(cronPattern);
Predictor predictor = new Predictor(cronPattern, last);
long next = predictor.nextMatchingTime();
while (next < now)
{
predictor = new Predictor(cronPattern, next);
next = predictor.nextMatchingTime();
}
return next;
}
}
} // not implemented MSchedule.SCHEDULETYPE_MonthDay, MSchedule.SCHEDULETYPE_WeekDay - can be done with cron
return 0;
} // getNextRunMS
}

View File

@ -16,8 +16,6 @@
*****************************************************************************/
package org.compiere.model;
import it.sauronsoftware.cron4j.SchedulingPattern;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.List;
@ -44,7 +42,7 @@ public class MScheduler extends X_AD_Scheduler
/**
*
*/
private static final long serialVersionUID = 6563650236096742870L;
private static final long serialVersionUID = 5106574386025319255L;
/**
* Get Active
@ -237,6 +235,7 @@ public class MScheduler extends X_AD_Scheduler
* @param newRecord new
* @return true
*/
@Override
protected boolean beforeSave(boolean newRecord)
{
@ -269,7 +268,12 @@ public class MScheduler extends X_AD_Scheduler
return false;
}
}
//
if (newRecord || is_ValueChanged("AD_Schedule_ID")) {
long nextWork = MSchedule.getNextRunMS(System.currentTimeMillis(), getScheduleType(), getFrequencyType(), getFrequency(), getCronPattern());
if (nextWork > 0)
setDateNextRun(new Timestamp(nextWork));
}
return true;
} // beforeSave
@ -287,23 +291,27 @@ public class MScheduler extends X_AD_Scheduler
@Override
public String getFrequencyType() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequencyType();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequencyType();
}
@Override
public int getFrequency() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequency();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequency();
}
@Override
public boolean isIgnoreProcessingTime() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.isIgnoreProcessingTime();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).isIgnoreProcessingTime();
}
@Override
public String getScheduleType() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getScheduleType();
}
@Override
public String getCronPattern() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getCronPattern();
}
} // MScheduler

View File

@ -16,6 +16,10 @@
*****************************************************************************/
package org.compiere.model;
import static org.compiere.model.SystemIDs.COUNTRY_US;
import static org.compiere.model.SystemIDs.SCHEDULE_10_MINUTES;
import static org.compiere.model.SystemIDs.SCHEDULE_15_MINUTES;
import java.io.File;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -34,7 +38,6 @@ import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
import org.compiere.util.Trx;
import static org.compiere.model.SystemIDs.*;
/**
* Initial Setup Model
@ -340,9 +343,11 @@ public final class MSetup
// Processors
MAcctProcessor ap = new MAcctProcessor(m_client, AD_User_ID);
ap.setAD_Schedule_ID(SCHEDULE_10_MINUTES);
ap.saveEx();
MRequestProcessor rp = new MRequestProcessor (m_client, AD_User_ID);
rp.setAD_Schedule_ID(SCHEDULE_15_MINUTES);
rp.saveEx();
log.info("fini");

View File

@ -149,4 +149,8 @@ public class SystemIDs
public final static int SYSCONFIG_USER_HASH_PASSWORD = 200013;
public final static int SYSCONFIG_SYSTEM_NATIVE_SEQUENCE = 50016;
public final static int SCHEDULE_10_MINUTES = 200002;
public final static int SCHEDULE_15_MINUTES = 200003;
}

View File

@ -97,6 +97,20 @@ public class X_AD_Schedule extends PO implements I_AD_Schedule, I_Persistent
return new KeyNamePair(get_ID(), String.valueOf(getAD_Schedule_ID()));
}
/** Set AD_Schedule_UU.
@param AD_Schedule_UU AD_Schedule_UU */
public void setAD_Schedule_UU (String AD_Schedule_UU)
{
set_Value (COLUMNNAME_AD_Schedule_UU, AD_Schedule_UU);
}
/** Get AD_Schedule_UU.
@return AD_Schedule_UU */
public String getAD_Schedule_UU ()
{
return (String)get_Value(COLUMNNAME_AD_Schedule_UU);
}
/** Set Cron Scheduling Pattern.
@param CronPattern
Cron pattern to define when the process should be invoked.
@ -201,6 +215,30 @@ public class X_AD_Schedule extends PO implements I_AD_Schedule, I_Persistent
return false;
}
/** Set IsSystemSchedule.
@param IsSystemSchedule
Schedule Just For System
*/
public void setIsSystemSchedule (boolean IsSystemSchedule)
{
set_Value (COLUMNNAME_IsSystemSchedule, Boolean.valueOf(IsSystemSchedule));
}
/** Get IsSystemSchedule.
@return Schedule Just For System
*/
public boolean isSystemSchedule ()
{
Object oo = get_Value(COLUMNNAME_IsSystemSchedule);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Day of the Month.
@param MonthDay
Day of the month 1 to 28/29/30/31
@ -238,18 +276,15 @@ public class X_AD_Schedule extends PO implements I_AD_Schedule, I_Persistent
return (String)get_Value(COLUMNNAME_Name);
}
/** Set RunOnlyOnIP.
@param RunOnlyOnIP
Defines the IP address to transfer data to
*/
/** Set Run only on IP.
@param RunOnlyOnIP Run only on IP */
public void setRunOnlyOnIP (String RunOnlyOnIP)
{
set_Value (COLUMNNAME_RunOnlyOnIP, RunOnlyOnIP);
}
/** Get RunOnlyOnIP.
@return Defines the IP address to transfer data to
*/
/** Get Run only on IP.
@return Run only on IP */
public String getRunOnlyOnIP ()
{
return (String)get_Value(COLUMNNAME_RunOnlyOnIP);

View File

@ -42,8 +42,7 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
/**
*
*/
private static final long serialVersionUID = 9164558879064747427L;
private static final long serialVersionUID = 6110376502075157361L;
/**
* Get Active
@ -134,25 +133,46 @@ public class MWorkflowProcessor extends X_AD_WorkflowProcessor
return no;
} // deleteLog
/**
* Before Save
* @param newRecord new
* @return true
*/
@Override
protected boolean beforeSave(boolean newRecord)
{
if (newRecord || is_ValueChanged("AD_Schedule_ID")) {
long nextWork = MSchedule.getNextRunMS(System.currentTimeMillis(), getScheduleType(), getFrequencyType(), getFrequency(), getCronPattern());
if (nextWork > 0)
setDateNextRun(new Timestamp(nextWork));
}
return true;
} // beforeSave
@Override
public String getFrequencyType() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequencyType();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequencyType();
}
@Override
public int getFrequency() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.getFrequency();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getFrequency();
}
@Override
public boolean isIgnoreProcessingTime() {
MSchedule schedule=MSchedule.get(getCtx(), getAD_Schedule_ID());
return schedule.isIgnoreProcessingTime();
return MSchedule.get(getCtx(),getAD_Schedule_ID()).isIgnoreProcessingTime();
}
@Override
public String getScheduleType() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getScheduleType();
}
@Override
public String getCronPattern() {
return MSchedule.get(getCtx(),getAD_Schedule_ID()).getCronPattern();
}
} // MWorkflowProcessor

View File

@ -23,5 +23,7 @@ import org.compiere.server.AdempiereServer;
*
*/
public interface IServerFactory {
// Class implementing this method must take into account if the server can be ran on this IP
public AdempiereServer[] create (Properties ctx);
}

View File

@ -32,7 +32,6 @@ import org.compiere.model.MRequestProcessor;
import org.compiere.model.MSchedule;
import org.compiere.model.MScheduler;
import org.compiere.model.MSystem;
import org.compiere.model.X_AD_Schedule;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.TimeUtil;
@ -53,6 +52,8 @@ public abstract class AdempiereServer extends Thread
*/
public static AdempiereServer create (AdempiereProcessor model)
{
if (! isOKtoRunOnIP(model))
return null;
if (model instanceof MRequestProcessor)
return new RequestProcessor ((MRequestProcessor)model);
if (model instanceof MWorkflowProcessor)
@ -85,23 +86,20 @@ public abstract class AdempiereServer extends Thread
p_client = MClient.get(m_ctx);
Env.setContext(m_ctx, "#AD_Client_ID", p_client.getAD_Client_ID());
m_initialNap = initialNap;
Timestamp dateNextRun = getDateNextRun(true);
if (dateNextRun != null)
m_nextWork = dateNextRun.getTime();
// log.info(model.getName() + " - " + getThreadGroup());
} // ServerBase
/** The Processor Model */
protected AdempiereProcessor p_model;
protected volatile AdempiereProcessor p_model;
/** Initial nap is seconds */
private int m_initialNap = 0;
/** Miliseconds to sleep - 10 Min default */
private long m_sleepMS = 600000;
/** Milliseconds to sleep - 10 Min default */
protected long m_sleepMS = 600000;
/** Sleeping */
private volatile boolean m_sleeping = false;
/** Server start time */
private long m_start = 0;
protected long m_start = 0;
/** Number of Work executions */
protected int p_runCount = 0;
/** Tine start of work */
@ -118,7 +116,7 @@ public abstract class AdempiereServer extends Thread
/** Context */
private Properties m_ctx = null;
/** System */
protected static MSystem p_system = null;
protected volatile static MSystem p_system = null;
/** Client */
protected MClient p_client = null;
@ -193,23 +191,6 @@ public abstract class AdempiereServer extends Thread
*/
public void run ()
{
if(p_model instanceof AdempiereProcessor2)
{
AdempiereProcessor2 model=(AdempiereProcessor2) p_model;
int AD_Schedule_ID = model.getAD_Schedule_ID();
MSchedule schedule = null;
if (AD_Schedule_ID != 0)
{
schedule = MSchedule.get (getCtx(), AD_Schedule_ID);
if (!schedule.isOKtoRunOnIP())
{
log.warning (getName() + ": Stopped - IP Restriction " + schedule);
return; // done
}
}
}
try
{
log.fine(getName() + ": pre-nap - " + m_initialNap);
@ -251,9 +232,9 @@ public abstract class AdempiereServer extends Thread
p_runCount++;
m_runLastMS = now - p_startWork;
m_runTotalMS += m_runLastMS;
//
m_sleepMS = calculateSleep(m_start);
m_runTotalMS += m_runLastMS;
// Finished work - calculate datetime for next run
Timestamp lastRun = new Timestamp(now);
if (p_model instanceof AdempiereProcessor2)
{
@ -261,23 +242,15 @@ public abstract class AdempiereServer extends Thread
if (ap.isIgnoreProcessingTime())
{
lastRun = new Timestamp(p_startWork);
if (m_nextWork <= 0)
m_nextWork = p_startWork;
m_nextWork = m_nextWork + m_sleepMS;
while (m_nextWork < now)
{
m_nextWork = m_nextWork + m_sleepMS;
}
}
else
{
m_nextWork = now + m_sleepMS;
}
}
else
{
m_nextWork = now + m_sleepMS;
}
m_nextWork = MSchedule.getNextRunMS(lastRun.getTime(),
p_model.getScheduleType(), p_model.getFrequencyType(),
p_model.getFrequency(), p_model.getCronPattern());
m_sleepMS = m_nextWork - now;
log.info(getName() + " Next run: " + new Timestamp(m_nextWork) + " sleep " + m_sleepMS);
//
p_model.setDateLastRun(lastRun);
p_model.setDateNextRun(new Timestamp(m_nextWork));
@ -359,48 +332,6 @@ public abstract class AdempiereServer extends Thread
return p_model;
} // getModel
/**
* Calculate Sleep ms
* @return miliseconds
*/
private long calculateSleep (long now)
{
String frequencyType = p_model.getFrequencyType();
int frequency = p_model.getFrequency();
if (frequency < 1)
frequency = 1;
//
long typeSec = 600; // 10 minutes
if (frequencyType == null)
typeSec = 300; // 5 minutes
else if (X_AD_Schedule.FREQUENCYTYPE_Minute.equals(frequencyType))
typeSec = 60;
else if (X_AD_Schedule.FREQUENCYTYPE_Hour.equals(frequencyType))
typeSec = 3600;
else if (X_AD_Schedule.FREQUENCYTYPE_Day.equals(frequencyType))
typeSec = 86400;
//
long sleep= typeSec * 1000 * frequency;
if (p_model instanceof AdempiereProcessor2)
{
AdempiereProcessor2 model=(AdempiereProcessor2) p_model;
if (model.getAD_Schedule_ID() == 0)
return sleep;
// Calculate Schedule
MSchedule schedule = MSchedule.get(getCtx(),model.getAD_Schedule_ID());
long next = schedule.getNextRunMS(now);
long delta = next - now;
if (delta < 0) {
log.warning("Negative Delta=" + delta + " - set to " + sleep);
delta = sleep;
}
return delta;
}
return sleep;
} // calculateSleep
/**
* Is Sleeping
* @return sleeping
@ -460,4 +391,17 @@ public abstract class AdempiereServer extends Thread
return p_model.getLogs();
} // getLogs
public static boolean isOKtoRunOnIP(AdempiereProcessor model) {
if (model instanceof AdempiereProcessor2) {
int AD_Schedule_ID = ((AdempiereProcessor2)model).getAD_Schedule_ID();
MSchedule schedule = MSchedule.get(Env.getCtx(), AD_Schedule_ID);
if (!schedule.isOKtoRunOnIP())
{
return false; // done
}
}
return true;
}
} // AdempiereServer

View File

@ -114,9 +114,11 @@ public class AdempiereServerMgr
{
MAcctProcessor pModel = acctModels[i];
AdempiereServer server = AdempiereServer.create(pModel);
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
}
}
// Request
MRequestProcessor[] requestModels = MRequestProcessor.getActive(m_ctx);
@ -124,9 +126,11 @@ public class AdempiereServerMgr
{
MRequestProcessor pModel = requestModels[i];
AdempiereServer server = AdempiereServer.create(pModel);
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
}
}
// Workflow
MWorkflowProcessor[] workflowModels = MWorkflowProcessor.getActive(m_ctx);
@ -134,9 +138,11 @@ public class AdempiereServerMgr
{
MWorkflowProcessor pModel = workflowModels[i];
AdempiereServer server = AdempiereServer.create(pModel);
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
}
}
// Alert
MAlertProcessor[] alertModels = MAlertProcessor.getActive(m_ctx);
@ -144,9 +150,11 @@ public class AdempiereServerMgr
{
MAlertProcessor pModel = alertModels[i];
AdempiereServer server = AdempiereServer.create(pModel);
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
}
}
// Scheduler
MScheduler[] schedulerModels = MScheduler.getActive(m_ctx);
@ -154,9 +162,11 @@ public class AdempiereServerMgr
{
MScheduler pModel = schedulerModels[i];
AdempiereServer server = AdempiereServer.create(pModel);
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-2);
m_servers.add(server);
}
}
// LDAP
MLdapProcessor[] ldapModels = MLdapProcessor.getActive(m_ctx);
@ -164,9 +174,11 @@ public class AdempiereServerMgr
{
MLdapProcessor lp = ldapModels[i];
AdempiereServer server = AdempiereServer.create(lp);
server.start();
server.setPriority(Thread.NORM_PRIORITY-1);
m_servers.add(server);
if (server != null) {
server.start();
server.setPriority(Thread.NORM_PRIORITY-1);
m_servers.add(server);
}
}
//osgi server

View File

@ -66,7 +66,7 @@ public class AlertProcessor extends AdempiereServer
*/
public AlertProcessor (MAlertProcessor model)
{
super (model, 180); // 3 minute delay
super (model, 30); // 30 seconds delay
m_model = model;
m_client = MClient.get(model.getCtx(), model.getAD_Client_ID());
} // AlertProcessor

View File

@ -51,7 +51,7 @@ public class RequestProcessor extends AdempiereServer
*/
public RequestProcessor (MRequestProcessor model)
{
super (model, 60); // 1 minute delay
super (model, 30); // 30 seconds delay
m_model = model;
m_client = MClient.get(model.getCtx(), model.getAD_Client_ID());
} // RequestProcessor

View File

@ -16,9 +16,6 @@
*****************************************************************************/
package org.compiere.server;
import it.sauronsoftware.cron4j.Predictor;
import it.sauronsoftware.cron4j.SchedulingPattern;
import java.io.File;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -34,12 +31,10 @@ import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.model.MProcess;
import org.compiere.model.MRole;
import org.compiere.model.MSchedule;
import org.compiere.model.MScheduler;
import org.compiere.model.MSchedulerLog;
import org.compiere.model.MSchedulerPara;
import org.compiere.model.MUser;
import org.compiere.print.MPrintFormat;
import org.compiere.print.ReportEngine;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoUtil;
@ -67,7 +62,7 @@ public class Scheduler extends AdempiereServer
*/
public Scheduler (MScheduler model)
{
super (model, 240); // nap
super (model, 30); // 30 seconds delay
m_model = model;
// m_client = MClient.get(model.getCtx(), model.getAD_Client_ID());
} // Scheduler
@ -79,9 +74,6 @@ public class Scheduler extends AdempiereServer
/** Transaction */
private Trx m_trx = null;
private it.sauronsoftware.cron4j.Scheduler cronScheduler;
private Predictor predictor;
// ctx for the report/process
Properties m_schedulerctx = new Properties();
@ -422,40 +414,4 @@ public class Scheduler extends AdempiereServer
return "#" + p_runCount + " - Last=" + m_summary.toString();
} // getServerInfo
@Override
public void run()
{
if (m_model.getAD_Schedule_ID() > 0)
{
MSchedule time = new MSchedule(getCtx(),m_model.getAD_Schedule_ID(), null);
String cronPattern = (String) time.getCronPattern();
if (cronPattern != null && cronPattern.trim().length() > 0
&& SchedulingPattern.validate(cronPattern)) {
cronScheduler = new it.sauronsoftware.cron4j.Scheduler();
cronScheduler.schedule(cronPattern, new Runnable() {
public void run() {
runNow();
long next = predictor.nextMatchingTime();
p_model.setDateNextRun(new Timestamp(next));
p_model.saveEx();
}
});
predictor = new Predictor(cronPattern);
long next = predictor.nextMatchingTime();
p_model.setDateNextRun(new Timestamp(next));
p_model.saveEx();
cronScheduler.start();
while (true) {
if (!sleep()) {
cronScheduler.stop();
break;
} else if (!cronScheduler.isStarted()) {
break;
}
}
} else {
super.run();
}
}
}
} // Scheduler

View File

@ -55,7 +55,7 @@ public class WorkflowProcessor extends AdempiereServer
*/
public WorkflowProcessor (MWorkflowProcessor model)
{
super (model, 120); // 2 minute delay
super (model, 30); // 30 seconds delay
m_model = model;
m_client = MClient.get(model.getCtx(), model.getAD_Client_ID());
} // WorkflowProcessor