Activity SDK overview
What the Activity SDK contains, how a custom activity package reaches Studio and Robots, and when to write one.
The Activity SDK lets you write your own activities in C# and ship them as an activity package: a NuGet package that Studio shows in its toolbox and that Robots load to run your workflows. A package built with the SDK installs, appears in the toolbox, runs and restores offline with no change to Studio or the Robot. What is in the SDK# The SDK is four NuGet packages. All four are MIT licensed (see Licensing). Package What it gives you Who references it Velophex.Workflow.Sdk The runtime API: activity base classes, arguments, the activity context, the metadata and design attributes, and ActivityTestHost for unit tests Your runtime project and its test project Velophex.Studio.Sdk The design-time API: custom property editors, custom card bodies and design-time data providers (dropdowns filled from the Orchestrator). Most packages never need it. An optional design project VeloPhex.ActivityPackage.Templates The dotnet new velophex-activity project template Installed once on your machine VeloPhex.ActivityPackage.Build The packaging build: stages the package, checks icons, licence and release notes, and generates the activity manifest and design document when you run dotnet pack Your package project How an activity package works# You write activity classes in a runtime project that references only Velophex.Workflow.Sdk (plus any third-party libraries you need), and describe each activity with attributes: its permanent type id, toolbox name, category, icon, arguments and behavior. dotnet pack builds the package project. The build reads your compiled assembly's metadata, without running your activities, and writes two files into the package: velophex/activity-manifest.json (what the package contains) and velophex/activity-design.json (how Studio presents it). The manifest lists the size and SHA-512 hash of every file in the package. Studio reads the manifest and design document to fill the toolbox, the activity cards and the Properties panel. Studio never loads your runtime assembly into its own process. When a workflow runs, from Studio or as a job on a Robot, the workflow executor restores the package, verifies its hashes and loads the runtime assembly. TextCopyContoso.Invoices.Activities.1.0.0.nupkg lib/net10.0/Contoso.Invoices.Activities.dll your activities (what the executor loads) design/net10.0/... optional: Studio editors and data providers icons/package.svg the package logo icons/<key>.svg one icon per icon key your activities use resources/<culture>.json optional: translations velophex/activity-manifest.json generated by dotnet pack velophex/activity-design.json generated by dotnet pack LICENSE.txt, README.md When to write a custom activity# You need Use Reusable steps that wrap a system's API or a .NET library, used across many automations, with their own toolbox entries, icons and properties An activity package (this SDK) Reusable workflow logic built from existing activities, without writing code A workflow library: a Studio project whose entry points become activities. See Use a library in another project. A whole automation written in Python The Python SDK. See Python SDK overview. A short piece of code inside one workflow The built-in Invoke Code activity. See Activities that need no package. Activities run with the executor's rightsAn activity is ordinary .NET code. It runs in the workflow executor process with that process's permissions, and the capabilities it declares are a consent signal for the people who install it, not a sandbox. Treat an activity package like any other code you deploy to your Robots. Where to go next# Set up your environment: the .NET SDK, the template and the NuGet sources. Create an activity package: generate the projects and pack them once. Write activities and, for live sessions such as a connection or a browser, Scopes. Design-time experience: how your activities look in Studio. Test activities. Package, version and sign, then Publish and install. Look things up in the Reference, The activity manifest and Troubleshooting.
What is in the SDK
How an activity package works
When to write a custom activity
Where to go next