use of org.activiti.scripting.secure.SecureJavascriptConfigurator in project Activiti by Activiti.
the class SecureScriptingBaseTest method initProcessEngine.
@Before
public void initProcessEngine() {
SecureJavascriptConfigurator configurator = new SecureJavascriptConfigurator().setWhiteListedClasses(new HashSet<String>(Arrays.asList("java.util.ArrayList", "org.activiti.test.scripting.secure.MyBean"))).setMaxStackDepth(10).setMaxScriptExecutionTime(3000L).setMaxMemoryUsed(3145728L);
Map<Object, Object> beans = new HashMap<Object, Object>();
beans.put("myBean", new MyBean());
this.processEngine = new StandaloneInMemProcessEngineConfiguration().addConfigurator(configurator).setBeans(beans).setDatabaseSchemaUpdate("create-drop").setEnableProcessDefinitionInfoCache(true).buildProcessEngine();
this.runtimeService = processEngine.getRuntimeService();
this.repositoryService = processEngine.getRepositoryService();
this.taskService = processEngine.getTaskService();
this.historyService = processEngine.getHistoryService();
this.dynamicBpmnService = processEngine.getDynamicBpmnService();
}
Aggregations