use of org.apache.ode.bpel.dao.ScopeDAO in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method fillScopeInfo.
private void fillScopeInfo(ScopeInfoType scopeInfo, ScopeDAO scope) {
scopeInfo.setSiid(scope.getScopeInstanceId().toString());
scopeInfo.setName(scope.getName());
scopeInfo.setStatus(odeScopeStatusToManagementAPIStatus(scope.getState()));
Children_type0 childScopes = new Children_type0();
if (scope.isChildrenExist()) {
}
for (ScopeDAO childScope : scope.getChildScopes()) {
ScopeInfoType childScopeInfo = new ScopeInfoType();
fillScopeInfo(childScopeInfo, childScope);
childScopes.addChildRef(childScopeInfo);
}
scopeInfo.setChildren(childScopes);
scopeInfo.setVariables(getVariables(scope));
if (!scope.getCorrelationDTOs().isEmpty()) {
scopeInfo.setCorrelationSets(getCorrelationPropertires(scope));
}
scopeInfo.setActivities(getActivities(scope));
}
use of org.apache.ode.bpel.dao.ScopeDAO 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);
}
}
use of org.apache.ode.bpel.dao.ScopeDAO in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method fillScopeInfoWithEvents.
private void fillScopeInfoWithEvents(ScopeInfoWithEventsType scopeInfoWithEvents, ScopeDAO scope) {
scopeInfoWithEvents.setSiid(scope.getScopeInstanceId().toString());
scopeInfoWithEvents.setName(scope.getName());
scopeInfoWithEvents.setStatus(odeScopeStatusToManagementAPIStatus(scope.getState()));
ChildrenWithEvents_type0 childScopesWithEvents = new ChildrenWithEvents_type0();
for (ScopeDAO childScope : scope.getChildScopes()) {
ScopeInfoWithEventsType childScopeInfoWithEvents = new ScopeInfoWithEventsType();
fillScopeInfoWithEvents(childScopeInfoWithEvents, childScope);
childScopesWithEvents.addChildWithEventsRef(childScopeInfoWithEvents);
}
scopeInfoWithEvents.setChildrenWithEvents(childScopesWithEvents);
// scopeInfoWithEvents.setVariablesWithEvents(getVariablesWithEvents(scope)); //TODO:
// TODO: Just need to change the schema s.t. avoid CorrelationSets_type1 and remove the comment
// if (!scope.getCorrelationSets().isEmpty()) {
// // scopeInfoWithEvents.setCorrelationSets(getCorrelationPropertires(scope));
// }
scopeInfoWithEvents.setActivitiesWithEvents(getActivitiesWithEvents(scope));
}
Aggregations