aelassas / wexflow

.NET Workflow Engine and Automation Platform
https://wexflow.github.io
MIT License
554 stars 159 forks source link

Custom task not showing #71

Closed HasanHazzy closed 5 months ago

HasanHazzy commented 5 months ago

I am trying to make custom task for Net core wexflow 7.5.0 but it's not showing in manager. Or while running service.. i properly follow the steps of adding custom task in .net core wexflow please help!

aelassas commented 5 months ago

Are you on windows, linux or macos?

HasanHazzy commented 5 months ago

I am on windows

aelassas commented 5 months ago

Once you create your custom task Wexflow.Tasks.MyTask, place Wexflow.Tasks.MyTask.dll in:

If your custom task has referenced assemblies, you must copy them in:

To make your custom task MyTask appear in the available tasks in the designer, simply open the file C:\Wexflow-netcore\TasksNames.json and add MyTask in it as follows:

[
...
{ "Name": "MyTask", "Description": "MyTask description."},
]

You must also add the settings by opening the file C:\Wexflow-netcore\TasksSettings.json and adding your custom settings as follows:

{
...
"MyTask": [ {"Name": "settingName", "Required": true, "Type": "string", "List": [], "DefaultValue": ""} ],
}

The available types are:

user type refers to registered users in Wexflow.

If you choose list type, you have to set the available list options. Here is an example:

{
...
"MyTask": [ {"Name": "protocol", "Required": true, "Type": "list", "List": ["ftp", "ftps", "sftp"], "DefaultValue": ""} ],
}

That's it. MyTask will show up in the designer and when selected its settings will show up as well.

Restart wexflow server and create a workflow with your custom task MyTask from the designer and run it to make sure that everything is working fine. If you face any issue checkout the logs from the backend or .\Wexflow.Server\Wexflow.log.

For further information, refer to the documentation on custom tasks.

HasanHazzy commented 5 months ago

Thank's Alot it's working i was confuse with that workflow.xml