Trigger PFI flows via EPC

As a reminder, there is a solution to trigger ProcessFlow Integrator (PFI) flows using External Program Connector (EPC) to avoid modifications to M3.

One traditional solution to trigger PFI flows from M3 is to make small modifications to the M3 Java source code with MAK. It only takes a few extra lines of code to trigger a PFI flow when an event happens in M3, for example when a new Customer is created in CRS610 or when an Item is changed in MMS001. But this solution is intrusive as it requires a modification to M3 which we strive to avoid to minimize maintenance.

Instead, we could use EPC. EPC is a reverse API where M3 sends XML messages to EPC on events such as Create, Change, and Copy. For that, we setup a Subscriber in EVS040, a Remote Server in EVS038, and a Subsystem Job in MNS051. Then we develop an EPC plugin in Java, outside of M3, to process the XML messages and to trigger the PFI flows. This new solution is non intrusive as it avoids modifications to the M3 source code. However, it requires the configuration of several M3 programs and the development of an EPC plugin in Java.

If anybody is interested in the EPC solution, please contact me for details.

Note: There is also a solution to trigger FPI flows via Field Audit Trail.

Published by


ex- M3 Technical Consultant

16 thoughts on “Trigger PFI flows via EPC”

  1. Hi Thibaud,

    I’d like to learn more about using java and epc. Can you suggest some resources please?

    I’d like to write a procedure to receive xml pushed from M3 if possible.




    1. Hi Martin, in the context of a project I can show you how to use EPC and Java. Know that EPC has been made obsolete by EventHub and EventAnalytics; I can show you that as well. Where are you located? I will be traveling soon. Send me an email. Check my contact info on


  2. Hi Thibaud,

    Do you have a blog related to Trigger IPA flows via M3 Java (MAK)?

    I would like ask for you help regarding the issue we are currently encountering.

    We created a trigger logic using cPFIAsyncTrigger2 in PPS200 via JAVA (MAK) and we also set up the M3BE properties (PFI properties).

    After we ran PPS200, we got an exception error below:
    “com.lawson.grid.proxy.ProxyException: Null Proxy for: com.lawson.bpm.eprocessserver.interfaces.TriggerFlow DataArea: ”

    The error occurred on the LPSSession.createGridSession(server,port,user,pwd,theDataArea) line.

    I am not sure how we got this error, we tried to solve this by updating the M3BE properties (app.PFI properties) but still not working.

    Maybe you have an idea on how to solve this problem.

    Apologies if I posted on this post.



    1. Kumusta Cyrillus,

      There is some documentation at this URL:

      And here is some old M3 Java code from 2007 which I do not know if it still works:

      import mvx.runtime.*;
      import mvx.db.dta.*;
      import mvx.dsp.common.GenericDSP;
      import mvx.dsp.obj.*;
      import mvx.util.*;
      public class CRS610 extends {
          public void PEUPD() {
              cPFIAsyncTrigger trigger = new cPFIAsyncTrigger(this);
              trigger.addVariable("message", CUSMA.getCUNO());


    2. I think the code you were trying to use is for triggering flows from within a grid application which is not your case, hence the failure. Instead, try the M3 code I just pasted above.


      1. Thanks for the reply Thibaud. Our client is currently using version 13.

        Unfortunately, the one you pasted above didn’t work as well.

        We only rely to this document from Infor and they are requiring us to configure the for the trigger to work and use cPFIAsyncTrigger2 instead of cPFIAsyncTrigger

        Here is the link:“M3″%20″m3″%20

        We are trying to fix this for more than 2 weeks now. 😦


  3. Hi Thibaud,

    Sorry for the confusion., Let me summarize it again.

    The createGridSession was implemented under cPFIAsyncTrigger2 via fire() function.

    Here is a snapshot of the logic we used in the program PPS200 (via java MAK)

    public cPFIAsyncTrigger2 PFItrigger = new cPFIAsyncTrigger2(this);

    //this is the code to trigger the flow
    PFItrigger.addVariable(“Company”, PHEAD.getCONO());
    PFItrigger.addVariable(“Division”, PHEAD.getDIVI());
    PFItrigger.addVariable(“Whouse”, PHEAD.getWHLO());;

    This is where there error occurred when we debugged the fire() function

    We tried the code you pasted above and during testing, we got the following error

    Here is our code
    public cPFIAsyncTrigger PFItrigger = new cPFIAsyncTrigger(this);

    //this is the code to trigger the flow
    PFItrigger.addVariable(“Company”, PHEAD.getCONO());
    PFItrigger.addVariable(“Division”, PHEAD.getDIVI());
    PFItrigger.addVariable(“Whouse”, PHEAD.getWHLO());;

    And here is the error

    java.lang.Exception: Error: Unable to lookup RMI object rmi://
    error during JRMP connection establishment; nested exception is:

    java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:



    1. Oh so the only difference in the two codes is the number 2? I don’t know. You can keep debugging the createGridSession and drill down (mostly decompiling) until you find the error, that will take some time, or create a Infor Xtreme incident, and wait for help.


    1. Karthick,

      I am not experienced with SSIS, but I should explain my thinking.

      There are only three known entry points to import/export M3 data:

      1) Direct to database with SQL offers the most flexibility to export data (SELECT FROM WHERE) from any table in any possible way, and is the fastest; but import (INSERT INTO, UPDATE, DELETE) is forbidden because of the risk of messing up M3.

      2) Direct to M3 Business Engine with M3 API offers guaranteed integrity of the data, i.e. M3 will protect itself and will reject invalid data; and it is bidirectional import/export; but it only covers a fraction of M3, i.e. there is not an API for everything in M3.

      3) Direct to M3 Business Engine with BCI is used by M3 Web Services (MWS) of type M3 Display Program (MDP); and it is also bidirectional import/export; but there is no client for it except MWS Designer which is not publicly programmable.

      4) I don’t remember if the user interface uses BCI or MEX.

      All other entry points are a derivative of those.

      In your case, your question is, given destination SSIS, what is the best M3 export strategy?

      I think SQL is the best because it is closer to SSIS than the other entry points, i.e. you can move data with SQL from M3 directly into SSIS; supposing M3 is also in SQL Server; and supposing you know the SQL queries to extract what you need; the query is not necessarily evident for joins and calculated values, in which case M3 API is preferable.

      Otherwise, use M3 API to export, and use SSIS to import.

      Otherwise, export with BCI (good luck!).

      Hope it helps,


      [edited for clarity]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s