Examples of InstanceManagementException


Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

        try {
            isOperationIsValidForTheCurrentTenant(iid);
        } catch (IllegalAccessException ex) {
            String errMsg = "You are trying to carry out unauthorized operation!";
            log.error(errMsg);
            throw new InstanceManagementException(errMsg, ex);
        }

        DebuggerSupport debugSupport = getDebugger(iid);
        if (debugSupport == null) {
            log.error("Cannot suspend the instance " + iid + ", Debugger support not available");
            throw new InstanceManagementException("Cannot suspend the instance " + iid +
                    ", Debugger support not available");
        }
        debugSupport.suspend(iid);
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

        try {
        isOperationIsValidForTheCurrentTenant(iid);
        } catch (IllegalAccessException ex) {
            String errMsg = "You are trying to carry out unauthorized operation!";
            log.error(errMsg);
            throw new InstanceManagementException(errMsg, ex);
        }
        DebuggerSupport debugSupport = getDebugger(iid);
        if (debugSupport == null) {
            log.error("Cannot terminate the instance " + iid + ", Debugger support not available");
            throw new InstanceManagementException("Cannot terminate the instance " + iid +
                    ", Debugger support not available");
        }
        debugSupport.terminate(iid);
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

                getMultiTenantProcessStore().getTenantsProcessStore(tenantId);

        if (isInvalidFilter(filter)) {
            String errMsg = "Invalid instance filter: " +filter;
            log.error(errMsg);
            throw new InstanceManagementException(errMsg);
        }

        if(!isSecureFilter(new InstanceFilter(filter), tenantProcessStore.getProcesses().keySet())){
            String errMsg = "Instance deletion operation not permitted due to insecure filter: " +
                    filter;
            log.error(errMsg);
             throw new InstanceManagementException(errMsg);
        }

        if (filter.indexOf(" pid=") == -1) {
            filter = filter + getTenantsProcessList(tenantProcessStore.getProcesses().keySet());
        }

        final InstanceFilter instanceFilter = new InstanceFilter(filter);

        final List<Long> ret = new LinkedList<Long>();
        try {
            dbexec(new BpelDatabase.Callable<Object>() {
                public Object run(BpelDAOConnection conn) throws IllegalAccessException {
                    Collection<ProcessInstanceDAO> instances = conn.instanceQuery(instanceFilter);

                    // Doing this to avoid any half done operation.
                    // For example if filter returns set of instance which are not owned by this tenant we should
                    // not delete other instances also.
                    for (ProcessInstanceDAO instance : instances) {
                        isOperationIsValidForTheCurrentTenant(instance.getProcess().getProcessId());
                    }

                    for (ProcessInstanceDAO instance : instances) {
                        instance.delete(EnumSet.allOf(ProcessConf.CLEANUP_CATEGORY.class),
                                        deleteMessageExchanges);
                        ret.add(instance.getInstanceId());
                    }
                    return null;
                }
            });
        } catch (Exception e) {
            String errMsg = "Exception during instance deletion. Filter: " +
                    instanceFilter.toString();
            log.error(errMsg, e);
            throw new InstanceManagementException(errMsg, e);
        }

        return ret.size();
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

                }
            });
        } catch (Exception e) {
            String errMsg = "Exception during instance " + iid + " retrieval";
            log.error(errMsg, e);
            throw new InstanceManagementException(errMsg, e);
        }

        return getDebugger(processId);
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null) {
                    String errMsg = "Instance " + iid + " not found.";
                    log.error(errMsg);
                    throw new InstanceManagementException(errMsg);
                }

                fillInstanceInfo(instanceInfo, instance);
                return null;
            }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

                ProcessInstanceDAO instance = conn.getInstance(iid);

                if (instance == null) {
                    String errMsg = "Instance " + iid + " not found.";
                    log.error(errMsg);
                    throw new InstanceManagementException(errMsg);
                }

                fillInstanceInfoWithEvents(instanceInfoWithEvents, instance);
                return null;
            }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

            BpelDatabase bpelDb = bpelServer.getODEBPELServer().getBpelDb();
            return bpelDb.exec(callable);
        } catch (Exception ex) {
            String errMsg = "Exception during database operation";
            log.error(errMsg, ex);
            throw new InstanceManagementException(errMsg, ex);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

                return InstanceStatus.TERMINATED;
        }

        String errMsg = "Encountered unexpected instance state: " + status;
        log.error(errMsg);
        throw new InstanceManagementException(errMsg);
    }
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

            public Object run(BpelDAOConnection conn) throws InstanceManagementException {
                ScopeDAO scope = conn.getScope(siid);
                if (scope == null) {
                    String errMsg = "Scope " + siid + " not found.";
                    log.error(errMsg);
                    throw new InstanceManagementException(errMsg);
                }
                fillScopeInfo(scopeInfo, scope);
                return null;
            }
        });
View Full Code Here

Examples of org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException

            public Object run(BpelDAOConnection conn) throws InstanceManagementException {
                ScopeDAO scope = conn.getScope(siid);
                if (scope == null) {
                    String errMsg = "Scope " + siid + " not found.";
                    log.error(errMsg);
                    throw new InstanceManagementException(errMsg);
                }
                fillScopeInfoWithEvents(scopeInfoWithEvents, scope);
                return null;
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.