2023.1:XML Schema Integration (Functionality)

From Grooper Wiki
Revision as of 16:28, 29 December 2023 by Randallkinard (talk | contribs) (added steps from images as lists above related images // Edit via Wikitext Extension for VSCode)

This article is about an older version of Grooper.

Information may be out of date and UI elements may have changed.

20252023.1

XML schemas are common formats that Grooper can leverage for generating models and exporting data.

About

You may download and import the file(s) below into your own Grooper environment (version 2023.1). There is a Batch with the example document(s) discussed in this tutorial, as well as a Project configured according to its instructions.

Given the proprietary nature of SharePoint and Database connections, the connection objects and their configuriations cannot be shared.
Please upload the Project to your Grooper environment before uploading the Batch. This will allow the documents within the Batch to maintain their classification status.
The XML Schemas and Files.zip file is not a Grooper ZIP file, therefore it is not meant to be uploaded into Grooper. Instead, unzip the contents of this file normally.

The XML format has been around since 1996 and, from a business perspective, can play a large role in your ability to organize data. This article will focus chiefly on XML Schemas and how Grooper can leverage them to define Data Model structures as control how data is exported out of Grooper.

How To

EDI Standards

XML Schema Integration was actually born from a necessity for Grooper to efficiently collect data from medical EDI files, therefore, we will begin our understanding by learning how to work withm them. Below we will work with a mocked up EOB form.

Follow the instructions in the screenshots below.

  1. With the "EDI Integration - Batch" selected...
  2. ...on the "Viewer" tab...
  3. ...we can see the contents of this EDI file. This is a standardized format used by businesses to send data in a way that might typically be seen in the form of a document like an "Invoice" or "EOB Form". Understanding the structure of this document, especially to the untrained eye, is daunting at best. Grooper will do the hard work for us.

Selecting an EDI Schema

There is a massive library of EDI standars, and Grooper has built into a small selection of X12 schemas to choose from. These act as templates that will populate a Data Model with all the appropriate Data Elements necessary to house all data from a given format.

  1. Right-click on the "EDI Integration" Data Model and choose Import Schema.
  2. Check Remove Existing if you want to remove existing Data Elements from the model.
  3. In the "Import Schema" dialog click the drop-down for teh Source property and choose EDI Schema Importer.
  4. Once set, expand the sub-properties of Source.
  5. Choose X12 837 Professional in the drop-down for the X12 Schema property.



  • This action has created a massive assortment of requisite Data Elements for the chosen standard, including validation.

Execute Activity to Collect EDI Data

Extraction using EDI Schemas does not leverage the standard Extract activity. Instead, the Execute activity will be used.

  1. Select the "Execute" step in the "EDI Process" Batch Process.
  2. Clikc the ellipsis button for the Commands property.
  3. Add a Command and set it to EDI File - Load Data.
  4. Click the ellipsis button for the Mappings property.
  5. Add a Mapping and set the Schema Name property to X12 837 Professional".
  6. Point the Content Type property to the 837 Prof Document Type.



  1. Go to the "Activity Testing" tab.
  2. Select the document from the "EDI Integration - Batch".
  3. Test the activity to get extraction results.

Data View to see Results

  1. To view results, go to the "Data Review" step.
  2. Go to the "Activity Tester" tab.
  3. Select the "EDI Integration - Batch".
  4. Test the activity.



  • In the Data Viewer you will see that the appropriate data was collected.

XML Schemas

EDI schemas are incredibly useful if you are working with that specific style of template. However, they are useless outside of their specific use case. XML schemas, on the other hand, are ubiquitous across businesses and industries and can be leveraged in a very similar way.

Follow the instructions in the screenshots below.

Adding .xsd Resource File

Just about any file can be added as a Resource File object in Grooper. For XML schemas the .xsd file standard will be used.

  • Drag files from a File Explorer window into a Project in Grooper to create a Resource File object.

Creating Data Elements from .xsd Resource File

We can now leverage the added Resource File object as a reference to create Data Elements from the schema.

  1. Right-click the "Simple Schema Ex" Data Model and select Import Schema.
  2. In the "Import Schema" dialog click the drop-down for the Source property and choose XML Schema Importer.
  3. Expand the sub-properties of teh Source property.
  4. In the drop-down for the Schema File property choose the file "example xml schema.xsd".



  • This action has created all the necessary Data Elements in our model according to the XML schema.



Execute Activity to Validate XML Schemas

We can leverage an XML schema file to validate if a document matches a provided schema.

  1. Select the "Execute" step in the "Schema Processing Example" Batch Process
  2. Click the ellipsis button for the Commands property.
  3. Add a Command and set it to XML File - Validate Schema.
  4. Expand the Command sub-properties and click the drop-down for the Schema File property.
  5. Select the .xsd file you would like to validate against, in this case we will choose "shiporder schema.xsd".



  1. Click the "Activity Tester" tab.
  2. Select the documents from the "XML Docs - Batch".
  3. Click the test activity button.
  4. Note that "Document (2)" gets flagged, and upon in spection you will notice its XML format does not match the provided schema.

Execute Activity to Collect XML Data

Like with the EDI Schemas, the Execute activity with an appropriate command is used to collect data from XML files.

  1. Select the "Execute (1)" step in the "Schema Processing Example" Batch Process
  2. Click the ellipsis button for the Commands property.
  3. Add a Command and set it to XML File - Load Data.



  1. Click the "Activity Tester" tab.
  2. Select the "shiporder (1)" document from the "XML Docs - Batch".
  3. Click the test activity button
  4. Because this document is classified as a Document Type that belongs to a model that matches its schema, its contents will be appropriately extracted into the correct Data Elements.



  • Feel free to use the "Review" activity with the Data Viewer to view the extracted data.

Export XML Format

XML Formats for the Export of data from Grooper are quite powerful, because in spite of the fact that there are a myriad of ways in Grooper export data directly to backend systems, plenty of businesses still prefer to use this format to control how data enters whatever system they are using.

You can define the structure of your XML Format output by leveraging .xsd schema files.

XML Format as an Attachment Using the Merge Activity

An XML Format can be created as an attachment to a document by using the Merge activity. This attachment can later be leveraged by the Export activity.

  1. Select the "Merge" step in the "XML Merge/Export Format Process".
  2. Set the Merge Format property to XML Format.
  3. Define the naming of the attachment using the appropriate Path Expression and select an appropriate Content Type.
  4. Click the ellipsis button for the Merge Format property to open its dialog.
  5. Select an appropriate file for the Schema File property.
  6. You can choose to use any of the other "General" properties in the "Merge Format" dialog to control how the XML Format will be built.

XML Format through Export Behavior

The functionality of the Merge activity is also built into the Export activity and can be handled by an Export Behavior.

  1. Select a Content Type.
  2. Click the ellipsis button for the Behaviors property.
  3. Add an Export Behavior and click the ellipsis button for the Export Deinitions property.
  4. Add a File Export export definition and click the ellipsis button for the Export Formats property.
  5. Select an appropriate file for teh Schema File property, and choose any of the other "General" properties in the "Export Format" dialog to control how the XML Format is created.