sdk
latest
false
- Overview
- Custom activities
- Migrating Activities to .NET 6
- Release Notes
- Building Workflow Analyzer Rules
- Building Activities Project Settings
- Creating Custom Wizards
- Prioritize Activities by Scope
- UiPath.Activities.Api.Base
- UiPath.Studio.Activities.Api
- UiPath.Studio.Activities.Api.Activities
- UiPath.Studio.Activities.Api.BusyService
- UiPath.Studio.Activities.Api.ExpressionEditor
- UiPath.Studio.Activities.Api.Expressions
- UiPath.Studio.Activities.Api.Licensing
- UiPath.Studio.Activities.Api.Mocking
- UiPath.Studio.Activities.Api.ObjectLibrary
- UiPath.Studio.Activities.Api.PackageBindings
- UiPath.Studio.Activities.Api.ProjectProperties
- UiPath.Studio.Activities.Api.ScopedActivities
- UiPath.Studio.Activities.Api.Settings
- UiPath.Studio.Activities.Api.Wizards
- UiPath.Studio.Activities.Api.Workflow
- UiPath.Studio.Api.Controls
- UiPath.Studio.Api.Telemetry
- UiPath.Studio.Api.Theme
- Robot JavaScript SDK
- Triggers SDK
Developer Guide
Last updated Mar 23, 2024
Required
Generated Code
Design-time validations are generated in
CacheMetadata
for all required properties. This means a workflow will not run unless values are provided for these fields.
...
#region Protected Methods
protected override void CacheMetadata(CodeActivityMetadata metadata)
{
if (FirstNumber == null) metadata.AddValidationError(string.Format(Resources.ValidationValue_Error, nameof(FirstNumber)));
if (SecondNumber == null) metadata.AddValidationError(string.Format(Resources.ValidationValue_Error, nameof(SecondNumber)));
base.CacheMetadata(metadata);
}
...
...
#region Protected Methods
protected override void CacheMetadata(CodeActivityMetadata metadata)
{
if (FirstNumber == null) metadata.AddValidationError(string.Format(Resources.ValidationValue_Error, nameof(FirstNumber)));
if (SecondNumber == null) metadata.AddValidationError(string.Format(Resources.ValidationValue_Error, nameof(SecondNumber)));
base.CacheMetadata(metadata);
}
...
Effect in UiPath Studio
All required input properties are added to the designer automatically. If any are left empty, a validation error is shown in the top-right corner of the activity.