According to https://processmaker.gitbook.io/processmaker-release-notes/v/processmaker-4.1/processmaker-4.1.18-release-notes/core-4.1.18-product-versions Script Executor for Python: Version 1.0.0 is part of the open source version :)
I have open source processmaker setup and working. But no python executor. under packages installed I can see various things including Processmaker/docker-executor-node and Processmaker/docker-executor-php.
I don't know what these are. I have visited github and I can seacrh for executors: https://github.com/ProcessMaker?q=docker-executor&type=all&language=&sort=
That shows a few but not python. I don't know how to install packages, I am just guessing but I reviewed this page: https://developers.processmaker.com/packages/the-package-skeleton
and based on this I made an educated guess and added the following to my docker build file:
RUN composer require processmaker/docker-executor-python --ignore-platform-reqs
RUN php artisan package-skeleton:install
Seems reasonable. This errors though:
In PackageDiscoveryTrait.php line 376:
Could not find a matching version of package processmaker/docker-executor-p
ython. Check the package spelling, your version constraint and that the pac
kage is available in a stability which matches your minimum-stability (dev)
So I know python is open source but I don't know the exact name of the package that I need to install to activate it. I also don't know if my method is correct.
I have not been able to find any pointers in the Processmaker docs on this. Can anyone help me?
I have not found the answer to this question but I have spent the weekend creating a workaround.
I built my own python executor for process maker and put it in github. I worked out how to publish it on https://packagist.org/.
I added the following to the end of my process maker docker image build command:
This successfully imported it and when I was running I could go to Admin->Script executors and build the python docker image. I could then create the script and run it! I tried to make the script compatible with the comment that is automatically produced when you create new blank script, but it isn't fully implemented.
Adding the rest of the implementation should be easy and it's nice because now I can control the version of python that I am using.
Whilst doing this I learnt that process maker isn't built so that you can just add any languages as plugins. The default prompt isn't determined by my addin, rather it is calculated here: https://github.com/ProcessMaker/processmaker/blob/8459de8b703f69e14f399bce9239460243affe5c/resources/js/processes/scripts/customFilters.js#L127
It's a shame we can't add languages without altering the processmaker source code. I was going to add my own version of python, and there are other languages it would be nice to have.