#Dexterity command Activity_GetBackgroundStatus() kills background Timed Processes

David Meego - Click for blog homepageYou might have seen yesterday’s article: #GPPT Processes are currently being run Dialog when logging into Microsoft Dynamics GP, which discusses a problem caused by a clash of a GP Power Tools build 28 feature and FastPath SSO (Single Sign On).

[Edit] FastPath have already released an update which fixes the issue. Thanks for the quick turn around.

The root cause of this issue is the undocumented side effect of using the Dexterity Activity_GetBackgroundStatus() command. Read on for the full explanation.

The Dexterity Activity_GetBackgroundStatus() function library command is documented as follows in the Dexterity help:

The Activity_GetBackgroundStatus() function ascertains whether the runtime engine’s process queue contains any background procedures. You designate background procedures using the background parameter of the call statement.

This command will return true when the are background processes listed in the Normal Queue of the Process Monitor window and false when there are none.

However, it will also remove all processes listed in the Timed Queue of the Process Monitor. This side effect is not documented any where and is completely unexpected.

If you want to see this side effect in action, you can either from Dexterity or from Microsoft Dynamics GP.

From Dexterity

  • Go into Test Mode and log into Dynamics GP.
  • From the Microsoft Dynamics GP (XXXXXXX.dic) menu, select Process Monitor.
  • Switch to the Timed Process Queue to see the Timed Background Processes.
  • From the Debug menu, select Expressions. Enter Activity_GetBackgroundStatus() as the Expression.
  • Make sure that both the Process Monitor and Expressions windows are visible.
  • On the Expressions window, click Evaluate.
  • Now look at the Process Monitor window and the Background Timed Processes have been removed.

From Microsoft Dynamics GP

  • Launch Microsoft Dynamics GP and log in.
  • From the Microsoft Dynamics GP menu, select Process Monitor.
  • Switch to the Timed Process Queue to see the Timed Background Processes.
  • Click on the Company Name at the bottom of the main window or from the Microsoft Dynamics GP menu, select User and Company.
  • Don’t change company, just click OK to log into the same company again. Switching companies checks for background processes using the Activity_GetBackgroundStatus() command when you click OK.
  • Once logged in again, from the Microsoft Dynamics GP menu, select Process Monitor.
  • Then switch to the Timed Process Queue to see the Timed Background Processes.
  • The core GP Background Timed Processes have been removed.

I reported this as a bug to Microsoft Dynamics GP support a while back as the background timed processes queued after the initial login are not longer active after switching companies.

It would be great Activity_GetBackgroundStatus() function library command could be updated with an optional boolean parameter so you could control if background Timed Processes should or should not be removed automatically.

It took me a while to discover why Timed Processes in my code kept disappearing and I had been meaning to blog about it. The recent issue mentioned at the start of this article reminded me to write something.

Hope this information is useful.

David

22-Oct-2020: FastPath have released an update to their Single Sign On product which resolves the issue seen with GP Power Tools build 28.

This article was originally posted on http://www.winthropdc.com/blog.

One thought on “#Dexterity command Activity_GetBackgroundStatus() kills background Timed Processes

Please post feedback or comments

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.