Search in sources :

Example 1 with DebuggerSupport

use of org.apache.ode.bpel.engine.DebuggerSupport in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method resumeInstance.

/**
 * Resume a suspended instance
 *
 * @param iid Instance Id
 * @throws InstanceManagementException If the instance cannot be resumed due to the
 *                                     unavailability of Debugger support
 */
public void resumeInstance(long iid) throws InstanceManagementException {
    try {
        isOperationIsValidForTheCurrentTenant(iid);
    } catch (IllegalAccessException ex) {
        handleError(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) {
        String errMsg = "Cannot resume the instance " + iid + ", Debugger support not available";
        log.error(errMsg);
        throw new InstanceManagementException(errMsg);
    }
    debugSupport.resume(iid);
}
Also used : InstanceManagementException(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException) DebuggerSupport(org.apache.ode.bpel.engine.DebuggerSupport)

Example 2 with DebuggerSupport

use of org.apache.ode.bpel.engine.DebuggerSupport in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method suspendInstance.

/**
 * Suspend an instance
 *
 * @param iid Instance Id
 * @throws InstanceManagementException If the instance cannot be suspended due to the
 *                                     unavailability of Debugger support
 */
public void suspendInstance(long iid) throws InstanceManagementException {
    try {
        isOperationIsValidForTheCurrentTenant(iid);
    } catch (IllegalAccessException ex) {
        handleError(ex);
    }
    DebuggerSupport debugSupport = getDebugger(iid);
    if (debugSupport == null) {
        String errMsg = "Cannot suspend the instance " + iid + ", Debugger support not available";
        log.error(errMsg);
        throw new InstanceManagementException(errMsg);
    }
    debugSupport.suspend(iid);
}
Also used : InstanceManagementException(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException) DebuggerSupport(org.apache.ode.bpel.engine.DebuggerSupport)

Example 3 with DebuggerSupport

use of org.apache.ode.bpel.engine.DebuggerSupport in project carbon-business-process by wso2.

the class InstanceManagementServiceSkeleton method terminateInstance.

/**
 * Terminate an instance
 *
 * @param iid Instance Id
 * @throws InstanceManagementException If the instance cannot be terminated due to the
 *                                     unavailability of Debugger support
 */
public void terminateInstance(long iid) throws InstanceManagementException {
    try {
        isOperationIsValidForTheCurrentTenant(iid);
    } catch (IllegalAccessException ex) {
        handleError(ex);
    }
    DebuggerSupport debugSupport = getDebugger(iid);
    if (debugSupport == null) {
        String erMsg = "Cannot terminate the instance " + iid + ", Debugger support not available";
        log.error(erMsg);
        throw new InstanceManagementException(erMsg);
    }
    debugSupport.terminate(iid);
}
Also used : InstanceManagementException(org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException) DebuggerSupport(org.apache.ode.bpel.engine.DebuggerSupport)

Aggregations

DebuggerSupport (org.apache.ode.bpel.engine.DebuggerSupport)3 InstanceManagementException (org.wso2.carbon.bpel.skeleton.ode.integration.mgt.services.InstanceManagementException)3