summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-03-06 16:22:17 +0100
committerAndrew Branson <andrew.branson@cern.ch>2014-03-06 16:22:17 +0100
commit6a7c174fc585721a349f8f236bf0f2892c718c95 (patch)
tree5f94e5d40088e720f61a9554860cb1c42e5ac539 /src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java
parent755bb76c94953b62a08e9fecf523bc5c42ec79ac (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/c2kernel/lifecycle/CompositeActivityDef.java')
-rw-r--r--src/main/java/com/c2kernel/lifecycle/CompositeActivityDef.java17
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;
+ }
}