use of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.InstanceInfoWithEventsType in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method fillFaultAndFailure.
/**
* Use fillFaultAndFailure(ProcessInstanceDAO, InstanceInfoType) to fill the
* instanceInfoWithEvents
*
* @param instance Process Instance DAO
* @param instanceInfoWithEvents Instance info with events
*/
private void fillFaultAndFailure(ProcessInstanceDAO instance, InstanceInfoWithEventsType instanceInfoWithEvents) {
InstanceInfoType instanceInfo = new InstanceInfoType();
fillFaultAndFailure(instance, instanceInfo);
if (instance.getFault() != null) {
instanceInfoWithEvents.setFaultInfo(instanceInfo.getFaultInfo());
}
if (instance.getActivityFailureCount() > 0) {
instanceInfoWithEvents.setFailuresInfo(instanceInfo.getFailuresInfo());
}
}
use of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.types.InstanceInfoWithEventsType in project carbon-business-process by wso2.
the class InstanceManagementServiceSkeleton method getInstanceInformationWithEvents.
private InstanceInfoWithEventsType getInstanceInformationWithEvents(final long iid) throws InstanceManagementException {
final InstanceInfoWithEventsType instanceInfoWithEvents = new InstanceInfoWithEventsType();
instanceInfoWithEvents.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);
}
fillInstanceInfoWithEvents(instanceInfoWithEvents, instance);
return null;
}
});
return instanceInfoWithEvents;
}
Aggregations