Java Code Examples for org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setCustomPreBPMNParseListeners()

The following examples show how to use org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#setCustomPreBPMNParseListeners() . 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: ConnectProcessEnginePlugin.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
private void addConnectorParseListener(ProcessEngineConfigurationImpl processEngineConfiguration) {
  List<BpmnParseListener> preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
  if(preParseListeners == null) {
    preParseListeners = new ArrayList<BpmnParseListener>();
    processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
  }
  preParseListeners.add(new ConnectorParseListener());
}
 
Example 2
Source File: ProcessApplicationEventListenerPlugin.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
  List<BpmnParseListener> preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
  if(preParseListeners == null) {
    preParseListeners = new ArrayList<BpmnParseListener>();
    processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
  }
  preParseListeners.add(new ProcessApplicationEventParseListener());
}
 
Example 3
Source File: JobDefinitionCreationBothAsyncWithParseListenerTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) {
  List<BpmnParseListener> listeners = new ArrayList<>();
  listeners.add(new AbstractBpmnParseListener(){

    @Override
    public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
      activity.setAsyncBefore(true);
      activity.setAsyncAfter(true);
    }
  });

  configuration.setCustomPreBPMNParseListeners(listeners);
  return configuration;
}
 
Example 4
Source File: JobDefinitionCreationWithParseListenerTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) {
  List<BpmnParseListener> listeners = new ArrayList<>();
  listeners.add(new AbstractBpmnParseListener(){

    @Override
    public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
      activity.setAsyncBefore(true);
    }
  });

  configuration.setCustomPreBPMNParseListeners(listeners);
  return configuration;
}
 
Example 5
Source File: JobDefinitionCreationAndDeletionWithParseListenerTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) {
  List<BpmnParseListener> listeners = new ArrayList<>();
  listeners.add(new AbstractBpmnParseListener(){

    @Override
    public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
      activity.setAsyncBefore(false);
      activity.setAsyncAfter(true);
    }
  });

  configuration.setCustomPreBPMNParseListeners(listeners);
  return configuration;
}
 
Example 6
Source File: JobDefinitionDeletionWithParseListenerTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessEngineConfiguration configureEngine(ProcessEngineConfigurationImpl configuration) {
  List<BpmnParseListener> listeners = new ArrayList<>();
  listeners.add(new AbstractBpmnParseListener(){

    @Override
    public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
      activity.setAsyncBefore(false);
    }
  });

  configuration.setCustomPreBPMNParseListeners(listeners);
  return configuration;
}
 
Example 7
Source File: ReactorProcessEnginePlugin.java    From camunda-bpm-reactor with Apache License 2.0 4 votes vote down vote up
private static List<BpmnParseListener> customPreBPMNParseListeners(final ProcessEngineConfigurationImpl processEngineConfiguration) {
  if (processEngineConfiguration.getCustomPreBPMNParseListeners() == null) {
    processEngineConfiguration.setCustomPreBPMNParseListeners(new ArrayList<>());
  }
  return processEngineConfiguration.getCustomPreBPMNParseListeners();
}