org.activiti.engine.parse.BpmnParseHandler Java Examples
The following examples show how to use
org.activiti.engine.parse.BpmnParseHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SecureJavascriptConfigurator.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
@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()); }
Example #2
Source File: BpmnParseHandlers.java From flowable-engine with Apache License 2.0 | 6 votes |
public void parseElement(BpmnParse bpmnParse, BaseElement element) { if (element instanceof DataObject) { // ignore DataObject elements because they are processed on Process and Sub process level return; } if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse handler for + {} this is likely a bug.", element.getId()); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
Example #3
Source File: BpmnParseHandlers.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
public void parseElement(BpmnParse bpmnParse, BaseElement element) { if (element instanceof DataObject) { // ignore DataObject elements because they are processed on Process // and Sub process level return; } if (element instanceof FlowElement) { bpmnParse.setCurrentFlowElement((FlowElement) element); } // Execute parse handlers List<BpmnParseHandler> handlers = parseHandlers.get(element.getClass()); if (handlers == null) { LOGGER.warn("Could not find matching parse handler for + " + element.getId() + " this is likely a bug."); } else { for (BpmnParseHandler handler : handlers) { handler.parse(bpmnParse, element); } } }
Example #4
Source File: BpmnParseHandlers.java From flowable-engine with Apache License 2.0 | 5 votes |
public void addHandler(BpmnParseHandler bpmnParseHandler) { for (Class<? extends BaseElement> type : bpmnParseHandler.getHandledTypes()) { List<BpmnParseHandler> handlers = parseHandlers.get(type); if (handlers == null) { handlers = new ArrayList<>(); parseHandlers.put(type, handlers); } handlers.add(bpmnParseHandler); } }
Example #5
Source File: BpmnParseHandlers.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
public void addHandler(BpmnParseHandler bpmnParseHandler) { for (Class<? extends BaseElement> type : bpmnParseHandler.getHandledTypes()) { List<BpmnParseHandler> handlers = parseHandlers.get(type); if (handlers == null) { handlers = new ArrayList<BpmnParseHandler>(); parseHandlers.put(type, handlers); } handlers.add(bpmnParseHandler); } }
Example #6
Source File: ReplayRunTest.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
private ProcessEngineConfigurationImpl getProcessEngineConfiguration() { ProcessEngineConfigurationImpl configuration = new org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration(); configuration. setHistory("full"). setDatabaseSchemaUpdate("drop-create"); configuration.setCustomDefaultBpmnParseHandlers( Arrays.<BpmnParseHandler>asList( new AddListenerUserTaskParseHandler(TaskListener.EVENTNAME_CREATE, new UserTaskExecutionListener(USER_TASK_COMPLETED_EVENT_TYPE, USER_TASK_COMPLETED_EVENT_TYPE, listener.getSimulationEvents())) )); configuration.setEventListeners(Arrays.<ActivitiEventListener>asList(listener)); return configuration; }
Example #7
Source File: DefaultProcessEngineFactory.java From flowable-engine with Apache License 2.0 | 5 votes |
protected List<BpmnParseHandler> convert(List<Object> activiti5BpmnParseHandlers) { if (activiti5BpmnParseHandlers == null) { return null; } List<BpmnParseHandler> parseHandlers = new ArrayList<>(activiti5BpmnParseHandlers.size()); for (Object activiti6BpmnParseHandler : activiti5BpmnParseHandlers) { parseHandlers.add((BpmnParseHandler) activiti6BpmnParseHandler); } return parseHandlers; }
Example #8
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 5 votes |
protected List<BpmnParseHandler> getDefaultHistoryParseHandlers() { List<BpmnParseHandler> parseHandlers = new ArrayList<>(); parseHandlers.add(new FlowNodeHistoryParseHandler()); parseHandlers.add(new ProcessHistoryParseHandler()); parseHandlers.add(new StartEventHistoryParseHandler()); parseHandlers.add(new UserTaskHistoryParseHandler()); return parseHandlers; }
Example #9
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setPreBpmnParseHandlers(List<BpmnParseHandler> preBpmnParseHandlers) { this.preBpmnParseHandlers = preBpmnParseHandlers; return this; }
Example #10
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setCustomDefaultBpmnParseHandlers(List<BpmnParseHandler> customDefaultBpmnParseHandlers) { this.customDefaultBpmnParseHandlers = customDefaultBpmnParseHandlers; return this; }
Example #11
Source File: BpmnParseHandlers.java From flowable-engine with Apache License 2.0 | 4 votes |
public void addHandlers(List<BpmnParseHandler> bpmnParseHandlers) { for (BpmnParseHandler bpmnParseHandler : bpmnParseHandlers) { addHandler(bpmnParseHandler); } }
Example #12
Source File: BpmnParseHandlers.java From flowable-engine with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getHandlersFor(Class<? extends BaseElement> clazz) { return parseHandlers.get(clazz); }
Example #13
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setPostBpmnParseHandlers(List<BpmnParseHandler> postBpmnParseHandlers) { this.postBpmnParseHandlers = postBpmnParseHandlers; return this; }
Example #14
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getPostBpmnParseHandlers() { return postBpmnParseHandlers; }
Example #15
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setCustomDefaultBpmnParseHandlers(List<BpmnParseHandler> customDefaultBpmnParseHandlers) { this.customDefaultBpmnParseHandlers = customDefaultBpmnParseHandlers; return this; }
Example #16
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getCustomDefaultBpmnParseHandlers() { return customDefaultBpmnParseHandlers; }
Example #17
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setPreBpmnParseHandlers(List<BpmnParseHandler> preBpmnParseHandlers) { this.preBpmnParseHandlers = preBpmnParseHandlers; return this; }
Example #18
Source File: ProcessEngineConfigurationImpl.java From flowable-engine with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getPreBpmnParseHandlers() { return preBpmnParseHandlers; }
Example #19
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getPreBpmnParseHandlers() { return preBpmnParseHandlers; }
Example #20
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getCustomDefaultBpmnParseHandlers() { return customDefaultBpmnParseHandlers; }
Example #21
Source File: BpmnParseHandlers.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public void addHandlers(List<BpmnParseHandler> bpmnParseHandlers) { for (BpmnParseHandler bpmnParseHandler : bpmnParseHandlers) { addHandler(bpmnParseHandler); } }
Example #22
Source File: BpmnParseHandlers.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getHandlersFor(Class<? extends BaseElement> clazz) { return parseHandlers.get(clazz); }
Example #23
Source File: BpmnParseHandlers.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public BpmnParseHandlers() { this.parseHandlers = new HashMap<Class<? extends BaseElement>, List<BpmnParseHandler>>(); }
Example #24
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public ProcessEngineConfigurationImpl setPostBpmnParseHandlers(List<BpmnParseHandler> postBpmnParseHandlers) { this.postBpmnParseHandlers = postBpmnParseHandlers; return this; }
Example #25
Source File: ProcessEngineConfigurationImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<BpmnParseHandler> getPostBpmnParseHandlers() { return postBpmnParseHandlers; }