infor.com
concierge
infor u
developer portal
Home
Groups
Process Automation (IPA) Community
pflow.js
jacob-jellison
After adding a custom function in pflow.js
what else has to be done?
I stopped and restarted pfem, pfsch, pfrmi, pfbpm but function not showing up in drop-down list?
//*****Function Definition -->String=lowerCase(varString) //
/*******************************************************
Function: lowerCase(str)
Purpose: Lower case a string variable
*******************************************************/
function lowerCase(str)
{
return str.toLowerCase()
}
Find more posts tagged with
Comments
Legacy Contributor
Any update to pflow.js by users will get overwritten during product update. Add the function to pflow_user.js and drop it in the designer install directory and give it a try. Make sure to add the function definition and the function like you mentioned above. Let us know if this doesn't work.
jacob-jellison
So...on the server copy pflow.js to pflow_user.js and add my new function to the new file and then do the same on the client side?
Thanks.
Legacy Contributor
Don't duplicate all the functions from pflow.js; just create a new file named 'pflow_user.js' and follow the format of pflow.js. If you follow format of the Infor provided file, then your custom functions will appear in the same dropdown menus as the others. Be sure to put a the new pflow_user.js on your local machine and on the server; just like pflow.js.
Legacy Contributor
Also, after you add the custom file you don't even need to restart process flow. Simply adding the files to those directories will make them instantly available to the designer client (local file) and to process flow (server file).
jacob-jellison
Got it. Thank you very much!
Legacy Contributor
The pflow_user.js file is the "user javascript library" for PFI/IPA and is in addition to pflow.js. You don't need to (and shouldn't) copy pflow.js into pflow_user.js - other than maybe the framework, because functions named the same in both files will use the pflow_user.js version. Note that this allows users to "extend" the pflow.js functions by creating functions with the same name in pflow_user.js.
In my experience, pflow_user.js changes are effective immediately without requiring a restart of any services, but my experience is mostly on IPA. Be sure the pflow_user.js file is in the same folder as pflow.js and that the rights are the same.
Did you only add the new function to pflow.js on the server, or did you add them to the designer client as well? If you want to see the functions in the designer, then you need to add the pflow_user.js file to the designer client as well, alongside the pflow.js file (on my machine it is in C:Program Files (x86)Lawson SoftwareProcessFlow901). The designer does not fetch these functions from the server.
I hope this helps.
russel-cornelson
Hello from Inforum 2014!
I saw the question asked here, but it looks like this topic has been thoroughly covered. Thank you guys for your questions, and the great responses!
Important Links
Community Hubs
Discussion Forums
Groups
Community News
Popular Tags
ION Connect
ION API Gateway
ION Workflow
Syteline Development
CPQ Discussion Ask a Colleague
Infor Data Fabric
Infor Document Management (IDM)
LN Development
API Usage
FAQs, How-To, and Best Practices