// CUSTOM: update editable parameters for all activities
@Override
public void add(XMLElement el) {
super.add(el);
// add editable variable for all existing activities when a variable is added
XPDLObjectFactory xpdlObjectFactory = JaWEManager.getInstance().getXPDLObjectFactory();
FormalParameter fp = (FormalParameter)el;
XMLElement parent = getParent();
if (parent instanceof WorkflowProcess) {
parent.setNotifyListeners(false);
parent.setNotifyMainListeners(false);
WorkflowProcess wp = (WorkflowProcess)parent;
Activities acts = wp.getActivities();
for (int i=0; i<acts.size(); i++) {
Activity act = (Activity)acts.get(i);
if (act.getActivityType() == XPDLConstants.ACTIVITY_TYPE_NO) {
ExtendedAttribute attribute = xpdlObjectFactory.createXPDLObject(act.getExtendedAttributes(), null, true);
attribute.setName("VariableToProcess_UPDATE");
attribute.setVValue(fp.getId());
}
}
parent.setNotifyListeners(true);