How to Resolve Workunits Sitting in Ready Status

Problem: Workunits for Infor Process Automation are sitting in Ready Status and not processing.

1.  Via LmrkGrid (Grid Management), determine how many workunits may simultaneously process in your system. (see attached “DeterminingSimultaneous.docx”)

  1. Determine how many workunits are currently in a processing state.

NOTE:  Please refer to attachment “DeterminingSimultaneous.docx” for instructions on determining simultaneous processes.  In case you will need to engage support, you should screenshot this information to provide when you open the support incident.


– Command to count records in Ready Status:  dbcount <DATAAREA> -f Status=\”1\” PfiWorkunit

– Command to count records in Processing Status:  dbcount <DATAAREA> -f Status=\”2\” PfiWorkunit

– Command to count records in Completed Status:  dbcount <DATAAREA> -f Status=\”4\” PfiWorkunit


It is a good idea to monitor and take counts of these records periodically. Are the number of workunits in Ready status growing? Are the number of workunits in Completed status growing? Is the number of workunits in Processing status equal to the maximum number workunits that can simultaneously process?

NOTE: If the number of workunits in Ready Status is growing and the number of workunits in completed status is not, then either:

  1. You have workunits that processing for a very long time holding up the system; use the Grid Management UI to determine which workunits are processing so long and determine if those are stuck in a loop; or if they are just processing normally large jobs. Consider cancelling the long running workunits, and scheduling them to run in off business hours.
  2. If you are on Landmark 10.1.0.x, there was a bug in this version of Landmark that periodically caused Async to stop picking up new workunits. This issue was resolved by a re-write of Asnyc and LPA nodes in 10.1.1.x Landmark versions. If you are on Landmark 10.1.0.x you should restart the Async Node, and the IPA node.

NOTE: The workunits that were already queued to an LPA node will not automatically start back up;  the workunit polling frequency (default 30 minutes) will need to trigger before they are requeued to a new LPA node.

Schedule a ProcessFlow to Run Every Other Week

You can schedule your ProcessFlow to run on a weekly schedule by using the ProcessFlow scheduler. Recently, a client had asked if there was a way to schedule it bi-weekly. Great news – there is a way, and it’s easy to set up.

In Rich Client, Start -> Applications -> My Actions -> My Scheduled Actions -> Double click action you wish to modify

In this next screen, scroll down to Scheduling Details and click on Week Number

In order to schedule a process to run biweekly, you would want to use Even Weeks in the “Select Week Number” field and specify the day you want it to run (in this case, Monday)

Now you can have your ProcessFlow running every other week.


For a step-by-step guide to Scheduling a Process in IPA, check out this related article: Scheduling a Process in IPA

Troubleshooting: Rich Client workunit log too large to extract

Depending on the process run, Rich Client workunit logs can grow extremely large. So large in fact that you may not be able to extract the full log from the Landmark Rich Client.

If a workunit log grows too large you may not be able to extract the full log from the Landmark Rich Client,  in this case you can use the following command to extract the log from a Landmark Command Prompt.

What Is the Landmark Command Prompt?
The Landmark administrator will perform many tasks from a command prompt. When you are instructed to use a Landmark command prompt, you should be sure you are in the Landmark Environment that you want to use, and that all environment variables are set correctly.

Setting Environment Variables
Before you startBefore you perform this procedure, be sure that the /etc/lawson/environment/environmentName/ file contains the appropriate settings for environment variables.


Use this procedure to export the appropriate environment variables for your Landmark Environment before issuing commands from a Landmark command prompt.

To set the Landmark Environment variables

At a command prompt, type

. cv landmark-env-name

Where landmark-env-name is the name of the Landmark Environment.


dbexport -C -f “PfiWorkunit=####” -o . -n <dataarea> PfiWorkunit


dbexport -C -f “PfiWorkunit=7000” -o . -n prod PfiWorkunit

IPA Sample Flows and Scripts

