Search in sources :

Example 1 with BPMNDataPublisher

use of org.wso2.carbon.bpmn.analytics.publisher.BPMNDataPublisher in project carbon-business-process by wso2.

the class BPMNAnalyticsServiceComponent method activate.

/**
 * Activate BPMN analytics component.
 *
 * @param ctxt ComponentContext
 */
protected void activate(ComponentContext ctxt) {
    try {
        BPMNAnalyticsHolder bpmnAnalyticsHolder = BPMNAnalyticsHolder.getInstance();
        initAnalyticsServer(bpmnAnalyticsHolder);
        BPSAnalyticsService bpsAnalyticsService = new BPSAnalyticsService();
        bpsAnalyticsService.setBPSAnalyticsServer(bpmnAnalyticsHolder.getBPSAnalyticsServer());
        // Register BPS analytics Service OSGI Service
        ctxt.getBundleContext().registerService(BPSAnalyticsService.class.getName(), bpsAnalyticsService, null);
        BPMNDataPublisher BPMNDataPublisher = new BPMNDataPublisher();
        BPMNAnalyticsHolder.getInstance().setBpmnDataPublisher(BPMNDataPublisher);
        BPMNDataPublisher.configure();
        log.info("Initializing the BPMN Analytics Service component...");
    } catch (Throwable e) {
        log.error("Failed to initialize the BPMN Analytics Service component.", e);
    }
}
Also used : BPSAnalyticsService(org.wso2.carbon.bpmn.analytics.publisher.BPSAnalyticsService) BPMNDataPublisher(org.wso2.carbon.bpmn.analytics.publisher.BPMNDataPublisher)

Aggregations

BPMNDataPublisher (org.wso2.carbon.bpmn.analytics.publisher.BPMNDataPublisher)1 BPSAnalyticsService (org.wso2.carbon.bpmn.analytics.publisher.BPSAnalyticsService)1