130 likes | 151 Views
#N12 Additional variable types (including non-scalar) [e.g. #S2 Interoperability; identifier comes from “Version 1.1 Candidate Items” spreasheet on TC Documents page]. SDD 1.1 General Direction Proposal XXX = [Proposal | Initial Discussion | General Direction Proposal]. Current Situation.
E N D
#N12 Additional variable types (including non-scalar)[e.g. #S2 Interoperability; identifier comes from “Version 1.1 Candidate Items” spreasheet on TC Documents page] SDD 1.1 General Direction Proposal XXX = [Proposal | Initial Discussion | General Direction Proposal]
Current Situation • Extend the set of variable types: • Available variable types in V1.0 shall be extended with more types, including non-scalar types (non such available in v1.0) • Currently following types are available • IntegerParameterType (extends BaseParameterType) • StringParameterType (extends BaseParameterType) • BooleanParameterType (extends BaseParameterType) • URIParameterType (extends BaseParameterType) • ResourcePropertyType • DerivedVariableType
Proposal • The idea is additionally existing types to introduce two new types • ComplexParameterType is a new type • ArrayParameterType is subtype BaseParameterType • Additionally a hierarchy of new elements called data-types is introduced
Scenario(s)/Use Case(s) • Let’s recall the variables definition: Variables provide a way to associate user inputs, resource property values, fixed strings and values derived from these with input arguments for artifacts and with constraints on resources. • It makes sense to define two more variable types • a record of elements of different base types – to structure parameters that belong logically together (user account for example) • an array of the same base type – to declare unknown number of common inputs (file locations for example) • With respect to the purpose of variables in SDD I was not able to define a use case where table-structure may be used therefore the proposal does not contain a table
Proposed Schema • ParametersType
Proposed Schema • ComplexParameterType
Proposed Schema • ArrayParameterType
Proposed Schema • Data Types
Examples • SequenceParameterType • <sdd-dd:ComplexParameter id=“DatabaseAccount“ required=“true”> • <sdd-dd:StringParameter id="DatabaseUserName"/> • <sdd-dd:StringParameter id="DatabaseUserPassword" sensitive="true"/> • </sdd-dd:ComplexParameter> • ArrayParameterType • <sdd-dd:ArrayParameter id=“ContentDVDLocations” operation=“”install”> • <sdd-dd:URIType /> • <sdd-dd:DefaultValue>$dbDVDLocation </sdd-dd:DefaultValue> • <sdd-dd:DefaultValue>$appSrvDVDLocation</sdd-dd:DefaultValue> • </sdd-dd:ArrayParameter>
Proposed Schema Change • <xsd:complexType name="ParametersType"> • <xsd:choice maxOccurs="unbounded"> • <xsd:element name="IntegerParameter" type="sdd-dd:IntegerParameterType"/> • <xsd:element name="StringParameter" type="sdd-dd:StringParameterType"/> • <xsd:element name="BooleanParameter" type="sdd-dd:BooleanParameterType"/> • <xsd:element name="URIParameter" type="sdd-dd:URIParameterType"/> • <xsd:element name=“ComplexParameter" type="sdd-dd:ComplexParameterType"/> • <xsd:element name="ArrayParameter" type="sdd-dd:ArrayParameterType"/> • <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> • </xsd:choice> • </xsd:complexType>
Proposed Schema Change • <xsd:complexType name="ComplexParameterType"> • <xsd:sequence> • <xsd:group ref="sdd-dd:DisplayElementGroup" minOccurs="0"/> • <xsd:choice maxOccurs="unbounded"> • <xsd:element name="IntegerParameter" type="sdd-dd:IntegerParameterType"/> • <xsd:element name="StringParameter" type="sdd-dd:StringParameterType"/> • <xsd:element name="BooleanParameter" type="sdd-dd:BooleanParameterType"/> • <xsd:element name="URIParameter" type="sdd-dd:URIParameterType"/> • <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> • </xsd:choice> • </xsd:sequence> • <xsd:attribute name="id" type="xsd:ID" use="required"/> • <xsd:attribute name="required" type="xsd:boolean" use="optional" default="true"/> • <xsd:attribute name="operation" type="sdd-dd:OperationListType" use="optional"/> • </xsd:complexType>
Proposed Schema Change • <xsd:complexType name="ArrayParameterType"> • <xsd:complexContent> • <xsd:extension base="sdd-dd:BaseParameterType"> • <xsd:sequence> • <xsd:choice> • <xsd:element name="IntegerType" type="sdd-dd:IntegerDataType"/> • <xsd:element name="StringType" type="sdd-dd:StringDataType"/> • <xsd:element name="BooleanType" type="sdd-dd:BooleanDataType"/> • <xsd:element name="URIType" type="sdd-dd:URIDataType"/> • </xsd:choice> • <xsd:element name="DefaultValue" type="sdd-dd:VariableExpressionType" minOccurs="0" maxOccurs="unbounded"/> • </xsd:sequence> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:extension> • </xsd:complexContent> • </xsd:complexType>
Proposed Schema Change • <xsd:complexType name="IntegerDataType"> • <xsd:sequence> • <xsd:element name="Bounds" type="sdd-dd:BoundaryType" minOccurs="0" maxOccurs="unbounded"/> • </xsd:sequence> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType> • <xsd:complexType name="StringDataType"> • <xsd:sequence> • <xsd:element name="ValidValue" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> • </xsd:sequence> • <xsd:attribute name="minLength" type="xsd:positiveInteger" use="optional"/> • <xsd:attribute name="maxLength" type="xsd:positiveInteger" use="optional"/> • <xsd:attribute name="case" type="sdd-dd:StringCaseType" use="optional" default="mixed"/> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType> • <xsd:complexType name="BooleanDataType"> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType> • <xsd:complexType name="URIDataType"> • <xsd:anyAttribute namespace="##other" processContents="lax"/> • </xsd:complexType>