- Release Notes
- Overview
- Getting Started
- Marketplace Vendors
- Marketplace Customers
- Publishing Guidelines
- Publishing Guidelines for Ready-to-go Automations
- Publishing Guidelines for Solution Accelerators
- Publishing Guidelines for Integration Service Connectors
- Security & IP Protection
- Other UiPath Listings
- Node-RED
- Setup
- Teams
- Microsoft Teams Scope
- Create Team
- Create Team From Group
- Get Team
- Get Teams
- Channels
- Create Channel
- Delete Channel
- Get Channel
- Get Channels
- Update Channel
- Chats
- Get Chat
- Get Chats
- Get Chat Members
- Messages
- Get Message
- Get Messages
- Get Message Replies
- Reply To Message
- Send Message
- Events
- Create Event
- Delete Event
- Get Event
- Get Events
- Users
- Get User Presence
- How It Works
- Technical References
- Get Started
- About
- Setup
- Technical References
- Azure Form Recognizer Scope
- Activities
- Analyze Form
- Analyze Form Async
- Get Analyze Form Result
- Analyze Receipt
- Analyze Receipt Async
- Get Analyze Receipt Result
- Analyze Layout
- Analyze Layout Async
- Get Analyze Layout Result
- Train Model
- Get Models
- Get Model Keys
- Get Model Info
- Delete Model
- Connectors
- How to Create Activities
- Build Your Integration
The Simple Activity
Now that you have your package created, let's add an activity to it! In this example, you will create the activity shown above: a simple one that adds two numbers together.
Start by opening the Visual Studio solution created in the previous section and select any of the main projects (these are the ones labeled MyCompany.MyProduct...) in the Solution Explorer. Then navigate to Extensions > UiPath > Add Activities in the toolbar.
This will open a new Activity Creator window. The first screen gives you two options:
- Create: Build one or more activities from scratch.
- Import: Import a list of predefined activities that have been saved in a standard format.
For now, select Create.
Click the Add button and fill in each field as shown below. This will prepare the creator to build an activity named Addition. When ready, click the Edit button to add properties to the Addition activity.
This will open a new Define Properties window. Use the Add button to create 3 properties as shown below.
Ensure that the first two are inputs and the last is an output. These properties will represent two numbers and their sum.
Click OK on the Properties window and Finish on the activities window. You will then see some new files added to your projects.
Protected Methods
region within it to reveal the activity's ExecuteAsync
method. This is the method that gets called whenever the activity is run in UiPath Studio.
Notice that the two inputs created in step 4 (First Number and Second Number) as well as the one output (Sum) have already been added to this method. The final step is to bridge the gap between them by replacing the comment block with code that adds the two inputs and then sets the result to Sum. See below:
Within the Solution Explorer, right-click your solution and select Rebuild Solution. You now have a working activity package!
Successfully created package:
.
Open UiPath Studio and navigate to the Package Manager's Settings. From here, tell Studio to look for new packages in the output folder copied from above. Once you click Add, you'll be able to see your new activity and import it into future workflows.