🌱Spring environment
<bean id="liteflowConfig" class="com.yomahub.liteflow.property.LiteflowConfig">
<property name="ruleSource" value="config/flow.el.xml"/>
<!-- ***********The following configs are optional*********** -->
<!-- Whether liteflow is enabled, the default is true -->
<property name="enable" value="true"/>
<!-- Whether the banner of liteflow is enabled, the default is true -->
<property name="printBanner" value="true"/>
<!-- The node of zkNode, only works when zk is used as the configuration source -->
<property name="zkNode" value="/lite-flow/flow.xml"/>
<!-- Maximum number of slots for context, default is 1024 -->
<property name="slotSize" value="1024"/>
<!-- The number of threads of the execute2Future of FlowExecutor, the default is 64 -->
<property name="mainExecutorWorks" value="64"/>
<!-- FlowExecutor's execute2Future's custom thread pool Builder, LiteFlow provides the default Builder -->
<property name="mainExecutorClass" value="com.yomahub.liteflow.thread.LiteFlowDefaultMainExecutorBuilder"/>
<!-- Custom request ID generation class, LiteFlow provides a default generation class -->
<property name="requestIdGeneratorClass" value="com.yomahub.liteflow.flow.id.DefaultRequestIdGenerator"/>
<!-- Thread pool Builder for parallel nodes, LiteFlow provides default Builder -->
<property name="threadExecutorClass" value="com.yomahub.liteflow.thread.LiteFlowDefaultWhenExecutorBuilder"/>
<!-- The longest waiting time in seconds for asynchronous threads (only for when), the default value is 15 -->
<property name="whenMaxWaitSeconds" value="15"/>
<!-- The maximum number of threads in the global asynchronous thread pool of the when node, the default is 16 -->
<property name="whenMaxWorkers" value="16"/>
<!-- When node global asynchronous thread pool waiting queue number, the default is 512 -->
<property name="whenQueueLimit" value="512"/>
<!-- Whether to parse the rules at startup, the default is true -->
<property name="parseOnStart" value="true"/>
<!-- Global retries, default is 0 -->
<property name="retryCount" value="0"/>
<!-- Whether to support mixing of different types of loading methods, the default is false -->
<property name="supportMultipleType" value="false"/>
<!-- Global default node executor -->
<property name="nodeExecutorClass" value="com.yomahub.liteflow.flow.executor.DefaultNodeExecutor"/>
<!-- Whether to print the log during execution, the default is true -->
<property name="printExecutionLog" value="true"/>
<!-- Whether monitoring is enabled, it is disabled by default -->
<property name="enableLog" value="false"/>
<!-- Monitoring queue storage size, the default value is 200 -->
<property name="queueLimit" value="200"/>
<!-- Monitor how many milliseconds to delay execution at the beginning, the default value is 300000 milliseconds, which is 5 minutes -->
<property name="period" value="300000"/>
<!-- how many milliseconds the monitoring log print. The default value is 300000 milliseconds, which is 5 minutes. -->
<property name="delay" value="300000"/>
</bean>
notice
rule-source
is required whenever rules are used.
But if you construct rules dynamically with code, then the rule-source
configuration is automatically invalid. Because code constructs use code to assemble rules, no rules files are required. For details, please refer to Dynamic Rules.
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27