diff options
Diffstat (limited to 'src/main/java/com/c2kernel/process/Bootstrap.java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/Bootstrap.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/c2kernel/process/Bootstrap.java b/src/main/java/com/c2kernel/process/Bootstrap.java index 08cf2e7..b37cc8a 100644 --- a/src/main/java/com/c2kernel/process/Bootstrap.java +++ b/src/main/java/com/c2kernel/process/Bootstrap.java @@ -17,8 +17,7 @@ import com.c2kernel.lifecycle.instance.CompositeActivity; import com.c2kernel.lifecycle.instance.Workflow;
import com.c2kernel.lifecycle.instance.predefined.PredefinedStepContainer;
import com.c2kernel.lifecycle.instance.predefined.ServerPredefinedStepContainer;
-import com.c2kernel.lifecycle.instance.stateMachine.States;
-import com.c2kernel.lifecycle.instance.stateMachine.Transitions;
+import com.c2kernel.lifecycle.instance.stateMachine.Transition;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.DomainPath;
import com.c2kernel.lookup.EntityPath;
@@ -152,7 +151,8 @@ public class Bootstrap // data was missing or doesn't match
Logger.msg("Bootstrap.verifyResource() - Writing new version "+version+" to "+getDataType(itemType)+" "+itemName);
History hist = new History(thisProxy.getSystemKey(), thisProxy);
- Event newEvent = hist.addEvent("system", "Admin", Transitions.DONE, "Bootstrap", "Bootstrap", "Bootstrap", getDataType(itemType), 0, String.valueOf(version), States.FINISHED);
+ Transition predefDone = new Transition(0, "Done", 0, 0);
+ Event newEvent = hist.addEvent("system", "Admin", "Bootstrap", "Bootstrap", "Bootstrap", getDataType(itemType), 0, "PredefinedStep", 0, predefDone, String.valueOf(version));
newOutcome.setID(newEvent.getID());
Viewpoint newLastView = new Viewpoint(thisProxy.getSystemKey(), getDataType(itemType), "last", 0, newEvent.getID());
Viewpoint newZeroView = new Viewpoint(thisProxy.getSystemKey(), getDataType(itemType), String.valueOf(version), 0, newEvent.getID());
@@ -186,7 +186,7 @@ public class Bootstrap else if (itemType.equals("OD")) wf = "ManageSchema";
else if (itemType.equals("SC")) wf = "ManageScript";
else throw new Exception("Unknown bootstrap item type: "+itemType);
- ca = (CompositeActivity) ((CompositeActivityDef)LocalObjectLoader.getActDef(wf, "last")).instantiate();
+ ca = (CompositeActivity) ((CompositeActivityDef)LocalObjectLoader.getActDef(wf, 0)).instantiate();
}
EntityPath entityPath = Gateway.getLDAPLookup().getNextKeyManager().generateNextEntityKey();
@@ -209,6 +209,8 @@ public class Bootstrap return new DomainPath("/desc/Script/");
if (type.equals("OD"))
return new DomainPath("/desc/OutcomeDesc/");
+ if (type.equals("SM"))
+ return new DomainPath("/desc/StateMachine");
throw new Exception("Unknown bootstrap item type: "+type);
}
@@ -221,6 +223,8 @@ public class Bootstrap return "Schema";
if (type.equals("SC"))
return "Script";
+ if (type.equals("SM"))
+ return "StateMachine";
throw new Exception("Unknown bootstrap item type: "+type);
}
@@ -307,7 +311,7 @@ public class Bootstrap }
public static void initServerItemWf() throws Exception {
- CompositeActivityDef serverWfCa = (CompositeActivityDef)LocalObjectLoader.getActDef("ServerItemWorkflow", "last");
+ CompositeActivityDef serverWfCa = (CompositeActivityDef)LocalObjectLoader.getActDef("ServerItemWorkflow", 0);
Workflow wf = new Workflow((CompositeActivity)serverWfCa.instantiate());
PredefinedStepContainer predef = (PredefinedStepContainer)wf.search("workflow/predefined");
wf.getChildGraphModel().removeVertex(predef);
|
