Search in sources :

Example 1 with ScopeInfoWithEventsType

use of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ScopeInfoWithEventsType in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method getScopeInfoWithEvents.

private ScopeInfoWithEventsType getScopeInfoWithEvents(ScopeDAO scope) throws InstanceManagementException {
    final ScopeInfoWithEventsType scopeInfoWithEvents = new ScopeInfoWithEventsType();
    /*dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection conn) throws InstanceManagementException {
                ScopeDAO scope = conn.getScopeEagerly(siid);
                if (scope == null) {
                    String errMsg = "Scope " + siid + " not found.";
                    log.error(errMsg);
                    throw new InstanceManagementException(errMsg);
                }
                fillScopeInfoWithEvents(scopeInfoWithEvents, scope);
                return null;
            }
        });*/
    fillScopeInfoWithEvents(scopeInfoWithEvents, scope);
    return scopeInfoWithEvents;
}
Also used : ScopeInfoWithEventsType(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ScopeInfoWithEventsType)

Example 2 with ScopeInfoWithEventsType

use of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ScopeInfoWithEventsType 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));
}
Also used : ScopeInfoWithEventsType(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ScopeInfoWithEventsType) ChildrenWithEvents_type0(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ChildrenWithEvents_type0) ScopeDAO(org.apache.ode.bpel.dao.ScopeDAO)

Aggregations

ScopeInfoWithEventsType (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ScopeInfoWithEventsType)2 ScopeDAO (org.apache.ode.bpel.dao.ScopeDAO)1 ChildrenWithEvents_type0 (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ChildrenWithEvents_type0)1