public String getValue (java.util.Map scope, InFlowWorkItem wi) { if (this.workitemAttributeName == null) return null; Object value = wi.getAttribute(this.workitemAttributeName); if (value == null) return this.defaultValue; return String.valueOf(value); } }
private void addFieldAlias (final String aliasing, final InFlowWorkItem parentWi, final InFlowWorkItem newWi) { final String[] ss = aliasing.split(" *as *"); final String newFieldName = ss[0].trim(); final String parentFieldName = ss[1].trim(); final Attribute parentValue = parentWi.getAttribute(parentFieldName); if (parentValue != null) { newWi.getAttributes() .put(new StringAttribute(newFieldName), parentValue); } }
private void addFieldsFromRegex (final String regex, final InFlowWorkItem parentWi, final InFlowWorkItem newWi) { final java.util.Iterator it = parentWi.getAttributes().keyNamesMatching(regex).iterator(); while (it.hasNext()) { final String fieldName = ((String)it.next()).trim(); if (log.isDebugEnabled()) log.debug("prepareFields() adding field '"+fieldName+"'"); final Attribute a = parentWi.getAttribute(fieldName); newWi.getAttributes().put(new StringAttribute(fieldName), a); } }
public String getValue (final java.util.Map scope, final InFlowWorkItem wi) { if (getWorkitemAttributeName() == null) return null; if (wi.getAttribute(getWorkitemAttributeName()) != null) return "true"; return "false"; } }
modifiedWorkItem.getAttribute(attributeName)); if (modifiedWorkItem.getAttribute(attributeName) .equals(initialWorkItem.getAttribute(attributeName))) (attributeName, modifiedWorkItem.getAttribute(attributeName));
@Override public void init() { super.init(); item = WorkflowUtil.getWorkItem(getWorkItemId()); if (item == null) { throw new RuntimeException("can't read workitem"); } rootPath = item.getAttribute("path").toString(); repository = item.getAttribute("repository").toString(); hm = MgnlContext.getHierarchyManager(repository); ListAttribute versions = (ListAttribute) item.getAttribute(Context.ATTRIBUTE_VERSION_MAP); for (Iterator iter = versions.iterator(); iter.hasNext();) { Map versionMap = (Map) iter.next(); String version = versionMap.get("version").toString(); String uuid = versionMap.get("uuid").toString(); try { Content node = hm.getContentByUUID(uuid); if (!node.getHandle().equals(rootPath)) { this.subPages.add(new SubPage(node, version)); } } catch (RepositoryException e) { log.error("can't read subpage for [" + rootPath + "]", e); } } }
(Attribute)workItem.getAttribute(attributeName).clone()); if (log.isDebugEnabled()) (Attribute)workItem.getAttribute(attributeName).clone()); if (log.isDebugEnabled())
private boolean shouldForget (final InFlowWorkItem wi) { // may be dangerous ??!! if (Utils.toBoolean(wi.getAttribute(A_FORGET))) return true; if (Utils.toBoolean(lookupVariable(A_FORGET))) return true; if (Utils.toBoolean(lookupAttribute(A_FORGET, wi))) return true; return false; }
! originalItem.containsAttribute(fieldName); final Attribute currentAttribute = item.getAttribute(fieldName); originalItem.getAttribute(fieldName);
participantName = ref; else if (fieldRef != null && this.appliedWorkitem != null) participantName = this.appliedWorkitem.getAttribute(fieldRef); else if (variableRef != null) participantName = lookupVariable(variableRef);
.getAttribute(DESCRIPTION_FIELD_NAME);
newc.createNodeData(WorkflowConstants.NODEDATA_PARTICIPANT, vf.createValue(wi.getParticipantName())); StringAttribute assignTo = (StringAttribute) wi.getAttribute(WorkflowConstants.ATTRIBUTE_ASSIGN_TO); if (assignTo != null) { String s = assignTo.toString();
workItem.getAttribute(valueFieldName);
(StringAttribute)wi.getAttribute(Header.SUBJECT); if (subject == null)