Action is the building block of process automation. Zappy Task Editor comes with various built-in Template Actions. You can read The Zappy Activities Guide for more details and examples, additionally, you can create custom activities to better automate processes based on your requirements.
There are two major steps required to create a custom action:
Write your own code for custom action.
Add an external assembly (.dll or. nupkg) in Zappy Task Editor.
Note: Please note that the following component is required to create a custom action:
• Microsoft Visual Studio with .NET desktop development.
To better understand how to write code for a custom action, we are going to create one action which asks the user for a string and then displays it in the message box.
- Launch Microsoft Visual Studio.
- Click File- > New -> Project.
- Click on Visual C#. The list of all dependencies of C# will display. Select Class Library (.NET Framework) and then click OK.
- Give the name for your newly created project. You Must add “Zappy” before Project Name. In our case, Project name is “CustomAction” so we used “Zappy.CustomAction” as the name of this Project.
After you click on OK, you will get the code as shown below.
- In Solution Explore Click Project -> Add Reference -> Manage NuGet Packages….
- Search for the Zappy.SharedInterface, Install this Interface.
- Rename “Class.cs” according to your action behavior or keep it as it is, then inherits the “TemplateAction” as shown below.
- Write the code for your custom activity and Execute.
Please consider the sample code in the below code snippet.
- Add external assembly in “Zappy task editor”. You can do this in two ways.
A] Add Nuget package in the zappy task editor
1.Right click on Zappy Icon > Option > Nuget Manager
2. Click on Install **Nuget Package** button
3. Select the ***. nupkg** package which is recently created. 4. Launch Zappy task editor. custom activity is added at the end of all activities.
B] Add *.dll file in zappy task editor
1.Right click on *Zappy Icon -> Option -> Nuget Manager
2.Click on **Load Dll** Button
3. Select the ***.dll** file to load. 4. Launch zappy task editor. Activity is added at the end of all activities.
Updated about a year ago