C.1.1. Schema Definition for Lifecycles

Engineering Knowledge Manager

Administration Guide | Appendix C. Lifecycles: Defining and Configuring Using XML | C.1. Defining Lifecycles Using XML |

C.1. Defining Lifecycles Using XML |  | C.1.2. Defining a Lifecycle XML File
Prev |  | Next

### C.1.1. Schema Definition for Lifecycles

EKM provides schema files for all files that you define using XML. These XML Schema Definition (XSD) files describe the structure or "grammar" that an XML document must adhere to. Schema definitions provide the building blocks that enable you to write valid XML configuration files for use in EKM. For more information on how to read schema files, refer to: http://www.w3.org/TR/xmlschema-0.

XSD files are contained in the EKM_HOME/schema folder and are identified by the .xsd extension.

Important: EKM_HOME is the directory where the EKM server application is installed. This is typically `EKM_BASE/ekm-server`, where `EKM_BASE` is the EKM base directory.

Figure 1: Partial Listing of lifecycle.xsd Schema Definition shows the partial listing for lifecycle.xsd, the XML schema definition (XSD) that is used for defining lifecycles in EKM. The complete listing is provided in the EKM_HOME/schema folder.

The listing shows that a lifecycle file consists of a root element named lifecycle. The lifecycle element must contain the following:

- 1 or more `type` elements

- 1 or more `stage` elements

- 0 or more `transition` elements

- an optional `script` element

See Defining a Lifecycle XML File for a description of each element.

Figure 1: Partial Listing of lifecycle.xsd Schema Definition

    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    	targetNamespace="http://www.ansys.com/ekm/lifecycle"
    	xmlns:ekmLifecycle="http://www.ansys.com/ekm/lifecycle">
       xmlns:ekmScript="http://www.ansys.com/ekm/script">

       <xsd:import namespace="http://www.ansys.com/ekm/script" schemaLocation="script.xsd"/>

    	<xsd:complexType name="Stage">
    		<xsd:sequence>
    			<xsd:element name="permission" minOccurs="0"
    				maxOccurs="unbounded">
    				<xsd:complexType>
    					<xsd:sequence>
    						<xsd:element name="type" minOccurs="1"
    							maxOccurs="unbounded">
    							<xsd:simpleType>
    								<xsd:restriction base="xsd:string">
    									<xsd:enumeration value="access" />
    									<xsd:enumeration value="create" />
    									<xsd:enumeration value="delete" />
    									<xsd:enumeration value="modify" />
    									<xsd:enumeration value="download" />
    									<xsd:enumeration value="lifecycle" />
    									<xsd:enumeration
    										value="fullControl" />
    								</xsd:restriction>
    							</xsd:simpleType>
    						</xsd:element>
    						<xsd:element name="member" type="xsd:string"
    							minOccurs="1" maxOccurs="unbounded" />
    					</xsd:sequence>
    				</xsd:complexType>
    			</xsd:element>
    		</xsd:sequence>

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.