IPD Designer - Custom Function

Sort:
You are not authorized to post a reply.
Author
Messages
Roger French
Veteran Member
Posts: 545
Veteran Member

    IPD Designer version 10.1.1.49

    Windows 2012, Landmark 10.x

    So I want to add a custom function to utilize in designer.

    I've added the custom code in pflow.js in \system\LPS

    I stopped/restarted all services in Landmark and LSF.

    Exited and logged back into Process Designer. I still can't see the custom function I just created in the drop down of any assignment node.

    I rechecked everything. Still the custom function doesn't appear.

    Yes, I'm using this in the header part of the pflow.js. I even added it to the plfow.js on the LSF server. Yes all of the actual code in the function is in the pflow.js, and it's been checked and verified.

    Anyone know why it's not appearing in IPD?

    Thank you in advance.

     

    //*****Function Definition -->String=TestingFunc(varString)                                                   //

    Bob Canham
    Veteran Member
    Posts: 217
    Veteran Member
      Hi Roger. Where is your IPD installed? In addition to putting the function on the server LPS directory, you have to put it in your IPD folder for the instance you're running (i.e. C:\IPDesigner\IPDPrd).

      Also, I would recommend adding functions to pflow_user.js rather than pflow.js. The pflow_user.js is meant for user defined functions and isn't overwritten when you install service packs.
      Roger French
      Veteran Member
      Posts: 545
      Veteran Member

        Hello, yes I'm aware of that using pflow_user.js. I am just doing some simple testing for now.

        Just an observation about a custom pflow.js. If it's to be copied to the local directory where IPD is installed, essentially that is saying that a custom function for server side processflow resides on a client side drive/directory. Correct? Not sure if that is actually correct, because shouldn't all code reside server side? Because obviously what happens to the function in the flow if the client side pflow_user.js or pflow.js function is removed from the client side? That would mean the function isn't available any longer. 

        Just as a test, I copied the pflow.js to the install dir on client side. Logged back into IPD and the custom function still doesn't appear.

         

        Bob Canham
        Veteran Member
        Posts: 217
        Veteran Member
          You have to have the file in both places. When it runs it uses the server side. But when you're developing, you're using the local version. To be honest, I haven't tried modifying the pflow.js in a long time, I switched to the pflow_user.js as soon as it became available so I don't know if there is some other gotcha with editing the system provided file.
          Bob Canham
          Veteran Member
          Posts: 217
          Veteran Member
            Just to verify, do you have multiple IPD instances on your client? I have 2, one for Prod and 1 for Test, so the custom function needs to be in both install directories.
            Roger French
            Veteran Member
            Posts: 545
            Veteran Member

              Nope, just one simple instance.

              I have it in both places client and server. Still doesn't appear.

              I'll open an incident. 

              Thanks.

              Woozy
              Veteran Member
              Posts: 709
              Veteran Member
                The biggest risk to modifying the pflow.js directly is that it could be overwritten through updates. Also, it makes it easy to identify your custom functions compared to the delivered functions. FYI - you can also use this to overload the existing functions if that is helpful to you.

                I've never had problems seeing the custom functions in IPA once the code is added to the pflow_user.js file, so it makes me think that Bob is right and that maybe your custom code isn't in the right folder. Just a guess though.
                Kelly Meade
                J. R. Simplot Company
                Boise, ID
                Tim Cochrane
                Veteran Member
                Posts: 154
                Veteran Member
                  Agree...check you've got it in the correct folder.

                  I just added a new function in C:/IPDesigner/CU56/pflow_user.js, went into my CU56 Designer install and I can see the new function. I keep multiple CUs loaded, and CU56 is where i'm currently working in
                  Tim Cochrane - Principal LM/IPA Consultant
                  Roger French
                  Veteran Member
                  Posts: 545
                  Veteran Member

                    I tried upgrading to CU52.

                    It's now appearing in the drop downs.

                    Thanks all, I guess it was an earlier version of IPD that wasn't working for me.

                     

                    David Williams
                    Veteran Member
                    Posts: 1127
                    Veteran Member
                      Your version of IPD must match your version of Landmark. Installing a different version will cause issues!
                      David Williams
                      John Henley
                      Senior Member
                      Posts: 3348
                      Senior Member
                        Double-check the syntax you are using the in pflow_user.js file.
                        In particular, in addition to the function itself, there needs to be a comment in the heading for each function definitions in order for IPD to show them correctly.
                        //*****Function Definition -->String=myCustomFunction()//
                        Thanks for using the LawsonGuru.com forums!
                        John
                        You are not authorized to post a reply.