So I’m not sure if I’m doing this incorrectly, or this just isn’t something supported with UiPath.
What I’m trying to do: Create a wrapper for all UiPath.System.Activities that accept a Dictionary<String, InArgument> so that we do not have to manually create those dictionaries in Studio, but can dynamically update them as the process develops. Currently, I’m only targetting Set Transaction Status and Add Log Fields.
I had difficulty in doing this and the steps below are for a Log Message activity.
- lmActivity = new UiPath.Core.Activities.AddLogFields()
- activityArguments = new Dictionary(Of String, Object)
- lmActivity.Message = new InArgument((object)(“Testing…”))
- activityArguments(“Message”) = new InArgument((object)(“Testing…”))
- lmActivity.Level = new InArgument(LogLevel.Info)
- activitiyArguments(“Level”) = LogLevel.Info
- result = WorkflowInvoker.Invoke(lmActivity, activityArguments) → Error Here
The error I keep getting is “Assign: Object reference not set to an instance of an object.”