The Export Specification Data Macro Task allows you to export the Specification data of a Specification that you are running into either a XML or JSON file format.
The Task will export all Controls that are editable that are contained within the Specification being exported. The Controls that are editable are:
The Task will also let you select which Constants and Project Tables to export.
Please note the only type of Project Table that you can export is a Simple Table.
Property Name | Description |
---|---|
Constants To Include | A pipebar delimited (|) list of Constants to include in the export.
This defaults to * when the Task is added. |
Project Tables To Include | A pipebar delimited (|) list of Project Tables to include in the export.
This defaults to * when the Task is added. |
Export Format | The file format to export in; XML or JSON.
This defaults to XML when the Task is added. |
Overwrite Flag | TRUE to make the component overwrite the existing file (if one exists) regardless of the Group's overwrite setting. FALSE to not overwrite the existing file. |
Output File Name | A path to the file that will contain the exported Specification data. The path can be Absolute or Relative to the Project file. |
(Title) | A brief description of the purpose of the Task/Condition. When applying this Task to a Specification Macro the title can be changed by clicking in the header of the applied Task or by using the Rename button found on the Command bar. For more information see Specification Macro Editor. |
When this task is added the properties are static by default.
See How To: Change A Static Property To A Dynamic Property to enable rules to be built on these properties.
Specification Item | Name | Value |
---|---|---|
Constant | Constant A | 1 |
Constant | Constant B | 2 |
Constant | Constant C | 3 |
Simple Table | Table A | {"ID","First Name","Second Name";"1","John","Smith";"2","Sam","Jones"; "3","Eric","Coates"} |
Simple Table | Table B | {"ID","Manufacturer","Type","Age";"1","Audi","A4","5";"2","Ford","Fiesta", "3";"3","Citroen","C1","7"} |
Simple Table | Table C | {"ID","Spare Parts","Quantity";"1","O rings 10mm","32";"2","Engine Oil 1L","6","3","Windscreen Wipers","7"} |
Text Box Control | First Name | Eric |
Numeric Text Box Control | Car Age | 7 |
Combo Box | Item Quantity | 1 |
Property Name | Example Rule | Example Result | Meaning |
---|---|---|---|
Constants To Include | "*" | * | This will export all the Constants that exist in the Project. |
Project Tables To Include | "*" | * | This will export all the Project Tables that exist in the Project. |
Export Format | "XML" | XML | This will export the Specification Data as an XML file. |
Overwrite Flag | TRUE | TRUE | If the File already exists this will overwrite that file. |
Output File Name | "C:\MyDocuments\Specifications\ ExportedData\Export"&DWSpecificationId | C:\MyDocuments\Specifications\ ExportedData\Export 9999 | This is the location and the name of the file that will be exported. The file in this case will be called Export 0043. |
Property Name | Example Rule | Example Result | Meaning |
---|---|---|---|
Constants To Include | "DWConstantConstantA|DWConstantConstantC" | DWConstantA|DWConstantC | This will export just the specified Constants given in the pipebar delimited (|) list. |
Project Tables To Include | "Table A" | Table A | This will export this Table. |
Export Format | "JSON" | JSON | This will export the file as a JSON file. |
Overwrite Flag | FALSE | FALSE | If the file already exists this will not overwrite it. |
Output File Name | "C:\MyDocuments\Specifications\ ExportedData\Export"&DWSpecificationId | C:\MyDocuments\Specifications \ExportedData\Export 9999 | This is the location and the name of the file that will be exported. The file in this case will be called Export 0047. |
Each example shows a different Specification that has been exported and the file that would be exported.
The exported XML file will look like this:
<?xml version="1.0" encoding="UTF-8"?> <Specification CurrentOwnerName="Admin" CurrentOwnerId="109a9d93-d6d9-4d2b-b188-862c6aaf818d" CurrentState="Completed" RevisionNumber="1" SpecificationID="43" ProjectName="PartsOrder" SpecificationName="PartsOrder 0476"> <Constants> <Constant Name="Constant A">1</Constant> <Constant Name="Constant B">2</Constant> <Constant Name="Constant C">3</Constant> </Constants> <ProjectTables> <ProjectTable Name="Table A">ID,First Name,Second Name 1,John,Smith 2,Sam,Jones 3,Eric,Coates</ProjectTable> <ProjectTable Name="Table B">ID,Manufacturer,Type,Age 1,Audi,A4,5 2,Ford,Fiesta,3 3,Citroen,C1,7</ProjectTable> <ProjectTable Name="Table C">ID,Spare Parts,Quantity 1,O rings 10mm,32 2,Engine Oil 1L,6 3,Windscreen Wipers,7</ProjectTable> </ProjectTables> <Controls> <Control Name="FirstName" Type="TextBox"> <Value>Eric</Value> </Control> <Control Name="CarAge" Type="NumericTextBox"> <Value>7</Value> </Control> <Control Name="ItemQuantity" Type="ComboBox"> <Value>1</Value> </Control> </Controls> </Specification>
The exported JSON file will look like this:
{ "SpecificationName": "PartsOrder 47", "ProjectName": "PartsOrder", "SpecificationID": 47, "RevisionNumber": 1, "CurrentState": "Completed", "CurrentOwnerId": "109a9d93-d6d9-4d2b-b188-862c6aaf818d", "CurrentOwnerName": "Admin", "Constants": [ { "Name": "Constant A", "Value": "1" }, { "Name": "Constant C", "Value": "3" } ], "ProjectTables": [ { "Name": "Table A", "TableData": "ID,First Name,Second Name\n1,John,Smith\n2,Sam,Jones\n3,Eric,Coates" } ], "Controls": [ { "Name": "FirstName", "Type": "TextBox", "Value": "Eric" }, { "Name": "CarAge", "Type": "NumericTextBox", "Value": 7.0 }, { "Name": "ItemQuantity", "Type": "ComboBox", "Value": "1" } ] }
This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.
Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.
This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.
The status output navigation is as follows:
Success
Success with Warnings
Failed (one of the following occurred)