Infor KB article 1667935 offers a list of sample flows and scripts used to carry out certain needs in Lawson.

Download Sample Flows Scripts


During the course of providing support for Infor Process Automation, I periodically find the need to create a process flow or short script to satisfy some need that I have. This KB article is a place you can look for some example flows and scripts. The content here is built as examples of techniques and are not intended for executing within a Production environment without modification. – (perl script)

This perl script accepts a file as input, such as a workunit.log that is too large to open in a text editor, and breaks it into smaller pieces. Execute from a command window:

C:\>perl -f C:\folder\filename.ext -n 100000


This would create new files C:\folder\filename1.ext, C:\folder\filename2.ext each with 100,000 lines. – (perl script)

This perl script is used for determining where a process flow is spending all of it’s time processing. It is packaged in a zip file, when unzipping this the should be inside of a folder that contains a /lib folder which contains a required perl module. To run the perl script save off a workunit log that was captured at “Workunit Only” log level. Then from a command window, cd to the directory where exists and execute:

perl -f C:\folder\workunit.log


This will create two csv files, one being a report of where the flow spent all of it’s time.



This is a sample process flow which provides three examples that achieve the same result. The first technique stores all data in a message builder node, then writes to a file once. This technique is only possible if the process flow does not stop at a user action node or wait node, which would wipe current variable values. The second example makes a write to append the file once per record returned. I recommend avoiding this strategy as there is overhead to opening a file, writing, and closing the file repeatedly. The third example shows how to store data for X records, then periodically writing the data to a file. This is the recommended technique as it minimizes the memory footprint stored in memory, and eliminates the need to write to the file for every record.



This sample flow makes use of SQL Server’s Database utility to obtain a CSV file directly from the database. A technique like this can save significant resources and time to build a csv file from within a flow. The command we run is:


Microsoft sqlcmd utility documentation:

TIP: Adding -E, instead of -U -P, will cause the command to use a trusted connection and pass windows credentials to the database. Running this command from within a flow means the command is actually going to execute as the user that Landmark is running as. It will pass those credentials to the Database, if you add a Windows Authentication login for that user you won’t have to pass the user and password in plain text from a process flow.


TIP: The -h flag can be used to eliminate header row (-h -1) would be no headers. (-h 100) would print the headers every 100 rows of data.



Periodically we see a flow that is deemed critical to the business, and there are also a few less important process flows that can take alot of time to run. In this scenario it is possible to trigger several less important flows that will occupy all available workunit threads. This causes important flows to wait for an available thread to process on. This is a sample of a technique that you could use to limit the number of less important flows that can run at the same time.


The flow is a simple Landmark transaction to count how many workunits with the same name are currently processing. If that number is higher than the value we set, the flow will wait for a few minutes then get another count. We are leveraging the wait node, which parks the workunit and makes its workunit thread available to other flows.


IPABP-JobSubmit and IPABP-JobWait

NOTE: Due to a bug in Landmark Runtime Environment, you must be above Landmark for this flow to work


Lawson System Foundation deprecated the old cgi-lawson/jobrun.exe command in LSF10, and replaced all these cgi executables with lawson-ios/action servlets. I developed this example flow as a way to submit a job and have process automation wait for the job to finish before moving on. The benefit of this technique is it does not consume a workunit thread while the job is executing in LSF.


It works like this: You have a main flow (IPABP-JobSubmit) which uses a trigger node to launch IPABP-JobWait. When it triggers the JobWait flow it passes all the information that is required to execute the job, then JobSubmit immediately goes to a User Action node which drops it from processing and returns the workunit thread. JobWait submits the job then cycles through a WAIT node, periodically checking on the status of the job. When the job completes, JobWait will take an action on the Job Submit which wakes that flow up to continue processing.



Before we found the performance improvements of using the Java Interpreter available in Landmark there were times we needed to have some large running flows execute faster. This flow is an example where a S3 Query returned alot of records and we needed to perform another action for every single record that was returned. To improve the processing time we broke this up so that the S3 Query was executed simultaneously in multiple workunits, instead of a single workunit.


