Skip to main content

Adding XData Blocks to a Class

Important:

InterSystems® Studio has been deprecatedOpens in a new tab. Beginning with version 2024.2, it is no longer included with installations of InterSystems IRIS®, and it is no longer receiving maintenance updates. An upgrade to InterSystems IRIS 2024.2 or later will remove any Studio installation which is associated with the instance.

The version of InterSystems Studio which was included with InterSystems IRIS 2024.1 is available as a stand-alone component from the WRC Downloads page (https://wrc.intersystems.com/wrc/coDistGen.cspOpens in a new tab). To show only the Studio downloads, type studio in the Name column. Neither upgrades nor new installations of InterSystems IRIS will affect a stand-alone Studio installation.

InterSystems provides the following documentation about Studio 2024.1 for legacy support only. InterSystems recommends that all users develop ObjectScript code using the InterSystems ObjectScript Extension Pack for Visual Studio Code. See Migrate from Studio.

An XData block is a block of XML code that you can add to your class definition.

You can add an XData block to a class definition in two ways:

  • Editing the class definition using the Class Editor.

  • Using the XData wizard

To add an XData block using the Class Editor, position the cursor at a blank line and enter an XData declaration such as:

XData ProductionDefinition
    {
    <Production>
    <ActorPoolSize2/ActorPoolSize>
    </Production>
    } 

Alternatively, you can copy and paste an existing XData block and then edit it.

New XData Wizard

You can invoke the New XData wizard using the Class > Add > XData.

The New XData wizard displays a single page prompting you for a name for the XData block and a description. To end, select Finish. Add XML code into the Class Editor window to complete the XData block.

The New XData wizard prompts you for the following information (you can later modify any of these values):

XData Name

(required) Name of the new XData. This name must be a valid name and must not conflict with the name of a previously defined XData.

See Rules and Guidelines for IdentifiersOpens in a new tab.

Description

(optional) Description of the new XData.

For details, see XData DefinitionsOpens in a new tab in the Class Definition Reference.

FeedbackOpens in a new tab