本文整理汇总了Java中org.activiti.engine.delegate.VariableScope类的典型用法代码示例。如果您正苦于以下问题:Java VariableScope类的具体用法?Java VariableScope怎么用?Java VariableScope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VariableScope类属于org.activiti.engine.delegate包,在下文中一共展示了VariableScope类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createElResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
@Override
protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver compositeElResolver = new CompositeELResolver();
compositeElResolver.add(new VariableScopeElResolver(variableScope));
if (beans != null) {
compositeElResolver.add(new ReadOnlyMapELResolver(beans));
} else {
compositeElResolver.add(new ApplicationContextElResolver(applicationContext));
}
compositeElResolver.add(new ArrayELResolver());
compositeElResolver.add(new ListELResolver());
compositeElResolver.add(new MapELResolver());
compositeElResolver.add(new JsonNodeELResolver());
compositeElResolver.add(new BeanELResolver());
if (customResolvers != null) {
for (ELResolver resolver : customResolvers) {
compositeElResolver.add(resolver);
}
}
return compositeElResolver;
}
开发者ID:KayuraTeam,项目名称:kayura-activiti,代码行数:26,代码来源:SpringExpressionManager.java
示例2: createExtendProperty
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public ExtendProperty createExtendProperty(VariableScope variableScope) {
ExtendProperty extendProperty = new ExtendProperty(this);
Object modelValue = null;
if (variableScope != null) {
if (expression != null) {
final String varName = id;
if (variableScope.hasVariable(varName)) {
modelValue = variableScope.getVariable(varName);
}
} else {
modelValue = expression.getValue(variableScope);
}
}
if (modelValue instanceof String) {
extendProperty.setValue((String) modelValue);
} else if (modelValue != null) {
extendProperty.setValue(modelValue.toString());
} else {
extendProperty.setValue(this.value);
}
return extendProperty;
}
开发者ID:KayuraTeam,项目名称:kayura-activiti,代码行数:27,代码来源:ExtendPropertyHandler.java
示例3: createElResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
@Override
protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver compositeElResolver = new CompositeELResolver();
compositeElResolver.add(new VariableScopeElResolver(variableScope));
if(beans != null) {
// Only expose limited set of beans in expressions
compositeElResolver.add(new ReadOnlyMapELResolver(beans));
} else {
// Expose full application-context in expressions
compositeElResolver.add(new ApplicationContextElResolver(applicationContext));
}
compositeElResolver.add(new ArrayELResolver());
compositeElResolver.add(new ListELResolver());
compositeElResolver.add(new MapELResolver());
compositeElResolver.add(new BeanELResolver());
return compositeElResolver;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:SpringExpressionManager.java
示例4: evaluate
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public Object evaluate(String script, String language, VariableScope variableScope) {
Bindings bindings = createBindings(variableScope);
ScriptEngine scriptEngine = scriptEngineManager.getEngineByName(language);
if (scriptEngine == null) {
scriptEngine = checkForOSGiEngine(language);
}
if (scriptEngine == null) {
throw new ActivitiException("Can't find scripting engine for '" + language + "'");
}
try {
return scriptEngine.eval(script, bindings);
} catch (ScriptException e) {
throw new ActivitiException("problem evaluating script: " + e.getMessage(), e);
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:ScriptingEngines.java
示例5: getValue
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public Object getValue(VariableScope variableScope) {
ELContext elContext = expressionManager.getElContext(variableScope);
try {
ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(invocation);
return invocation.getInvocationResult();
} catch (PropertyNotFoundException pnfe) {
throw new ActivitiException("Unknown property used in expression", pnfe);
} catch (MethodNotFoundException mnfe) {
throw new ActivitiException("Unknown method used in expression", mnfe);
} catch(ELException ele) {
throw new ActivitiException("Error while evalutaing expression", ele);
} catch (Exception e) {
throw new ActivitiException("Error while evalutaing expression", e);
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:JuelExpression.java
示例6: getElContext
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public ELContext getElContext(VariableScope variableScope) {
ELContext elContext = null;
if (variableScope instanceof VariableScopeImpl) {
VariableScopeImpl variableScopeImpl = (VariableScopeImpl) variableScope;
elContext = variableScopeImpl.getCachedElContext();
}
if (elContext==null) {
elContext = createElContext(variableScope);
if (variableScope instanceof VariableScopeImpl) {
((VariableScopeImpl)variableScope).setCachedElContext(elContext);
}
}
return elContext;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:ExpressionManager.java
示例7: getValue
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public Object getValue(VariableScope variableScope) {
ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext(variableScope);
try {
ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContext);
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(invocation);
return invocation.getInvocationResult();
} catch (PropertyNotFoundException pnfe) {
throw new ActivitiException("Unknown property used in expression: " + expressionText, pnfe);
} catch (MethodNotFoundException mnfe) {
throw new ActivitiException("Unknown method used in expression: " + expressionText, mnfe);
} catch(ELException ele) {
throw new ActivitiException("Error while evaluating expression: " + expressionText, ele);
} catch (Exception e) {
throw new ActivitiException("Error while evaluating expression: " + expressionText, e);
}
}
开发者ID:springvelocity,项目名称:xbpm5,代码行数:19,代码来源:JuelExpression.java
示例8: createElResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver elResolver = new CompositeELResolver();
elResolver.add(new VariableScopeElResolver(variableScope));
if(beans != null) {
// ACT-1102: Also expose all beans in configuration when using standalone activiti, not
// in spring-context
elResolver.add(new ReadOnlyMapELResolver(beans));
}
elResolver.add(new ArrayELResolver());
elResolver.add(new ListELResolver());
elResolver.add(new MapELResolver());
elResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.class, "getFieldValue", "setFieldValue")); //TODO: needs verification
elResolver.add(new BeanELResolver());
return elResolver;
}
开发者ID:springvelocity,项目名称:xbpm5,代码行数:18,代码来源:ExpressionManager.java
示例9: getStringValue
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
protected String getStringValue(Expression expression, VariableScope scope)
{
if (expression != null)
{
return (String) expression.getValue(scope);
}
return null;
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:ActivitiScriptBase.java
示例10: getExpressionString
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
protected String getExpressionString(Expression expression, VariableScope variableScope)
{
if (expression != null)
{
return (String) expression.getValue(variableScope);
}
return null;
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:ConvertDateToISO8601.java
示例11: VariableScopeResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public VariableScopeResolver(VariableScope variableScope) {
if (variableScope==null) {
throw new ActivitiException("variableScope cannot be null");
}
if (variableScope instanceof ExecutionEntity) {
variableScopeKey = "execution";
} else if (variableScope instanceof TaskEntity){
variableScopeKey = "task";
} else {
throw new ActivitiException("unsupported variable scope type: "+variableScope.getClass().getName());
}
this.variableScope = variableScope;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:VariableScopeResolver.java
示例12: createBindings
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public Bindings createBindings(VariableScope variableScope) {
List<Resolver> scriptResolvers = new ArrayList<Resolver>();
for (ResolverFactory scriptResolverFactory: resolverFactories) {
Resolver resolver = scriptResolverFactory.createResolver(variableScope);
if (resolver!=null) {
scriptResolvers.add(resolver);
}
}
return new ScriptBindings(scriptResolvers, variableScope);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:ScriptBindingsFactory.java
示例13: getVariable
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public Object getVariable(String variableName) {
ensureVariableInstancesInitialized();
VariableInstanceEntity variableInstance = variableInstances.get(variableName);
if (variableInstance!=null) {
return variableInstance.getValue();
}
VariableScope parentScope = getParentVariableScope();
if (parentScope!=null) {
return parentScope.getVariable(variableName);
}
return null;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:VariableScopeImpl.java
示例14: hasVariables
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public boolean hasVariables() {
ensureVariableInstancesInitialized();
if (!variableInstances.isEmpty()) {
return true;
}
VariableScope parentScope = getParentVariableScope();
if (parentScope!=null) {
return parentScope.hasVariables();
}
return false;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:VariableScopeImpl.java
示例15: hasVariable
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public boolean hasVariable(String variableName) {
if (hasVariableLocal(variableName)) {
return true;
}
VariableScope parentScope = getParentVariableScope();
if (parentScope!=null) {
return parentScope.hasVariable(variableName);
}
return false;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:VariableScopeImpl.java
示例16: setVariable
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public void setVariable(String variableName, Object value) {
if (hasVariableLocal(variableName)) {
setVariableLocal(variableName, value);
return;
}
VariableScope parentVariableScope = getParentVariableScope();
if (parentVariableScope!=null) {
parentVariableScope.setVariable(variableName, value);
return;
}
createVariableLocal(variableName, value);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:VariableScopeImpl.java
示例17: removeVariable
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public void removeVariable(String variableName) {
ensureVariableInstancesInitialized();
VariableInstanceEntity variableInstance = variableInstances.remove(variableName);
if (variableInstance != null) {
variableInstance.delete();
return;
}
VariableScope parentVariableScope = getParentVariableScope();
if (parentVariableScope!=null) {
parentVariableScope.removeVariable(variableName);
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:13,代码来源:VariableScopeImpl.java
示例18: setValue
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
public void setValue(Object value, VariableScope variableScope) {
ELContext elContext = expressionManager.getElContext(variableScope);
try {
ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value);
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(invocation);
}catch (Exception e) {
throw new ActivitiException("Error while evalutaing expression", e);
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:JuelExpression.java
示例19: createElResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver elResolver = new CompositeELResolver();
elResolver.add(new VariableScopeElResolver(variableScope));
elResolver.add(new ArrayELResolver());
elResolver.add(new ListELResolver());
elResolver.add(new MapELResolver());
elResolver.add(new DynamicBeanPropertyELResolver(ItemInstance.class, "getFieldValue", "setFieldValue")); //TODO: needs verification
elResolver.add(new BeanELResolver());
return elResolver;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:ExpressionManager.java
示例20: createElResolver
import org.activiti.engine.delegate.VariableScope; //导入依赖的package包/类
@Override
protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver compositeElResolver = new CompositeELResolver();
compositeElResolver.add(new VariableScopeElResolver(variableScope));
compositeElResolver.add(new CdiResolver());
compositeElResolver.add(new ArrayELResolver());
compositeElResolver.add(new ListELResolver());
compositeElResolver.add(new MapELResolver());
compositeElResolver.add(new BeanELResolver());
return compositeElResolver;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:CdiExpressionManager.java
注:本文中的org.activiti.engine.delegate.VariableScope类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论