diff options
| author | abranson <abranson@PCUWE01.cern.ch> | 2012-04-26 00:31:26 +0200 |
|---|---|---|
| committer | abranson <abranson@PCUWE01.cern.ch> | 2012-04-26 00:31:26 +0200 |
| commit | eac30db6329f05cc7cf2a35613497e357b4db3aa (patch) | |
| tree | 427d12973863e4bc3790b0f6e06f58bb65667651 /resources/boot/SC/InstantiateItem.xml | |
| parent | 3ffa8ec426702e8cf95df2a6840f80a27fba3b3e (diff) | |
Update for javax.script
Diffstat (limited to 'resources/boot/SC/InstantiateItem.xml')
| -rw-r--r-- | resources/boot/SC/InstantiateItem.xml | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/resources/boot/SC/InstantiateItem.xml b/resources/boot/SC/InstantiateItem.xml index 0f16a65..4e80e9d 100644 --- a/resources/boot/SC/InstantiateItem.xml +++ b/resources/boot/SC/InstantiateItem.xml @@ -4,12 +4,6 @@ <script language="javascript" name="InstantiateItem"><![CDATA[
importClass(Packages.com.c2kernel.lookup.DomainPath);
- // Load contextual objects
- var job = bsf.lookupBean("job");
- var item = bsf.lookupBean("item");
- var agent = bsf.lookupBean("agent");
- var errorBuffer = bsf.lookupBean("errors");
-
// Get parameters from outcome var name = job.getOutcome().getField("ObjectName"); var folder = job.getOutcome().getField("SubFolder"); @@ -22,14 +16,13 @@ try { agent.execute(item, "CreateItemFromDescription", params); } catch (e) { - errorBuffer.addError("Could not create "+name+": "+e.message); - errorBuffer.setFatal(); + throw "Could not create "+name+": "+e.message; } // If this script is running in the Cristal GUI, open the new item.
var tree = Packages.com.c2kernel.gui.MainFrame.treeBrowser;
if (tree != null)
tree.push(new DomainPath(domPath+"/"+name));
- errorBuffer;
+
]]></script>
</cristalscript>
|
