Posts

Best Practice to Load File into IPA

The Data Iterator node is commonly used to loop through records but it can also read a file into IPA. (For more on the Data Iterator Node, visit: https://www.nogalis.com/2017/05/04/ip-designer-series-the-data-iterator-node/)

Based on the responses of seasoned IPA developers on the Infor/Lawson forums, the best way to ‘load’ in a file to an IPA flow is to use a FileAccess node followed by a DataIterator node. This speeds up the flow considerably as the FileAccess node would read the file into memory and then the DataIterator node can use the data from the memory instead of reading and closing the file multiple times.

First ‘load’ or ‘read’ the file into IPA using the FileAccess node. Then set DataIterator to process the Data (and not File) and set the source to be the FileAccess_outputData. This should noticeably improve the performance of the flow as the data is just being loaded into memory once by the FileAccess.

 

IPA – LSF Server Configuration Recommendations from Infor

Infor Process Automation should be configured correctly to ensure proper functioning of other Lawson System Applications. Here are the official best practice IPA-LSF Server Configuration recommendations directly from Infor. (KB 1946828)

Recommended Configurations

  1. JT-973173

    This JT resolves a memory leak issue in the Event Manager Java Process. Not having this JT means the Event Manager Java Process will slowly grow in size and if left unchecked, can consume all RAM and even crash the LSF Server.

  2. Remove lpsMaxHeap=XXXXX and lpsMinHeap=XXXXX from LAWDIR/system/bpm.properties

    These settings are only required when using JNI.

  3. Set useLPSBridgeSocket=true in LAWDIR/system/bpm.properties

    NOTE: The use of the LPS Bridge Socket connection means LSF batch/online programs will no longer initialize a JVM, it will simply make a socket connection to the Event Manager process to make the request.

  4. Set Windows pagefile on LSF server to 32 GB

 

Additional Recommendations for Infor Cloud Clients

  • Verify and ensure that lpsHost=inforbclm01.inforbc.com
  • NOTE: If this setting is not pointed at the internal domain, a grid session memory leak can occur in Event Manager on the LSF server
  • NOTE: Changes to this file should be made by executing pfserv config lps and they require a restart of LSF Process Flow and LSF Web Application Servers.

Additional Recommendations for LSF on LINUX

  • Ensure LSF JT-875069 is applied to the LSF system
  • Add “useLPSLocalServices=true” to LAWDIR/system/bpm.properties
  • Follow KB 1936921 which has two process definitions files used for synchronizing services from IPA/Landmark to LSF
  • In the GEN data area of the Landmark Rich Client, navigate to ConfigurationParameter BusinessClass and add: Component=ipa, Name=useRMIWebServlet, Value=true
  • Configure LSF to look at IPA Services in the LOGAN database instead of connecting to IPA. This requires LSF JT-875069 which allows you to add “useLPSLocalServices=true” in bpm.properties. This also requires the use of a ServiceSyncFlow to move the services from IPA to LSF. To implement this procedure, please follow instructions on KB 1936921.

Setting Up LSF Java User Permissions for IPA

When working with Infor Process Automation (IPA), code or programs can be executed remotely on the Lawson System Foundation Server through these four nodes:

  1. System Command Node
  2. File Access Node
  3. Resource Query Node
  4. Resource Update Node

These nodes work by making a connection (via RMI call) to a java.exe process running on the Lawson System Foundation Server. Therefore, it is vital that the process owner has the proper access to run these commands.

Follow the instructions below to configure your LSF system so these processes will be owned by a user that has the necessary access:

  1. Create two files (pfrmi.cfg and pfem.cfg) in %LAWDIR%/system directory. The next time the process flow is restarted, the java.exe process will refer to these files to specify which user will start the java.
  2. Both files should be identical and have just two lines each:
    line 1: LAWSONUID DOMAIN\accountname
    line 2: 

LAWSONUID DOMAIN should be replaced with your own domain and accountname should be replaced with your own account name. This is the user you are designating to run the java command. This user needs to have the proper access to run those commands. This domain/accountname combo needs to be a valid user defined in the LSF Environment Service Identity.

The second line needs to be a blank line. (Only if LSF system is running on Windows. No blank second line needed for UNIX)

line 1/line 2 are there to show you the line numbers. The actual words “line 1” and “line 2” should not be in the files.

Creating custom IPA triggers using 4GL

With Infor Process Automation, there are several ways to trigger a Process. This article will discuss how to trigger a custom process using 4GL.

First, create your Process. Test it and upload it to the Process Server.

Next, in IPA Rich Client (or the LPA Admin tool), you must create a Service Definition (Process Server Administrator > Administration > Scheduling > By Service Definition) and attach a Process to it. There, you will configure any variables that should be passed to the process.

creating-custom-ipa-triggers-using-4gl

Now, let’s create the trigger in the 4GL program. This will be either a custom program your organization has created, or an existing Lawson form.

The first step is to initialize the WF SERVICE.

INITIALIZE WFAPI-INPUT

INITIALIZE WFAPI-OUTPUT

MOVE <serviceNameString> TO WFAPI-I-SERVICE

PERFORM 1000-WF-SERVICE

***Verify that the return code != 0 (anything other than 0 indicates error)

IF (WFAPI-O-RETURN-CODE NOT = ZEROS)

GO TO 600-END

Next, create the Work Unit

MOVE WFAPI-O-SERVICE TO WFAPI-I-SERVICE

MOVE <workTitleString> to WFAPI-I-WORK-TITLE

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-CREATE-SETUP

Now, populate your variables. You can have an unlimited number of variables per Service Definition, but you must populate them in groups of 10 (i.e. perform the 1000-WF-ADD-VAR-SETUP for each group of 10)

INITIALIZE WFAPI-INPUT

MOVE WFAPI-O-WORKUNIT TO WFAPI-I-WORKUNIT

MOVE “company” TO WFAPI-I-VARIABLE-NAME (1)

MOVE HR11F1-EMP-COMPANY TO WFAPI-I-VARIABLE-VAL (1)

MOVE “I” TO WFAPI-I-VARIABLE-TYPE (1)

MOVE “employee” TO WFAPI-I-VARIABLE-NAME (2)

MOVE HR11F1-EMP-EMPLOYEE TO WFAPI-I-VARIABLE-VAL (2)

MOVE “I” TO WFAPI-I-VARIABLE-TYPE (2)

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-ADD-VAR-SETUP

Finally, release the Work Unit

INITIALIZE WFAPI-INPUT

MOVE WFAPI-O-WORKUNIT TO WFAPI-I-WORKUNIT

INITIALIZE WFAPI-OUTPUT

PERFORM 1000-WF-RELEASE-SETUP

Scheduling a Process in IPA

Upload Your Process from IP Designer

  1. Log into IP Designer
  2. Create a new process
  3. Upload the process to your server by clicking the up arrow icon Scheduling a Process in IPA-1, or by clicking:
    1. Tools > Manage Processes > Select Open ProcessScheduling a Process in IPA-2Scheduling a Process in IPA-3
    1. Choose the process you wish to upload, then click OKScheduling a Process in IPA-4
    1. The process now appears in the list. Click “Upload”.Scheduling a Process in IPA-5

Create a Trigger in Rich Client

Now that your process is uploaded to the IPA system, it is time to create a trigger for the process. Once you have created your trigger, you will be able to:

  • Run the process manually
  • Schedule the process
  • Configure the process as part of a File Channel
  • Trigger the process from a Lawson S3 screen
  1. Log into Rich Client
  2. From the Start menu, navigate to Applications > Process Server Administrator > Scheduling > By Process DefinitionScheduling a Process in IPA-6
  1. Click Actions > Create, or click the “blank sheet” icon Run A Process-6Scheduling a Process in IPA-7
  1. Fill in the Process Trigger informationScheduling a Process in IPA-8
    1. Process Name – Click the arrow to search for your newly-uploaded process
    2. Work Title – Important: this field does not appear to be required, but if you do not fill it out, you will receive an error in the scheduler, and the flow will not run

5. Click Save Create a File Channel in IPA-7

6. Once you click Save, you will have an opportunity to add variables that need to be passed into the flow

Scheduling a Process in IPA-9

Run the Process Manually

There may be occasions where you need to run a process ad-hoc. Once you have created your trigger, you will be able to do this.

  1. Log into Rich Client
  2. From the Start menu, navigate to Applications > Process Server Administrator > Scheduling > By Process DefinitionScheduling a Process in IPA-6
  1. Find your Process in the Process Triggers list
  2. Right-click and select Start, or highlight the flow, and select Actions > StartScheduling a Process in IPA-10Scheduling a Process in IPA-7
  1. The process will begin running, and a work unit will generate
  2. To check the status of your process, navigate to Start > Applications > Administration > Workunits > WorkunitsScheduling a Process in IPA-11
  1. Double-click on the workunit to see the resultScheduling a Process in IPA-12

Schedule the Process

  1. Log into Rich Client
  2. From the Start menu, navigate to Applications > Process Server Administrator > Scheduling > By Process DefinitionScheduling a Process in IPA-14
  1. Find your Process in the Process Triggers list
  2. Right-click and select Schedule, or highlight the flow, and select Actions > ScheduleScheduling a Process in IPA-10Scheduling a Process in IPA-7
  1. Fill in the schedule propertiesScheduling a Process in IPA-13
  1. Click Next
  2. Enter the time and date informationScheduling a Process in IPA-15
  1. Click next
  2. Click FinishScheduling a Process in IPA-16
  1. To view or update your schedule, navigate to Start > Applications > Process Server Administrator > My Actions > My Scheduled ActionsScheduling a Process in IPA-17