Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Skipper
#830825
Hello everyone,

I have some processes that should send Data in different states to a REST API of our Ticket System.
This should happen also in more than one process. At the moment I solve this by using different triggers in every Task and in all the processes. But I want to define the code at one point of the System and use it as ooften as necessary.

Should I do it with a plugin (I'm very new to this)? Or is there a solution to develop and use the code in functions?
First I tried to use a "function" trigger and than a calling trigger. But this doesn't work for me when using script tasks :-(

What is the best solution?

Thanks a lot.
Kind regards
#830849
Hi,

If you want to use the same code on diferents processes, the most usefully is implements plugins, when the plugin is enabled you can call functions or classes from triggers.
The easiest way to call a function is adding to pmFunctions class, then you can call all functions that you created.

In the wiki have some examples:
https://wiki.processmaker.com/3.6/Plugin_Development#Custom_pmFunctions

The TG Casino clone script offers entrepreneurs a […]

Looking to launch your own cryptocurrency casino o[…]

Creating a non-fungible token is a range of betwee[…]

🚀 Immediate MaxAir 5.0 (V4) - Revolutionizing Cryp[…]