Custom Activity
- Last UpdatedJul 26, 2023
- 1 minute read
Follow the steps below to create Custom activity in Quickflow:
-
Modify the action xml or add the new action xml and then add the Quickflow related information as shown below
<action name="Custom Action" supportforquickflow="true">
<quickflow>
<definitionProvider class="CustomAction.CustomActivityQuickflowDefinitionHandler" assembly="c:\CustomAction.dll" />
<runtimeHandler class="QuickflowCustomActivity.CustomActivity" assembly="c:\netcoreapp2.2\QuickflowCustomActivity.dll" />
</quickflow>
<description>Execute Custom Act</description>
<image resourcename="dummyaction.png" />
<handler classname="CustomAction.CustomActionHandler" assembly="bin\CustomAction.dll" />
<properties>
<property category="cat_configuration" name="CustomProp" displayname="Custom Property" type="string" helpstring="Build Property" mandatory="false" supportforquickflow="true"></property>
</properties>
<return>
<value helpstring="Set">Set</value>
<value helpstring="Not Set">Not Set</value>
</return>
</action>
-
Create a class library targeting .Net Framework 4.8 which can read all the activity related information from the database. In the above example, CustomAction.CustomActivityQuickflowDefinitionHandler is a class which creates the parameters needed for the execution.
-
Decorate the class with the attribute DefinitionHandler(). Make sure the name passed as the argument to this attribute is same as the name mentioned in the action xml.
-
Refer the following assemblies. These can be found in the GAC & in the installation path (Bin)
-
Skelta.Bpm.Actions.Core.dll
-
Skelta.Bpm.Quickflow.Bridge.dll
-
-
Provide the class name and the assembly path under the definitionProvider node.
-
Create a class library targeting .Net 6 which executes the activity. In the above example, QuickflowCustomActivity.CustomActivity is a class which executes the activity.
-
Refer the following assemblies. These can be found under the <InstallPath>\Web\Quickflow folder.
-
Skelta.Bpm.Actions.Core.dll
-
Skelta.Bpm.Quickflow.Interfaces.dll
-
Skelta.Bpm.QuickFlow.Logger.dll
-
-
Decorate the class with the attribute RuntimeHandler (). Make sure the name passed as the argument to this attribute is same as the name mentioned in the action xml.