This sample collects a set of KEYS for the table we are querying inside LSF; then triggers a new workunit to handle that group of records.


IPABP-BackDatedProxyUserApproval & IPABP-ResetWorkunitsForNewProxies

In Infor Process Automation 10.1.1.x we introduced some new features. One of the new features is the concept of creating a Proxy User; this allows a Process Flow Approver to create a proxy that grants another user access to fill in for them while they are away. When this feature was developed, to avoid problems with pre-existing code we could not safely grant the proxy user access to pre-existing work items.


So if a user is assigned 2 work items on Wednesday, then sets up a proxy for another user to cover for them. Even if you back date the proxy access to Tuesday, the new proxy user will not see the items created Wednesday. So I came up with the following concept:

  1. If I can design my approval flow with this limitation in mind, I can have an action on every User Action node that simply leaves the current UserAction node then comes right back to the same UserAction
  2. I can design another flow to find all workunits that are waiting on a useraction, and have that flow execute this special action which would cause those flows to leave the current UA and return

Why? Because this means after I create a proxy I can run my Proxy Reset flow to have a flow leave and return thus creating new Work Items which would include the new proxy user.


The method I am describing works, but it make not be for everyone. In this instance I am stealing the Timeout action so that regular users can not see my “Reset Action”, but if you already use a timeout addition modification to this concept would likely be required.



There have been several times where I have encountered a client looking to simply build a HTML content display exec to show a header record, and all detail lines. Like REQHEADER and REQDETAIL, however since the database is limited to 2048 characters for a string variable. If the flow has multiple levels of approval, after the flow stops at the first variable, the perfectly built HTML is now truncated down to 2048.


NOTE: If you trigger your flow from a File Channel, the Input Data variable is already populated and this approach won’t work for you. Essentially this flow builds the HTML, then makes a Landmark Transaction to create a PfiWorkunitInputData record to store the HTML, then the flow uses a short term wait node. The purpose of the wait node is so that when the workunit restarts it loads PfiWorkunitInputData into the variable where it can now be used anywhere else in the flow.


IPABP-LogLevelAdjuster (Windows Landmark)

This process flow is designed to update all Process Flow Definitions,  it sets the Workunit log level to “Workunit Only,  it sets the CancelCheckFrequency to “Intermittent @ 30 seconds”, it disables CaptureActivityStartandEnd times.   For efficiency sake this is the recommended settings for running a flow inside of a Production environment unless you are specifically troubleshooting an issue with the flow.


NOTE:   This flow contains 2 variables in the start node that must be updated before implementing it.   The “BaseLmrkDir” variable needs to be pointed to the absolute path of the Landmark directory where the “enter.cmd” command resides.  You must also use \\ instead of \ as we are storing the directory in a javascript string.   For example:   D:\\lmrkprod  if there are two directories be sure to use double backslashes for all directories  D:\\Landmark\\prod.


Also, you should modify the email address to your own email address.


UNIX – You should be able to modify this flow fairly easy to work for UNIX as well.   You simply need to modify the system command node so that it can run a landmark command.   cd /landmarkdirectory && && listdataareas.  Everything else is landmark based.

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:

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/

    These settings are only required when using JNI.

  3. Set useLPSBridgeSocket=true in LAWDIR/system/

    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
  • 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/
  • 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 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.

Infor Knowledge Base (KB) and Documentation Search Tips and Tricks

Troubleshooting Infor/Lawson issues can be tricky at times due to the scarcity of resources online. Finding an Infor specific solution through a standard Google search is usually fruitless. In these cases, the absolute best help usually comes from an Infor Knowledge Base (KB) article or actual Infor documentation as the instructions there are coming straight from the horse’s mouth.

Unfortunately, it can be quite tricky to use the search to find what you are looking for. Even when I know exactly what I’m looking for, I have seen the search results display wildly irrelevant articles. Even when I type the exact title of the KB article, the results sometimes do not show it.

