02-02-2012 04:03 PM
// This is a groovy task
// The object "applicationSpecificApi" is injected into the script binding by us, similar to the object "execution"
def approvedAmount = execution.getVariable("amount");
def approvedBy = execution.getVariable("user_id");
applicationSpecificApi.authorizeSpending (approvedAmount, approvedBy);
02-03-2012 03:48 AM
02-03-2012 07:41 AM
protected void initScriptingEngines() {
if (resolverFactories==null) {
resolverFactories = new ArrayList<ResolverFactory>();
resolverFactories.add(new VariableScopeResolverFactory());
resolverFactories.add(new BeansResolverFactory());
}
if (scriptingEngines==null) {
scriptingEngines = new ScriptingEngines(new ScriptBindingsFactory(resolverFactories));
}
}// While creating the engine
Map<Object, Object> beans = new HashMap<Object, Object>();
beans.put("myservice", new MyService());
((ProcessEngineConfigurationImpl)config).setBeans(beans);
// In a script task
myservice.callMyFunction()Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.