private OActivity compileActivity(final boolean doLinks, final Activity source) { final ActivityGenerator actgen = findActivityGen(source); final OActivity oact = actgen.newInstance(source); oact.name = createName(source, "activity"); oact.debugInfo = createDebugInfo(source, "Activity body for " + source); _compiledActivities.add(oact); compile(oact, source, new Runnable() { public void run() { if (doLinks) compileLinks(source); actgen.compile(oact, source); } }); return oact; }
oalarm.activity = compile(onAlarm.getActivity());
public void run() { if (process.getRootActivity() == null) { throw new CompilationException(__cmsgs.errNoRootActivity()); } // Process custom properties are created as variables associated // with the top scope if (_customProcessProperties != null) { for (Map.Entry<QName, Node> customVar : _customProcessProperties.entrySet()) { final OScope oscope = _structureStack.topScope(); OVarType varType = new OConstantVarType(_oprocess, customVar.getValue()); OScope.Variable ovar = new OScope.Variable(_oprocess, varType); ovar.name = customVar.getKey().getLocalPart(); ovar.declaringScope = oscope; ovar.debugInfo = createDebugInfo(null, "Process custom property variable"); oscope.addLocalVariable(ovar); if (__log.isDebugEnabled()) __log.debug("Compiled custom property variable " + ovar); } } _structureStack.topScope().activity = compile(process.getRootActivity()); } });
private void compile(TerminationHandler terminationHandler) { OScope oscope = _structureStack.topScope(); oscope.terminationHandler = new OTerminationHandler(_oprocess, oscope); oscope.terminationHandler.name = "__terminationHandler:" + oscope.name; oscope.terminationHandler.debugInfo = createDebugInfo(terminationHandler, null); if (terminationHandler == null) { oscope.terminationHandler.activity = createDefaultCompensateActivity(null, "Auto-generated 'compensate all' pseudo-activity for default termination handler on " + oscope.toString()); } else { _recoveryContextStack.push(oscope); try { oscope.terminationHandler.activity = compile(terminationHandler.getActivity()); } finally { _recoveryContextStack.pop(); } } }
private void compile(CompensationHandler compensationHandler) { OScope oscope = _structureStack.topScope(); oscope.compensationHandler = new OCompensationHandler(_oprocess, oscope); oscope.compensationHandler.name = "__compenationHandler_" + oscope.name; oscope.compensationHandler.debugInfo = createDebugInfo(compensationHandler, null); if (compensationHandler == null) { oscope.compensationHandler.activity = createDefaultCompensateActivity(compensationHandler, "Auto-generated 'compensate all' pseudo-activity for default compensation handler on " + oscope.toString()); } else { _recoveryContextStack.push(oscope); try { oscope.compensationHandler.activity = compile(compensationHandler.getActivity()); } finally { _recoveryContextStack.pop(); } } }
public void run() { compileLinks(source); for (OScope.Variable v : variables) { v.declaringScope = implicitScope; implicitScope.addLocalVariable(v); } if (source instanceof ScopeActivity) { Activity scopeChild = ((ScopeActivity) source).getChildActivity(); if (scopeChild == null) throw new CompilationException(__cmsgs.errEmptyScope().setSource(source)); implicitScope.activity = compile(scopeChild); } else { implicitScope.activity = compileActivity(false, source); } } });
compile(oscope, src, new Runnable() { public void run() { for (Variable var : src.getVariables()) {
ctch.name = "__catch#" + i + ":" + _structureStack.topScope().name; ctch.faultName = catchSrc.getFaultName(); compile(ctch, catchSrc, new Runnable() { public void run() {
oprocess = compiler.compile(process,wf,version);
oevent.name = "__eventHandler:"; oevent.debugInfo = createDebugInfo(onEvent, null); compile(oevent, onEvent, new Runnable() { public void run() { switch (_processDef.getBpelVersion()) {
oevent.activity = compile(onEvent.getActivity());
_structureStack.topScope().activity = compile(catchSrc.getActivity());