Here are some tips and tricks to help you search through Infor’s Knowledge Base (Full article: KB 1182904)

  1. Do you know the ID Number?
    If you have the incident number, KB article ID, or Documentation topic ID on hand, there is no need to mess with search terms at all. Simply search the number and just the number itself to find your article.


  2. Try to favor Singular words over Plural in the Search Phrase
    Infor recommends using singular words in your search phrase for better search results.
  3. Using Wildcards in the Search Phrase
    There are two wildcard characters (* and ?) available to use in the search phrase to expand your results. Wildcard characters serve to complete a word when you are not sure of the entire word. Wildcard characters apply to single words and not the entire phrase.

    Asterisk (*): Adding this to a word will add zero or more characters to the word to look for all words that include the characters provided. For example, searching for term “account*” will return results that start with account but can end with any number of letters after account. Words such as accounts, accounting, accounted would all be included in the search results.

    Question mark (?): Adding this to a word will add one character to the word to look for all words that include the characters provided. For example, searching for term “?ate” will return results that end in ate but can start with any one letter. Words such as late, date, rate, gate would all be included in the search results. If it was an asterisk instead (*ate), words such as elucidate, satiate, plate would also be included.

    Note: if you use the * in a word in the search phrase and the search engine finds too many matches, you may get no results returned.

  4. Using Special Characters
    The only special characters that are considered by the search are:
    • slash (/)
    • dash (-)
    • underscore (_)

    All other special characters (such as !,@,#,$,&) will be replaced by a space when the search is performed. These are not searchable.

  5. Types of Searches
    If your search contains just one word, regardless of the setting of the Search Exact Phrase checkbox, an “Exact Phrase” search will be performed. Only those KB articles/Documentation topics that include the word, a form of the word, or a synonym for the word, will be included in the search result. If your search phrase is “execute”, you should expect to see KB articles/Documentation topics including: execute, executed, executing, run, runs, and running in the search result.

If your search contains more than one word and Search Exact Phrase = unchecked, an “All of the Words” search is performed. If there is at least one result that contains all of the words in the search phrase, then the results are displayed. If there are no results that contain all of the words in the search phrase, then an “Any of the Words” search will be performed and all of the KB articles/Documentation topics that contain at least one word in the search phrase will be displayed in the search result.

If your search contains more than one word and Search Exact Phrase = checked, an “Exact Phrase” search is performed. If there is at least one result that contains the exact phrase, then the results are displayed. If there are no results that contain the exact phrase, then an “All of the Words” search is performed. If there is at least one result that contains all of the words in the search phrase, then the results are displayed. If there are no results that contain all of the words in the search phrase, then an “Any of the Words” search will be performed and all of the KB articles/Documentation topics that contain at least one word in the search phrase will be displayed in the search result.

Refer to the Search Terms Match filter on the search result page to see what type of search was performed:

  1. Search Exact Phrase Checked vs Unchecked

    If Search Exact Phrase is selected:
• Automatic spell correction is not performed. The search terms are searched as-is.
• “Noise words” are not removed from the search phrase.

    If Search Exact Phrase is NOT selected:
• Automatic spell correction is performed. There will also be a “Search instead for” option to search the original phrase with no correction.
• “Noise words” are removed from the search phrase.

  • You can surround a word with double quotes (“”) to avoid auto spell correction and noise word removal.

    • The numbers zero through nine (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) are also considered noise words.
  • The individual letters of the English alphabet are also considered noise words.
  1. Infor General Recommendations
  • Use the Advanced Search options on the search criteria page only if you know for certain that the search result should include results with only those criteria.
  • On the search criteria page, select multiple product lines if you are unsure where an issue might originate.
  • When conducting a search, start with a simple search phrase and if too many results are returned, try adding more words to constrain the search result.
  • On the search result page, only use the filters on the right if you are certain that the search result should be filtered by those selections. If you are uncertain, you might consider modifying your search phrase.

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.