AutoRegister Attribute Glossary
  • 03 Jun 2022
  • 1 Minute to read
  • Dark
    Light

AutoRegister Attribute Glossary

  • Dark
    Light

Article Summary

Overview

Attributes dictate where the code should live in Decisions, whether it should be in the Flow Steps toolbox, the Rule Verb toolbox, or both if the code allows.

Add to MethodsDescription
AutoRegisterMethod
A single method class file is added to the Flow Step toolbox.
AutoRegisterMethodAsRuleStep
A single method class file is added to the Rule Verb toolbox.
ExcludeMethodOnAutoRegister
Prevents a method from being available if using a class-level attribute.
Class Level Attributes (Do not use if implementing ASync or IASync)
Description
AutoRegisterMethodsOnClass (Flow Steps Only)
Adds every method to the Flow Step toolbox.
AutoRegisterMethodsAsRuleSteps (Add Rule Parts)
Adds every method to the Rule Verb toolbox.
Class Level Attributes (Use if implementing ASync or IASync)
Description
AutoRegisterStep
Adds every method to the Flow Step toolbox.
AutoRegisterRuleStep
Adds every method to the Rule Verb toolbox.
Properties
Description

ShapeImageAndColorProvider

Sets shape, image, and color properties for Flow Steps


The AutoRegisterMethodsOnClass attribute is used for a simple Flow step. In the below code snippet, Hello will translate to Aloha when used in Decisions.

The Flow Step Category is the name given after the AutoRegisterMethodsOnClass attribute.


namespace SDK_Doc_Example
{
    [AutoRegisterMethodsOnClass(true, "SDKExampleStep")]
    
    public class SDKExampleStep
    {
    public string TranslateText(string Text)
    {
        if (Text == "Hello")
        {
            return "Aloha";
        }
        return Text;
        }
    }
}




Was this article helpful?