Hi @andrea-petrocchi I am not quite sure how aiida-workgraph works, but as far as aiida-shell goes, under the hood a ShellJob still uses a Code instance as the code input. The launch_shell_job utility function just has some convenience functionality that transforms a str command to a Code instance. But you can also just manually create the Code and then pass that to launch_shell_job, or to the ShellJob process class when launching it manually.
@Xing does wg.add_task support passing a literal Code instance as input for command for the ShellJob task?
In fact, aiida-workgraph follows similar functionality as the launch_shell_job utility function from aiida-shell to prepare ShellJob tasks. Therefore, it should support the same features as documented in aiida-shell.
Thank you both! I made some confusion, and yes in fact this was more an aiida-workgraph question rather than a aiida-shell one, but your answers clarified that.