Get XML Schema
  • 14 Mar 2024
  • 1 Minute to read
  • Dark
    Light

Get XML Schema

  • Dark
    Light

Article Summary

Step Details

Introduced in Version4.0.0
Last Modified in Version7.12.0
LocationData > XML

The Get XML Schema step creates and outputs the XML Schema for a Decisions datatype.





Properties

Inputs

PropertyDescriptionData Type
Type NameThe full type name for the Decisions datatypeDecisionsType

Outputs

PropertyDescriptionData Type
XML SchemaThe XML Schema for the selected datatypeString

Example

  1. Within the platform, create a Datatype to be converted into an XML Schema. For this example, a simple Database Structure shown below.

  2. Pick or create a Flow. Then, select the Get XML Schema step by navigating to DATA > XML within the Toolbox.
  3. In the Properties panel for the Get XML Schema step, enter the Type Name under Inputs. Please note that the Input Mapping MUST be set to Constant, otherwise it will give the user an error. Once the Type Name has been set to Constant, select the datatype from the dropdown menu. Once that is complete, connect the Done and No Matches Found paths to the End step to complete the Flow.
  4. Once the Flow is complete, Select Debug and then Start Debugging. This will test the Flow to ensure it is working correctly, and will also show the user the XML Schema output.

Common Errors

Error Changing type from [datatype] to DecisionsType

The following error appears when the Select From Flow input mapping is used rather than Constant. The step is unable to cast the type as a DecisionsType, throwing the error. 

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get XML Schema 1[GetXMLSchemaStep] in flow [Testing Flow]: Error Converting Type Name [Parent None]. Error changing type from ExampleDBStructure to DecisionsType ---> System.Exception: Error Converting Type Name [Parent None]. Error changing type from ExampleDBStructure to DecisionsType ---> System.InvalidOperationException: Invalid type conversion. 'DecisionsType' not assignable from 'ExampleDBStructure'.
   at DecisionsFramework.Utilities.Data.DecisionsTypeHelper.ChangeType(Object value, DecisionsType targetType, Boolean convertToGenerated, Boolean isList, String errorMessage, Object[] errorParams) 
   --- End of inner exception stack trace ---
   at DecisionsFramework.Utilities.Data.DecisionsTypeHelper.ChangeType(Object value, DecisionsType targetType, Boolean convertToGenerated, Boolean isList, String errorMessage, Object[] errorParams)
   at DecisionsFramework.Design.Flow.Mapping.InputImpl.SelectValueInputMapping.GetInputValue(IDataConsumer consumer, FlowStateData currentData, DecisionsType expectedType, Boolean expectingArray, String valueName, Object parentObject, Boolean canBeNull)
   at DecisionsFramework.Design.Flow.FlowStep.BuildMappingData(FlowStateData data)
   at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) 
   --- End of inner exception stack trace ---

Was this article helpful?

What's Next