diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-03-06 16:22:17 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-03-06 16:22:17 +0100 |
| commit | 6a7c174fc585721a349f8f236bf0f2892c718c95 (patch) | |
| tree | 5f94e5d40088e720f61a9554860cb1c42e5ac539 /src/main/java/com | |
| parent | 755bb76c94953b62a08e9fecf523bc5c42ec79ac (diff) | |
CompositeActivityDef.instanciate wasn't calling configureInstance, which
copies over the properties from the def to the instance. ActivitySlotDef
does it again, because it copies the slot props over, but instantiated
CompositeActivities ended up with no props from the original Def. Fixes
#169
Diffstat (limited to 'src/main/java/com')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java b/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java index c430f20..ef5e148 100644 --- a/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java +++ b/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java @@ -158,6 +158,7 @@ public class CompositeActivityDef extends ActivityDef public WfVertex instantiate(String name) throws ObjectNotFoundException, InvalidDataException
{
CompositeActivity cAct = new CompositeActivity();
+ configureInstance(cAct);
cAct.setType(getName());
cAct.setName(name);
GraphableVertex[] vertexDefs = getLayoutableChildren();
@@ -225,4 +226,20 @@ public class CompositeActivityDef extends ActivityDef }
public void setCastorNonLayoutableChildren(String[] dummy) { }
+
+ @Override
+ public boolean verify() {
+ boolean err = super.verify();
+ GraphableVertex[] vChildren = getChildren();
+ for (int i = 0; i < vChildren.length; i++)
+ {
+ WfVertexDef wfvChild = (WfVertexDef)vChildren[i];
+ if (!(wfvChild.verify()))
+ {
+ mErrors.add(wfvChild.getName()+": "+wfvChild.getErrors());
+ err = false;
+ }
+ }
+ return err;
+ }
}
|
