Package org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services

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


            });
        } catch (Exception e) {
            String errMsg = "Exception occurred while recovering the activity: " + aid +
                    " of ths instance: " + iid + " action: " + action.getValue();
            log.error(errMsg, e);
            throw new InstanceManagementException(errMsg, e);
        }
    }
View Full Code Here


            public Object run(BpelDAOConnection conn) throws InstanceManagementException {
                ProcessInstanceDAO instance = conn.getInstance(iid);

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

                fillActivityLifeCycleEvents(activityLifeCycleEvents, instance);
                return null;
            }
View Full Code Here

            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);
                }
                fillActivityLifeCycleEventsFromScope(activityLifeCycleEventsList, scope);
                return null;
            }
        });
View Full Code Here

        try {
            isOperationIsValidForTheCurrentTenant(iid);
        } catch (IllegalAccessException ex) {
            String errMsg = "You are trying to carry out unauthorized operation!";
            log.error(errMsg);
            throw new InstanceManagementException(errMsg, ex);
        }
        /*
        We need debugger support in order to resume (since we have to force
        a reduction. If one is not available the getDebugger() method should
        throw a ProcessingException
        */
        DebuggerSupport debugSupport = getDebugger(iid);
        if (debugSupport == null) {
            log.error("Cannot resume the instance " + iid + ", Debugger support not available");
            throw new InstanceManagementException("Cannot resume the instance " + iid +
                    ", Debugger " + "support not available");
        }
        debugSupport.resume(iid);
    }
View Full Code Here

        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

        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

                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

                }
            });
        } 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

                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

                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

TOP

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

Copyright © 2018 www.massapicom. 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.