Custom Activity and Calling another visual studio project

Hi,
I have created a custom activity, it gets three inputs from Uipath and in the execute function, I want to call another visual studio project. the second project gets the 3 inputs and do some processing. do you know how I can implement this?

Thanks

What do you have in your visual studio project?

Here is some test code for a TryParse activity I wrote. Perhaps this will help you?

[Theory]
[InlineData("64", (sbyte)64)]
public void SByte_ParseTest(string input, sbyte expected)
{
    var activity = new TryParse();

    var args = new Dictionary<string, object>
    {
        { nameof(TryParse.InputString), input },
        { nameof(TryParse.OutputType), expected.GetType() }
    };

    var parseSuccess = WorkflowInvoker.Invoke(activity, args, out var additionalOutputs, TimeSpan.FromSeconds(10));

    Assert.True(parseSuccess);
    Assert.Equal(expected, additionalOutputs[nameof(TryParse.ParseResult)]);
}

So you want to use this method inside uipath? the best would be to create a library and import as nuget package to your project.

1 Like

So you want to use this method inside UiPath? the best would be to create a library and import as nuget package to your project.

This is the most correct answer. Let UiPath do what it does best. If you absolutely need to execute your activity in code though (like the unit testing example above), then my code sample may provide some guidance.

Your best bet is to make your custom activity do one thing and only one thing. Then have UiPath string it all together into a process.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.