public void compile(OActivity output, Activity srcx) { ORepeatUntil oru = (ORepeatUntil) output; RepeatUntilActivity src = (RepeatUntilActivity)srcx; oru.untilCondition = _context.compileExpr(src.getCondition()); oru.activity = _context.compile(src.getActivity()); } }
public void compile(OActivity output, Activity srcx) { OWhile owhile = (OWhile) output; WhileActivity src = (WhileActivity)srcx; owhile.whileCondition = _context.compileExpr(src.getCondition()); owhile.activity = _context.compile(src.getActivity()); } }
public void compile(OActivity output, Activity src) { WaitActivity waitDef = (WaitActivity)src; OWait owait = (OWait)output; if (waitDef.getFor() != null && waitDef.getUntil() == null) { owait.forExpression = _context.compileExpr(waitDef.getFor()); } else if (waitDef.getFor() == null && waitDef.getUntil() != null) { owait.untilExpression = _context.compileExpr(waitDef.getUntil()); } else { throw new CompilationException(_msgs.errWaitMustDefineForOrUntilDuration().setSource(waitDef)); } } }
/** * Compile a <code>bpws:getVariableData(...)</em> function call. Note that all arguments * to this call <em>must</em> be literal values. Therefore, we are able to "pre-compile" * all possible invocations of this call, and save ourselves the problem of compiling * query expressions at runtime. * @param c {@link FunctionCallExpr} for this invocation * @throws CompilationException */ private void compileGetVariableData(FunctionCallExpr c) throws CompilationException { List params = c.getParameters(); if (params.size() < 1 || params.size() > 3) { throw new CompilationException( __msgs.errInvalidNumberOfArguments(c.getFunctionName())); } String varname = getLiteralFromExpression((Expr)params.get(0)); String partname = params.size() > 1 ? getLiteralFromExpression((Expr)params.get(1)) : null; String locationstr = params.size() > 2 ? getLiteralFromExpression((Expr)params.get(2)) : null; OScope.Variable var = _cctx.resolveVariable(varname); OMessageVarType.Part part = partname != null ? _cctx.resolvePart(var,partname) : null; OExpression location = null; if (locationstr != null) { location = _cctx.compileExpr(locationstr,_nsContext); } _out.addGetVariableDataSig(varname, partname, locationstr, new OXPath10Expression.OSigGetVariableData(_cctx.getOProcess(),var, part,location)); }
ForEachActivity forEach = (ForEachActivity) src; oforEach.parallel = forEach.isParallel(); oforEach.startCounterValue = _context.compileExpr(forEach.getStartCounter()); oforEach.finalCounterValue = _context.compileExpr(forEach.getFinalCounter()); if (forEach.getCompletionCondition() != null) { oforEach.completionCondition = oforEach.completionCondition.successfulBranchesOnly = forEach.getCompletionCondition().isSuccessfulBranchesOnly(); oforEach.completionCondition.branchCount = _context.compileExpr(forEach.getCompletionCondition());
public void compile(OActivity output, Activity src) { OSwitch oswitch = (OSwitch) output; SwitchActivity switchDef = (SwitchActivity)src; for (SwitchActivity.Case ccase : switchDef.getCases()) { OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess()); ocase.activity = _context.compile(ccase.getActivity()); ocase.expression = (ccase.getCondition() == null ? _context.constantExpr(true) : _context.compileExpr(ccase.getCondition())); oswitch.addCase(ocase); } } }
public void compile(OActivity output, Activity src) { OSwitch oswitch = (OSwitch) output; IfActivity switchDef = (IfActivity)src; if (switchDef.getCondition() == null) throw new CompilationException(__cmsgs.errIfWithNoCondition()); boolean first = true; if (switchDef.getActivity() != null) { OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess()); ocase.activity = _context.compile(switchDef.getActivity()); ocase.expression = _context.compileExpr(switchDef.getCondition()); oswitch.addCase(ocase); first = false; } for (IfActivity.Case ccase : switchDef.getCases()) { OSwitch.OCase ocase = new OSwitch.OCase(_context.getOProcess()); ocase.activity = _context.compile(ccase.getActivity()); ocase.expression = first ? _context.compileExpr(switchDef.getCondition()) : (ccase.getCondition() == null ? _context.constantExpr(true) : _context.compileExpr(ccase.getCondition())); oswitch.addCase(ocase); first = false; } } }
oalarm.activity = _context.compile(onAlarmDef.getActivity()); if (onAlarmDef.getFor() != null && onAlarmDef.getUntil() == null) { oalarm.forExpr = _context.compileExpr(onAlarmDef.getFor()); } else if (onAlarmDef.getFor() == null && onAlarmDef.getUntil() != null) { oalarm.untilExpr = _context.compileExpr(onAlarmDef.getUntil()); } else { throw new CompilationException(__cmsgs.errForOrUntilMustBeGiven().setSource(onAlarmDef));
vref.location = _context.compileExpr(vv.getLocation(), rootNodeType, requestedResultType, new Object[1]); return vref; } else if (from.isPartnerLinkVal()) { return plref; } else if (from.getAsExpression() != null) { return new OAssign.Expression(_context.getOProcess(), _context.compileExpr(from.getAsExpression(), null, requestedResultType, new Object[1]));
vref.location = _context.compileExpr(vv.getLocation(), rootNodeType, null, resultType); return vref; } else if (to.isPartnerLinkVal()) {