X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2Fexecution%2FFlow.js;h=0167d9b4eed8fee6db31d56d476f5c2067605619;hb=6e162ed05016679a19bf4da38b835d15684cb232;hp=017599ee6f2ce64999faf001ef5449a81458d9e4;hpb=d8e9131cdd34b663a03008df8eb97616694259ce;p=gpl%2Fargeo-slc.git diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js index 017599ee6..0167d9b4e 100644 --- a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js +++ b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Flow.js @@ -13,6 +13,10 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { check : "String", init : "" }, + description : { + check : "String", + init : "" + }, /** * An optional path describing this flow */ @@ -36,7 +40,8 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { * The values to init the ExecutionSpec */ values : { - check : "Node" + check : "Node", + nullable : true }, /** * Castor representation of the object @@ -51,6 +56,10 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { * Xpath to the name */ XPATH_NAME : "@name", + /** + * Path to the description + */ + XPATH_DESCRIPTION : "slc:description", /** * XPath to the ExecutionSpec name */ @@ -78,10 +87,13 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { this.set({ name : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_NAME), path : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_PATH), + description : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_DESCRIPTION) || "", executionSpecName : org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_EXEC_SPEC_NAME) }); var values = org.argeo.ria.util.Element.selectNodes(xmlNode, this.self(arguments).XPATH_VALUES); - this.setValues(values[0]); + if(values[0]){ + this.setValues(values[0]); + } }, /** * Get a given value inside the values map @@ -95,7 +107,7 @@ qx.Class.define("org.argeo.slc.ria.execution.Flow", { if(specType == "primitive"){ xpath = 'slc:value[@key="'+key+'"]/slc:primitive-value[@type="'+specSubType+'"]'; }else if(specType == "ref"){ - xpath = 'slc:value[@key="'+key+'"]/slc:ref-value/slc:label'; + xpath = 'slc:value[@key="'+key+'"]/slc:ref-value/@ref'; } return org.argeo.ria.util.Element.getSingleNodeText(this.getValues(), xpath); }