本文整理汇总了Java中org.activiti.engine.impl.variable.StringType类的典型用法代码示例。如果您正苦于以下问题:Java StringType类的具体用法?Java StringType怎么用?Java StringType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringType类属于org.activiti.engine.impl.variable包,在下文中一共展示了StringType类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configure
import org.activiti.engine.impl.variable.StringType; //导入依赖的package包/类
@Override
public void configure(ProcessEngineConfigurationImpl processEngineConfiguration)
{
// There is an issue when using Activiti with Oracle. When workflow variables have a length greater then 2000 and smaller than 4001,
// Activiti tries to store that as a String column, but the Oracle database column length (ACT_RU_VARIABLE.TEXT_, ACT_HI_VARINST.TEXT_) is 2000.
// Since Activiti uses NVARCHAR as the column type which requires 2 bytes for every character, the maximum size Oracle allows for the column is
// 2000 (i.e. 4000 bytes).
// Replace the StringType and LongType to store greater than 2000 length variables as blob.
VariableTypes variableTypes = processEngineConfiguration.getVariableTypes();
VariableType stringType = new StringType(2000);
int indexToInsert = replaceVariableType(variableTypes, stringType, 0);
VariableType longStringType = new LongStringType(2001);
replaceVariableType(variableTypes, longStringType, ++indexToInsert);
}
开发者ID:FINRAOS,项目名称:herd,代码行数:18,代码来源:HerdProcessEngineConfigurator.java
示例2: testNoStringAndLongStringType
import org.activiti.engine.impl.variable.StringType; //导入依赖的package包/类
/**
* Activiti by default configures StringType and LongStringType VariableType in configuration.
* This method tests the scenarios where no StringType and LongStringType is already configured in configuration.
*/
@Test
public void testNoStringAndLongStringType() throws Exception
{
SpringProcessEngineConfiguration configuration = new SpringProcessEngineConfiguration();
configuration.setVariableTypes(new DefaultVariableTypes());
herdProcessEngineConfigurator.configure(configuration);
VariableType type = configuration.getVariableTypes().findVariableType(StringUtils.repeat("a", 2000));
assertEquals(StringType.class, type.getClass());
type = configuration.getVariableTypes().findVariableType(StringUtils.repeat("a", 2001));
assertEquals(LongStringType.class, type.getClass());
}
开发者ID:FINRAOS,项目名称:herd,代码行数:18,代码来源:HerdProcessEngineConfiguratorTest.java
注:本文中的org.activiti.engine.impl.variable.StringType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论