__IF_EXISTS__
SELECT 1
  FROM CI_UT_INSTL_DTL
 WHERE SCRIPT_FILE_NAME = 'FW4203_postData2.SQL'
   AND END_DTTM IS NOT NULL
/
__THEN__

__EXIT__

__ENDIF__

__IF_EXISTS__
SELECT 1
  FROM CI_INSTALL_PROD
 WHERE INSTALL_OPT_ID = '11111'
   AND OWNER_FLG = 'F1'
/
__ELSE__

__EXIT__

__ENDIF__

INSERT INTO CI_WFM ( WFM_NAME, VERSION, EXT_SYS_TYP_FLG) SELECT 'F1_GENSYSCFG', 1, 'F1GC' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM CI_WFM WHERE EXT_SYS_TYP_FLG = 'F1GC') AND EXISTS (SELECT 1 FROM CI_INSTALL_PROD WHERE RELEASE_ID='V2.2.0')
/

INSERT INTO CI_WFM_L ( WFM_NAME, LANGUAGE_CD,VERSION, DESCR)  SELECT WFM_NAME, LANGUAGE_CD, 1, 'General System Configuration' FROM CI_WFM F, CI_LANGUAGE L where F.EXT_SYS_TYP_FLG = 'F1GC' AND L.SUPPORT_SW = 'Y' AND NOT EXISTS (SELECT 1 FROM CI_WFM F, CI_WFM_L L WHERE F.WFM_NAME = L.WFM_NAME AND F.EXT_SYS_TYP_FLG = 'F1GC') AND EXISTS (SELECT 1 FROM CI_INSTALL_PROD WHERE RELEASE_ID='V2.2.0')
/

INSERT INTO CI_WFM_OPT (WFM_NAME, SEQ_NUM, VERSION, WFM_OPT_VAL,EXT_OPT_TYPE ) SELECT WFM_NAME, 1, 1, 'TRUE', 'F1PC' FROM CI_WFM WHERE EXT_SYS_TYP_FLG = 'F1GC' AND NOT EXISTS (SELECT 1 FROM CI_WFM F, CI_WFM_OPT O WHERE F.WFM_NAME = O.WFM_NAME AND F.EXT_SYS_TYP_FLG = 'F1GC' AND EXT_OPT_TYPE='F1PC' ) AND EXISTS (SELECT 1 FROM CI_INSTALL_PROD WHERE RELEASE_ID='V2.2.0')
/