Search in sources :

Example 1 with ActivityLifeCycleEventsDocumentBuilder

use of org.wso2.carbon.bpel.core.ode.integration.utils.ActivityLifeCycleEventsDocumentBuilder in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method fillActivityLifeCycleEventsFromScope.

private void fillActivityLifeCycleEventsFromScope(ActivityLifeCycleEventsListType activityLifeCycleEventsList, ScopeDAO scope) {
    // List<BpelEvent> events = scope.listEvents();
    Set<EventDAOImpl> eventsEntities = ((ScopeDAOImpl) scope).getEvents();
    List<BpelEvent> events = new ArrayList<BpelEvent>();
    for (EventDAOImpl event : eventsEntities) {
        events.add(event.getEvent());
    }
    ActivityLifeCycleEventsDocumentBuilder docBuilder = new ActivityLifeCycleEventsDocumentBuilder();
    for (BpelEvent e : events) {
        docBuilder.onEvent(e);
    }
    EventInfoListDocument infoList = docBuilder.getActivityLifeCycleEvents();
    fillActivityLifeCycleEventsList(activityLifeCycleEventsList, infoList);
    for (ScopeDAO childScope : scope.getChildScopes()) {
        fillActivityLifeCycleEventsFromScope(activityLifeCycleEventsList, childScope);
    }
}
Also used : EventInfoListDocument(org.apache.ode.bpel.pmapi.EventInfoListDocument) ScopeDAO(org.apache.ode.bpel.dao.ScopeDAO) ActivityLifeCycleEventsDocumentBuilder(org.wso2.carbon.bpel.core.ode.integration.utils.ActivityLifeCycleEventsDocumentBuilder) ArrayList(java.util.ArrayList) ScopeDAOImpl(org.apache.ode.dao.jpa.ScopeDAOImpl) BpelEvent(org.apache.ode.bpel.evt.BpelEvent) EventDAOImpl(org.apache.ode.dao.jpa.EventDAOImpl)

Aggregations

ArrayList (java.util.ArrayList)1 ScopeDAO (org.apache.ode.bpel.dao.ScopeDAO)1 BpelEvent (org.apache.ode.bpel.evt.BpelEvent)1 EventInfoListDocument (org.apache.ode.bpel.pmapi.EventInfoListDocument)1 EventDAOImpl (org.apache.ode.dao.jpa.EventDAOImpl)1 ScopeDAOImpl (org.apache.ode.dao.jpa.ScopeDAOImpl)1 ActivityLifeCycleEventsDocumentBuilder (org.wso2.carbon.bpel.core.ode.integration.utils.ActivityLifeCycleEventsDocumentBuilder)1