How to create Custom Activities with VB.NET


#1

any body know some example VB.NET code to create custom activities?

The UiPath example is C#

Thanks


#2

Hello,

Here you are.

Imports System.Activities
Imports System.ComponentModel
Namespace SampleActivity
Public Class TestDoubleActivity
Inherits CodeActivity

    <Category("Input")>
    Public Property InputNumber As InArgument(Of Int32)

    <Category("Output")>
    Public Property OutputNumber As OutArgument(Of Int32)

    Protected Overrides Sub Execute(context As CodeActivityContext)
        Dim inputNumber As Int32
        Dim outputNumber As Int32
        inputNumber = Me.InputNumber.Get(context)
        outputNumber = inputNumber * 2
        Me.OutputNumber.Set(context, outputNumber)
    End Sub
End Class

End Namespace

Regards,


#3

Thanks


#4

Thanks,

Do you have some aditional information or documents related to custom activities deploy?


#5

Hi,

You can get some information about custom activity for Windows Workflow Foundation, in the internet. This will probably be a good reference for that because UiPath is based on it.

ex. https://docs.microsoft.com/en-us/dotnet/framework/windows-workflow-foundation/how-to-create-an-activity

Regards,


#6

Thanks,

it was very good