Get Guid From String
  • 15 Dec 2022
  • 2 Minutes to read
  • Dark
    Light

Get Guid From String

  • Dark
    Light

Article Summary

Step Details

Introduced in Version4.0.0
Last Modified in Version5.0.0
LocationData > Text

The Get Guid From String helps to generate GUID from provided input. It also helps to convert the String input type to GUID type output.



Properties

Inputs

PropertyDescriptionData Type
ValueText to get GUID fromString

Outputs

PropertyDescriptionData Type
OutputGUID formatted stringString

Example Inputs and Outputs

InputOutput
625524a45ec33a0f53645a64600438b9
625524a4-5ec3-3a0f-5364-5a64600438b9
fdeMbdc9d9TbcMafdae9afTc9ca9eTbb
EXCEPTION MESSAGE
ef5ec5bafdacefacfb5ccffcdccecbcafaac5cdfeafef
EXCEPTION MESSAGE
Null ValueEXCEPTION MESSAGE
Empty StringEXCEPTION MESSAGE


Common Errors

Guid string should only contain hexadecimal characters

If the input string contains characters other than hexadecimal characters, an error will occur.

To resolve this, ensure that the input only contains the letters A - F and numbers 0 - 9.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps
 ---> System.FormatException: Guid string should only contain hexadecimal characters. at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID
 at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result
 at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result
 at System.Guid.Parse(ReadOnlySpan`1 input
 at System.Guid.Parse(String input
 at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData) --- End of inner exception stack trace ---

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

If the input contains under or more than 32 characters, an error will occur.

To correct this, ensure that there is only 32 characters.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps
 ---> System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID
 at System.Guid.TryParseExactN(ReadOnlySpan`1 guidString, GuidResult& result
 at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result
 at System.Guid.Parse(ReadOnlySpan`1 input
 at System.Guid.Parse(String input
 at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Value cannot be null

If the input value is null, an error will occur.

To resolve this, ensure that the value is correctly mapped/entered.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'input'
 at System.Guid.Parse(String input
 at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Unrecognized Guid format

If the value is an empty string, an error will occur

To resolve this, ensure that there is a value entered in the Value field.

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get Guid From String 1[GetGuidFromString] in flow [Flow 2]: Exception invoking method GetGuidFromString on class StringSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method GetGuidFromString on class StringSteps
 ---> System.FormatException: Unrecognized Guid format. at System.Guid.GuidResult.SetFailure(Boolean overflow, String failureMessageID
 at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result
 at System.Guid.Parse(ReadOnlySpan`1 input
 at System.Guid.Parse(String input
 at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.StringSteps.GetGuidFromString(String value)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 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?