diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-03-06 16:24:43 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-03-06 16:24:43 +0100 |
| commit | bad46b9c4ac8226de56da5367bc7c1bd9797218c (patch) | |
| tree | b56c1aa75898ce3de4a984b0c4871112c7604008 | |
| parent | 6a7c174fc585721a349f8f236bf0f2892c718c95 (diff) | |
AddStepsFromDescription was never used, and probably shouldn't be. It
messes with the link between WfDef and Item, and is now removed.
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java | 50 | ||||
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/predefined/PredefinedStepContainer.java | 1 |
2 files changed, 0 insertions, 51 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java deleted file mode 100644 index 30d014c..0000000 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddStepsFromDescription.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.c2kernel.lifecycle.instance.predefined;
-
-//Java
-import com.c2kernel.common.InvalidDataException;
-import com.c2kernel.graph.model.GraphPoint;
-import com.c2kernel.lifecycle.CompositeActivityDef;
-import com.c2kernel.lifecycle.instance.CompositeActivity;
-import com.c2kernel.lifecycle.instance.Workflow;
-import com.c2kernel.lookup.AgentPath;
-import com.c2kernel.process.Gateway;
-import com.c2kernel.utils.Logger;
-
-public class AddStepsFromDescription extends PredefinedStep
-{
- public AddStepsFromDescription()
- {
- super();
- }
-
- @Override
- protected String runActivityLogic(AgentPath agent, int itemSysKey,
- int transitionID, String requestData) throws InvalidDataException {
-
-
- Logger.msg(1, "AddStepsFromDescription::request() - Starting ");
-
- Workflow lifeCycle = getWf();
-
- try
- {
- Logger.msg(8, "AddStepsFromDescription::request() - data:" + getDataList(requestData)[0]);
- lifeCycle.getChildGraphModel().removeVertex(lifeCycle.search("workflow/domain"));
- CompositeActivityDef actDef = (CompositeActivityDef) Gateway.getMarshaller().unmarshall(getDataList(requestData)[0]);
- CompositeActivity domain = (CompositeActivity)actDef.instantiate();
- lifeCycle.initChild(domain, true, new GraphPoint(150, 100));
- domain.setName("domain");
- domain.setType(actDef.getName());
- lifeCycle.run(agent, itemSysKey);
- Gateway.getStorage().put(itemSysKey, lifeCycle, null);
- Logger.msg(1, "AddStepsFromDescription::request() - DONE.");
- return requestData;
- }
- catch (Exception ex)
- {
- Logger.error("AddStepsFromDescription::request() - during unmarshall.");
- Logger.error(ex);
- throw new InvalidDataException("AddStepsFromDescription::request() - during unmarshall.", "");
- }
- }
-}
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/PredefinedStepContainer.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/PredefinedStepContainer.java index 8127113..bfab876 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/PredefinedStepContainer.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/PredefinedStepContainer.java @@ -17,7 +17,6 @@ public class PredefinedStepContainer extends CompositeActivity predInit("CreateItemFromDescription", "Create a new item using this item as its description", new CreateItemFromDescription());
predInit("AddDomainPath", "Adds a new path to this entity in the LDAP domain tree", new AddDomainPath());
predInit("RemoveDomainPath", "Removes an existing path to this Entity from the LDAP domain tree", new RemoveDomainPath());
- predInit("AddStepsFromDescription", "Creates the domain-specific LifeCycle from a description", new AddStepsFromDescription());
predInit("ReplaceDomainWorkflow", "Replaces the domain CA with the supplied one. Used by the GUI to save new Wf layout", new ReplaceDomainWorkflow());
predInit("AddC2KObject", "Adds or overwrites a C2Kernel object for this Item", new AddC2KObject());
predInit("RemoveC2KObject", "Removes the named C2Kernel object from this Item.", new RemoveC2KObject());
|
