<?xml version="1.0" encoding="UTF-8"?>

<COMPONENT> 
  <HEADER AUTHOR="Kooin-Shin" 
  		  COMPATIBILITY="ALL" 
  		  DATA_AUTO_PROPAGATE="false" 
  		  PLATEFORM="ALL" 
  		  RELEASE_DATE="20190613B" 
  		  SERIAL="" 
  		  STARTABLE="true" 
  		  STATUS="BETA"  
  		  VERSION="0.94"> 
    <SIGNATURE/> 
  </HEADER>  
  
  <FAMILIES> 
    <FAMILY>ChaosToCosmos</FAMILY> 
  </FAMILIES>
    
  <DOCUMENTATION> 
    <URL>http://www.chaostocosmos.org</URL> 
  </DOCUMENTATION>
    
  <CONNECTORS> 
    <CONNECTOR CTYPE="FLOW" MAX_INPUT="1" MAX_OUTPUT="0" /> 
    <CONNECTOR CTYPE="ITERATE" MAX_INPUT="1" MAX_OUTPUT="0" />  
    <CONNECTOR CTYPE="SUBJOB_OK" MAX_INPUT="1" MAX_OUTPUT="0" />  
    <CONNECTOR CTYPE="SUBJOB_ERROR" MAX_INPUT="1" MAX_OUTPUT="0" />  
    <CONNECTOR CTYPE="COMPONENT_OK" NAME="SCHEDULE_PROCESS" MAX_INPUT="1" MAX_OUTPUT="99" LINE_STYLE="3" COLOR="44BB11" />  
    <CONNECTOR CTYPE="RUN_IF" MAX_INPUT="1" MAX_OUTPUT="0" /> 
  </CONNECTORS>  

  <PARAMETERS>
	<PARAMETER NAME="USE_SIMPLE" FIELD="RADIO" NUM_ROW="20" GROUP="SCHEDULE" SHOW="true">
		<DEFAULT>true</DEFAULT>
	</PARAMETER>
	<PARAMETER NAME="USE_CRON" FIELD="RADIO" NUM_ROW="20" GROUP="SCHEDULE" SHOW="true">
		<DEFAULT>false</DEFAULT>
	</PARAMETER>
	<PARAMETER NAME="CRON_EXPR_LABEL" FIELD="LABEL" NUM_ROW="50" COLOR="5555FF" GROUP="SCHEDULE_CONFIG" SHOW="true">
		<DEFAULT>You can define schedule by cron expression. Each column be expressed with cron expression special character like ,(point at or others) /(interval) -(range) *(all) ?(optional)</DEFAULT>
	</PARAMETER>
	<PARAMETER NAME="WEEK_ALL" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW="true">
		<DEFAULT>true</DEFAULT>
	</PARAMETER>
	<PARAMETER NAME="WEEK_MON" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_TUE" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_WED" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_THU" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_FRI" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_SAT" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="WEEK_SUN" FIELD="CHECK" NUM_ROW="51" GROUP="SCHEDULE_CONFIG" SHOW_IF="WEEK_ALL == 'false'" />
	<PARAMETER NAME="SIMPLE" FIELD="TABLE" GROUP="SCHEDULE_CONFIG" NUM_ROW="52" NB_LINES="5" SHOW_IF="USE_SIMPLE == 'true'">
		<ITEMS>
    	   	<ITEM NAME="SIMPLE_COMPONENT" 	FIELD="COMPONENT_LIST" VALUE="" />
    	   	<ITEM NAME="SIMPLE_START_DATE" 	FIELD="DATE" VALUE="NOW" />
    	   	<ITEM NAME="SIMPLE_END_DATE" 	FIELD="DATE" VALUE="INFINITE" />
    	   	<ITEM NAME="SIMPLE_OVERTIME_CANCEL"	FIELD="CHECK" VALUE="false" />
    	   	<ITEM NAME="SIMPLE_CONCURRENT_RUN"	FIELD="CHECK" VALUE="false" />
    	   	<ITEM NAME="SIMPLE_MISFIRE_POLICY" 	FIELD="CLOSED_LIST">
    	   		<ITEMS DEFAULT="SIMPLE_MISFIRE_POLICY_DO_NOTHING">
    	   			<ITEM NAME="SIMPLE_MISFIRE_POLICY_DO_NOTHING" VALUE="DO_NOTHING" />
    	   			<ITEM NAME="SIMPLE_MISFIRE_POLICY_FIRE_PROCEED" VALUE="FIRE_PROCEED" />
    	   			<ITEM NAME="SIMPLE_MISFIRE_POLICY_IGNORE" VALUE="IGNORE" />
    	   		</ITEMS>
    	   	</ITEM>
    	   	<ITEM NAME="SIMPLE_SECONDS" 	FIELD="TEXT" VALUE="0/5" />
    	   	<ITEM NAME="SIMPLE_MINUTES" 	FIELD="TEXT" VALUE="*" />
    	   	<ITEM NAME="SIMPLE_HOURS" 		FIELD="TEXT" VALUE="*" />
    	   	<ITEM NAME="SIMPLE_DAYS" 		FIELD="TEXT" VALUE="*" />
    	   	<ITEM NAME="SIMPLE_MONTHS" 		FIELD="TEXT" VALUE="*" />
    	   	<ITEM NAME="SIMPLE_YEARS" 		FIELD="TEXT" VALUE="" />
		</ITEMS>
    </PARAMETER>
	<PARAMETER NAME="CRON" FIELD="TABLE" GROUP="SCHEDULE_CONFIG" NUM_ROW="52" NB_LINES="5" SHOW_IF="USE_CRON == 'true'">
		<ITEMS>
    	   	<ITEM NAME="CRON_COMPONENT" 	FIELD="COMPONENT_LIST" VALUE="" />
    	   	<ITEM NAME="CRON_START_DATE" 	FIELD="DATE" VALUE="NOW" />
    	   	<ITEM NAME="CRON_END_DATE" 		FIELD="DATE" VALUE="INFINITE" />
    	   	<ITEM NAME="CRON_OVERTIME_CANCEL"	FIELD="CHECK" VALUE="false" />
    	   	<ITEM NAME="CRON_CONCURRENT_RUN"	FIELD="CHECK" VALUE="false" />
    	   	<ITEM NAME="CRON_MISFIRE_POLICY" 	FIELD="CLOSED_LIST">
    	   		<ITEMS DEFAULT="CRON_MISFIRE_POLICY_DO_NOTHING">
    	   			<ITEM NAME="CRON_MISFIRE_POLICY_DO_NOTHING" VALUE="DO_NOTHING" />
    	   			<ITEM NAME="CRON_MISFIRE_POLICY_FIRE_PROCEED" VALUE="FIRE_PROCEED" />
    	   			<ITEM NAME="CRON_MISFIRE_POLICY_IGNORE" VALUE="IGNORE" />
    	   		</ITEMS>
    	   	</ITEM>
    	   	<ITEM NAME="CRON_EXPR" FIELD="TEXT" VALUE="&quot;0/5 * * ? * MON-FRI 2019-2029&quot;"  />
		</ITEMS>
    </PARAMETER>
  </PARAMETERS>

  <ADVANCED_PARAMETERS>
	<PARAMETER FIELD="CHECK" NAME="DIE_ON_ERROR" NUM_ROW="10" >
		<DEFAULT>false</DEFAULT>
	</PARAMETER>
  </ADVANCED_PARAMETERS>
    
  <CODEGENERATION>
    <IMPORTS>    
      <IMPORT MODULE="cron-scheduler-0.9.0.jar" NAME="cron-scheduler-0.9.0" REQUIRED="true" />
      <IMPORT MODULE="log4j-1.2.16.jar" NAME="log4j-1.2.16" REQUIRED="true" />
      <IMPORT MODULE="quartz-2.3.0-SNAPSHOT.jar" NAME="quartz-2.3.0-SNAPSHOT" REQUIRED="true" />
      <IMPORT MODULE="quartz-jobs-2.3.0-SNAPSHOT.jar" NAME="quartz-jobs-2.3.0-SNAPSHOT" REQUIRED="true" /> 
      <IMPORT MODULE="slf4j-api-1.7.7.jar" NAME="slf4j-api-1.7.7" REQUIRED="true" />
      <IMPORT MODULE="slf4j-log4j12-1.7.7.jar" NAME="slf4j-log4j12-1.7.7" REQUIRED="true" />
    </IMPORTS> 
  </CODEGENERATION>  
  
  <RETURNS> 
    <RETURN AVAILABILITY="AFTER" NAME="NB_LINE" TYPE="id_Integer"/> 
  </RETURNS> 
</COMPONENT>
