Search in sources :

Example 1 with SecureJavascriptTaskParseHandler

use of org.activiti.scripting.secure.behavior.SecureJavascriptTaskParseHandler in project Activiti by Activiti.

the class SecureJavascriptConfigurator method beforeInit.

@Override
public void beforeInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
    // Initialize the Rhino context factory (needs to be done once)
    if (secureScriptContextFactory == null) {
        initSecureScriptContextFactory();
    }
    // Init parse handler that will set the secure javascript task to the activity
    List<BpmnParseHandler> customDefaultBpmnParseHandlers = processEngineConfiguration.getCustomDefaultBpmnParseHandlers();
    if (customDefaultBpmnParseHandlers == null) {
        customDefaultBpmnParseHandlers = new ArrayList<BpmnParseHandler>();
        processEngineConfiguration.setCustomDefaultBpmnParseHandlers(customDefaultBpmnParseHandlers);
    }
    customDefaultBpmnParseHandlers.add(new SecureJavascriptTaskParseHandler());
}
Also used : BpmnParseHandler(org.activiti.engine.parse.BpmnParseHandler) SecureJavascriptTaskParseHandler(org.activiti.scripting.secure.behavior.SecureJavascriptTaskParseHandler)

Aggregations

BpmnParseHandler (org.activiti.engine.parse.BpmnParseHandler)1 SecureJavascriptTaskParseHandler (org.activiti.scripting.secure.behavior.SecureJavascriptTaskParseHandler)1