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.
User avatar
By amosbatto
#816041
If you want to create a custom trigger, then click on the "Create" button, instead of the "Wizard" button:
createNewTrigger.png
createNewTrigger.png (34.74 KiB) Viewed 4343 times
Then, you can enter your own PHP code. Read the documentation on Triggers.

If you really want to add a new trigger wizard, then you will have to create a plugin to do that with a custom class.pmFunctions.php file.
See: https://wiki.processmaker.com/3.0/Plugi ... mFunctions

For an example, see my extraFunctions plugin:
https://sourceforge.net/p/pmcommunity/c ... Functions/
User avatar
By amosbatto
#816125
You should create a new plugin as explained in the wiki.
Then, look at the extraFunctions/classes/class.pmFunctions.php file to understand the format to add new functions to the trigger wizard.
User avatar
By amosbatto
#816190
To add a icon, copy an image file to the workflow/engine/plugins/extraFunctions/public_html/ directory. If using a Linux system, make sure that the file is readable by all users. For example:
workflow/engine/plugins/extraFunctions/public_html/Audit.png

Then, edit the workflow/engine/plugins/extraFunctions/classes/class.pmFunctions.php file and set the header like this:
Code: Select all
/**
 * Extra Functions
 * @class extraFunctions
 *
 * @name Extra Functions
 * @icon /plugin/extraFunctions/Audit.png
 * @className class.extraFunctions.pmFunctions.php
 */
Now the icon will appear next to the plugin's name in Trigger wizard:
iconForExtraFunctionsPlugin.png
iconForExtraFunctionsPlugin.png (7.66 KiB) Viewed 4038 times

Note: Any files that you add to your plugin's public_html folder will accessible from the following URL in the web:
http:/{processmaker-ip-or-domain}/plugin/{plugin-name}/{path-to-file-in-public_html}
For example:
Code: Select all
http://processmaker.example.com/plugin/extraFunctions/Audit.png
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]