Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom task not showing #71

Closed
HasanHazzy opened this issue Mar 29, 2024 · 4 comments
Closed

Custom task not showing #71

HasanHazzy opened this issue Mar 29, 2024 · 4 comments

Comments

@HasanHazzy
Copy link

HasanHazzy commented Mar 29, 2024

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
Copy link
Owner

Are you on windows, linux or macos?

@HasanHazzy
Copy link
Author

I am on windows

@aelassas
Copy link
Owner

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

  • C:\Wexflow-netcore\Tasks or .\Wexflow.Server

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

  • C:\Wexflow-netcore\Tasks or .\Wexflow.Server

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:

  • string
  • int
  • bool
  • password
  • list
  • user

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants