/** * (This constructor is only used by VariableMap). */ public InFlowWorkItem (final StringMapAttribute sma) { super(); this.setAttributes(sma); this.setHistory(new java.util.ArrayList(0)); }
/** * This constructor is used at launch time, to turn a launchitem * into an InFlowWorkItem and start the flow. */ public InFlowWorkItem (final LaunchItem li) { super(); this.setAttributes(li.getAttributes()); this.setHistory(new java.util.ArrayList(0)); }
private InFlowWorkItem prepareSubWorkitem (final InFlowWorkItem parentWi) { final String sFields = lookupAttribute(A_FIELDS, parentWi); final InFlowWorkItem newWi = (InFlowWorkItem)parentWi.clone(); if (sFields == null) return newWi; newWi.setAttributes(new StringMapAttribute()); String[] fields = sFields.split(", *"); for (int i=0; i<fields.length; i++) { if (log.isDebugEnabled()) log.debug("prepareFields() considering '"+fields[i]+"'..."); if (fields[i].indexOf("=") > -1) addFieldWithValue(fields[i], newWi); else if (fields[i].indexOf(" as ") > -1) addFieldAlias(fields[i], parentWi, newWi); else addFieldsFromRegex(fields[i], parentWi, newWi); } return newWi; }
wi.setAttributes ((StringMapAttribute)getAttributeCoder(StringMapAttribute.class) .decode(new Long(0), args));
result.setLastModified(workItem.getLastModified()); result.setAttributes (new StringMapAttribute(workItem.getAttributes().size()));
/** * Produces an exact replica of this InFlowWorkItem */ public Object clone () { InFlowWorkItem clone = new InFlowWorkItem (); clone.setAttributes((StringMapAttribute)getAttributes().clone()); if (getId() != null) clone.setId(getId().copy()); clone.setParticipantName(Utils.copyString(getParticipantName())); clone.setDispatchTime(Utils.copyString(getDispatchTime())); clone.setLastModified(Time.toIsoDate()); clone.setFilter(getFilter()); clone.setHistory(HistoryItem.copyHistoryList(this.history)); return clone; }