Search in sources :

Example 1 with ActivityLifeCycleEventsType

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

the class InstanceManagementServiceSkeleton method getActivityLifeCycleEvents.

private ActivityLifeCycleEventsType getActivityLifeCycleEvents(final long iid) throws InstanceManagementException {
    final ActivityLifeCycleEventsType activityLifeCycleEvents = new ActivityLifeCycleEventsType();
    activityLifeCycleEvents.setIid(Long.toString(iid));
    dbexec(new BpelDatabase.Callable<Object>() {

        public Object run(BpelDAOConnection conn) throws InstanceManagementException {
            ProcessInstanceDAO instance = conn.getInstanceEagerly(iid, true);
            if (instance == null) {
                String errMsg = "Instance " + iid + " not found.";
                log.error(errMsg);
                throw new InstanceManagementException(errMsg);
            }
            fillActivityLifeCycleEvents(activityLifeCycleEvents, instance);
            return null;
        }
    });
    return activityLifeCycleEvents;
}
Also used : InstanceManagementException(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException) ProcessInstanceDAO(org.apache.ode.bpel.dao.ProcessInstanceDAO) BpelDatabase(org.apache.ode.bpel.engine.BpelDatabase) BpelDAOConnection(org.apache.ode.bpel.dao.BpelDAOConnection) ActivityLifeCycleEventsType(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ActivityLifeCycleEventsType)

Aggregations

BpelDAOConnection (org.apache.ode.bpel.dao.BpelDAOConnection)1 ProcessInstanceDAO (org.apache.ode.bpel.dao.ProcessInstanceDAO)1 BpelDatabase (org.apache.ode.bpel.engine.BpelDatabase)1 InstanceManagementException (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException)1 ActivityLifeCycleEventsType (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.ActivityLifeCycleEventsType)1