/** * Removes an attribute from the workitem. */ public void removeAttribute (final String attributeName) { this.attributes.remove(attributeName); touch(); }
/** * removes any boolean result variable in this expression * (used by CondExpression) */ public static void cleanResult (final InFlowWorkItem wi) { wi.getAttributes().remove(F_RESULT); }
/** * This method is used by setField() internally. */ protected void putField (final String fieldName, final Attribute aValue) { //if (log.isDebugEnabled()) // log.debug("putField() '"+fieldName+"' -> '"+aValue+"'"); if (aValue == null) this.remove(fieldName); else this.put(fieldName, aValue); }
public void reply (final InFlowWorkItem wi) throws ReplyException { wi.getAttributes().remove(F_NEXT_PARTICIPANT); super.reply(wi); }
private void flatten (final InFlowWorkItem wi, final String fieldName, final String separator) { StringBuffer sb = new StringBuffer(); int i = 0; while (true) { final String fn = fieldName + UU + i; final String s = wi.getAttributes().sget(fn); if (i == 0 && s == null) { log.info("flatten() nothing to do (no field '"+fn+"')"); return; } if (s == null) break; if (sb.length() > 0) sb.append(separator); sb.append(s); wi.getAttributes().remove(fn); i++; } wi.getAttributes().puts(fieldName, sb.toString()); if (log.isDebugEnabled()) log.debug("flatten() '"+fieldName+"' -> '"+sb.toString()+"'"); }
private void expand (final InFlowWorkItem wi, final String fieldName, final String value, String separator) { if (separator.equals("|")) separator = "\\|"; // // there may be other special cases, but for now, it's sufficient // // do the job wi.getAttributes().remove(fieldName); final String[] ss = value.split(separator); for (int i=0; i<ss.length; i++) { final String fn = fieldName + UU + i; wi.getAttributes().puts(fn, ss[i]); if (log.isDebugEnabled()) log.debug("expand() '"+fn+"' -> '"+ss[i]+"'"); } final String fn = fieldName + UU + "count"; wi.getAttributes().puts(fn, ""+ss.length); if (log.isDebugEnabled()) log.debug("expand() '"+fn+"' -> '"+ss.length+"'."); }
wi.getAttributes().remove(F_FORGOTTEN_FIELD);