private Node generateReThrow(final Scope scope, final ReThrow rethrow, final BPELProcess bpelprocess) throws CoreException { this.log.finest("start generate rethrow"); final ReThrowBehaviour reThrowBehaviour = new ReThrowBehaviourImpl(); final Node rethrowNode = scope.createNode(rethrow.getName(), reThrowBehaviour); this.log.finest("end generate rethrow"); return rethrowNode; }
@Override protected void executeOnInactive() throws CoreException { this.log.finest("start rethrow behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; // find exception Exception e = null; Scope currentScope = this.getNode().getExecution().getParentScope(); while(e==null && currentScope != null) { e = currentScope.isFaultScope(); currentScope = currentScope.getParentScope(); } if(e == null) { throw new CoreException("Impossible to find exception to rethrow"); } this.log.finest("execute rethrow behaviour: " + e.getClass()); if(!(e instanceof CoreException)) { throw new CoreException(e); } else { throw (CoreException)e; } }
@Override protected void executeOnInactive() throws CoreException { this.log.finest("start rethrow behaviour on node: " + this.node.getName()); this.state = State.ACTIVITY_STARTED; // find exception Exception e = null; Scope currentScope = this.getNode().getExecution().getParentScope(); while(e==null && currentScope != null) { e = currentScope.isFaultScope(); currentScope = currentScope.getParentScope(); } if(e == null) { throw new CoreException("Impossible to find exception to rethrow"); } this.log.finest("execute rethrow behaviour: " + e.getClass()); if(!(e instanceof CoreException)) { throw new CoreException(e); } else { throw (CoreException)e; } }