M3 ideas


Home | Pages | Archives


Automating the Triggering of a Process Flow using M3 Field Audit Trail

December 7, 2011 5:20 pm

Vincent Tabone from Australia has come up with an innovative solution to trigger PFI flows from Field Audit Trail. Here below are Vincent’s screenshots and instructions.

 

  1. Create a Field Audit Trail (FAT) file as shown below.List which schema/file is on FAT:

    The FAT history file, which auto job is monitoring:

     

  2. Create an autojob.The autojob is to run as frequent as required (this is described on the following page). The autojob will determine if there are records ready to process and will trigger the process flow.
  3. Add Auto job in MNS051:

The source code for the autojob is not provided here.

Basically, Autojob will copy and delete the records from FAT file(if there is any) to work file(ZZCUWK) and then go through the records in work file to trigger PFI. The records in work file will also be deleted after trigger PFI. The source code contains the following:

The java code is for the autojob which contains the code to trigger the flow:

public void startPFITrigger() { 
    trigger.setFlow("M3CustomerAppV5");
    trigger.addVariable("LSOProfile","MAD");
    trigger.addVariable("Company", ZCUWK.getCONO());
    trigger.addVariable("CustomerNumber", ZCUWK.getCUNO());
    trigger.fire();
    KQLOG.I(trigger.getMessage());
}

You also need to have these in movex.properties:

user = mdir.getParameterString("app.pfi.user", "put value in movex.properties");
pwd = mdir.getParameterString("app.pfi.password", "put value in movex.properties");
enabled = mdir.getParameterString("app.pfi.enabled", "true").equalsIgnoreCase("true");

 

Special thanks to Vincent for sharing this solution!

Posted by thibaudatwork

Categories: Field Audit Trail (FAT), ProcessFlow Integrator (PFI)

Tags: ,

3 Responses to “Automating the Triggering of a Process Flow using M3 Field Audit Trail”

  1. […] There is also a solution to trigger FPI flows via Field Audit Trail. LD_AddCustomAttr("AdOpt", "1"); LD_AddCustomAttr("Origin", "other"); […]

    Like

    By Trigger PFI flows via EPC « M3 ideas on December 19, 2011 at 7:29 pm

  2. […] Field Audit Trail […]

    Like

    By Comparison of solutions to trigger PFI flows « M3 ideas on December 19, 2011 at 7:38 pm

  3. […] Automating the Triggering of a Process Flow using M3 Field Audit Trail […]

    Like

    By Site map – M3 ideas on May 9, 2017 at 12:22 pm

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.