---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Orchestration Builder, Orchestrate, Orchestration]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: Orchestrate Data Types
layout: subsection
---

Workday Orchestrate uses strong data types that provide rich APIs for interrogating and transforming data. Employing strong data types at design time enables accurate content assistance and type validation. In Orchestration Builder you can see:

-   All values that you can assign to a property of a particular type.
-   All instance functions that you can apply to a value of a particular type.
-   Incorrect type assignments.


Many types are streamable, helping to manage memory.

## Type Hierarchy and Categories

Orchestrate data types can have subtypes. Data subtypes inherit the instance functions defined for their parent and can also use functions defined specifically for them.

Orchestrate’s data types are broadly divided into 4 categories:

-   `DataType`, its subtypes, and associated iterator types. Example: `JsonIteratorType`.
-   String-related types. Examples: `StringType`, `StringListType`, `StringIteratorType`.
-   Primitive value types, collections of primitive value types, and associated iterator types. Examples: `BooleanType`, `BooleanListType`, `BooleanIteratorType`.
-   All other types. Example: `HeadersType`.


## DataType and Its Subtypes

An HTTP request that launches an orchestration can include a request body. An orchestration that responds using a <b>Send HTTP Request</b> or <b>Send Workday API Request</b> step can include a response body. These documents are generically typed as `DataType` unless you cast them as a specific subtype of `DataType`. Example: you can use the `asXML` function to cast a document as XML.

You don't need to cast every document as a subtype of `DataType`. Example: binary files such as images.

The Orchestrate runtime is largely streaming-based. It processes `DataType`  documents without necessarily loading the entire document into memory at once. If any `DataType` values are above a certain size threshold, Orchestrate holds them in temporary files on disk, rather than in memory.

Documents often contain collections of data. Example: an array of JSON objects representing worker data. To work with the individual items in a collection, obtain an iterator over them and feed the iterator into a loop for processing. Examples:

-   `JsonType.iterator(<i>jsonpath</i>)` returns a JsonTypeIterator, which iterates over the collection of JSON values that match the provided JsonPath.
-   `XmlType.iterator(<i>xpath</i>)` returns an XmlTypeIterator, which iterates over the collection of XML fragments that match the provided XPath.


## StringType

In Orchestrate, `StringType` extends `TextType`. You can use any `TextType` instance function on strings. However, `TextType` and `StringType` aren't identical.

`TextType`, which is a subtype of `DataType`, is used to represent text-based documents. Values of this type can be large, meaning they're held in file-backed data structures. Values of `StringType` are held in memory.

You can cast a value of any type as a `StringType` by applying the `toString` function. Example: suppose that a calculation has resulted in a `NumberType` value. You could embed that value in an output string, like so: "The total amount payable is: "`+ theNumericTotal.toString() +`".  Payment is due in 30 days."

Note that when you cast a value as a string, you might be taking what was originally file-backed data and transferring it to memory. In addition, when you apply the `toString` function to a value, you create a copy of the original. The result might be 2 instances of the same data, both held in memory. For these reasons, you should only cast a nonstring value as a string when it's legitimately necessary.

