Created
January 29, 2018 18:47
-
-
Save ContrastingSounds/3f280c7ae91cb09f0295bfc7754d0fac to your computer and use it in GitHub Desktop.
Cloud Cruiser workbook for running bespoke monthly charging sql (line 49, EXEC [dbo].[sp_end_state_usage]), and then triggering charge step (line 71)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | |
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd"> | |
<bean id="processInfo" class="com.cloudcruiser.batch.ProcessInfo"> | |
<property name="processName" value="EndStateUsageAndCharge" /> | |
<property name="usageTimeZone" value="Europe/London" /> | |
</bean> | |
<batch:job id="sp_and_charge" parent="ccjob"> | |
<batch:step id="run_sp" next="charge"> | |
<batch:tasklet> | |
<bean class="com.cloudcruiser.batch.CCRecordCollectTasklet"> | |
<property name="active" value="true" /> | |
<property name="feedName" value="sp_end_state_usage" /> | |
<property name="singleFeedPerDay" value="true" /> | |
<property name="exceptionLimit" value="0" /> | |
<property name="exceptionLogLimit" value="0" /> | |
<property name="collector"> | |
<bean class="com.cloudcruiser.batch.collect.SmartJdbcCollector"> | |
<property name="dataSourceConfig"> | |
<bean class="com.cloudcruiser.batch.collect.ManagedJdbcDataSource"> | |
<property name="name" value="ccdb" /> | |
</bean> | |
</property> | |
<property name="feedConfig"> | |
<bean class="com.cloudcruiser.batch.collect.JdbcFeedConfig"> | |
<property name="outputs"> | |
<list> | |
<bean class="com.cloudcruiser.batch.collect.OutputField"> | |
<property name="input" value="SelectDate" /> | |
<property name="cctype" value="IDENTIFIER" /> | |
<property name="label" value="SelectDate" /> | |
</bean> | |
<bean class="com.cloudcruiser.batch.collect.OutputField"> | |
<property name="input" value="StartDate" /> | |
<property name="cctype" value="IDENTIFIER" /> | |
<property name="label" value="StartDate" /> | |
</bean> | |
<bean class="com.cloudcruiser.batch.collect.OutputField"> | |
<property name="input" value="EndDate" /> | |
<property name="cctype" value="IDENTIFIER" /> | |
<property name="label" value="EndDate" /> | |
</bean> | |
</list> | |
</property> | |
<property name="request" value="DECLARE @return_value int | |
EXEC @return_value = [dbo].[sp_end_state_usage] | |
@inSelectDate = ?; | |
SELECT 'Return Value' = @return_value | |
" /> | |
<property name="adjustTimestamps" value="false" /> | |
<property name="requestParameters"> | |
<list> | |
<bean class="com.cloudcruiser.batch.collect.RequestParameter"> | |
<property name="type" value="INTEGER" /> | |
<property name="pos" value="1" /> | |
<property name="value" value="${env.selectDate}" /> | |
<property name="format" value="yyyyMMdd" /> | |
</bean> | |
</list> | |
</property> | |
</bean> | |
</property> | |
</bean> | |
</property> | |
</bean> | |
</batch:tasklet> | |
</batch:step> | |
<batch:step id="charge"> | |
<batch:tasklet> | |
<bean class="com.cloudcruiser.batch.charge.ChargeTasklet"> | |
<property name="active" value="true" /> | |
<!-- if true, include monthly charge; otherwise, skip them --> | |
<property name="processMonthlyCharges" value="true" /> | |
<!-- if true, will always run charge, even if the "Charge Enabled" configuration --> | |
<!-- is set to "no." Default value is false --> | |
<!-- <property name="ignoreChargeEnabledFlag" value="true" /> --> | |
</bean> | |
</batch:tasklet> | |
</batch:step> | |
</batch:job> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment