From 6a7c174fc585721a349f8f236bf0f2892c718c95 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 6 Mar 2014 16:22:17 +0100 Subject: 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 --- .../com/c2kernel/lifecycle/CompositeActivityDef.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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; + } } -- cgit v1.2.3