app server - outlook email send batch mode

aflack

New Member
Progress V9.1E, XP Pro SP2 Config
I have successfully integrated 4gl code (GUI or Char) that opens the OUTLOOK COM object in a NON DISPLAY mode and using the Redemption DLL COM toolset, I am able to bypass the OUTLOOK security prompts, and have its OUTLOOK generated draft message sent out via OUTLOOK (or an OUTLOOK/EXCHANGE combo (typically 3 to 7 sec delay till Outlook Process terminates).
My goal was to have our real time remote production data capture stations monitor system integrity issues, and via an appserver (asEmail) resident with the development toolkit, issue the out off tolerance email messages being sent via the call to the asSendRedemptionEmail.p procedure(avoiding Outlook having to be installed on all the production floor Client Workstations).

When I call the procedure directly in its appserver folder it works fine.
eg. RUN E:\appServers\asEmail\asSendRedemptionEmail.p.

When I try running it as:
RUN E:\appServers\asEmail\asSendRedemptionEmail.p ON SERVER hasEmail.
It returns the following info in the asEmail.server.log:

Application Server connected with connection id: 10.253.249.23::asEmail::3098::a6291236450642cf:690726:1188a839bc5:-7fcb. (8358)
-- TRACE: Non-PERSISTENT Procedure 'E:\AMCO-WRK\appServers\asEmail\sendEmailRedemption.p' START. (5498)
Procedure: 'asEmail\asSendRedemptionEmail.p' Line:181 Error occurred while accessing component property/method: Body.
Out of memory or system resources. Close some windows or programs and try again
Error code: 0x80020009 asEmail\asSendRedemptionEmail.p (5890)
Procedure: 'asEmail\asSendRedemptionEmail.p' Line:181 Unable to set com-handle property. (5677)
-- TRACE: Non-PERSISTENT Procedure END SUCCESS. (8397)
Application Server disconnected. (8360)

After trying to grasp how Progress spawns and runs an App Server Process, I have been following the path of trying have the AppServer spawn a standalone batch process as follows:

CMD /q/c "C:\PROGRA~1\PROGRE~1\bin\_progres.exe -b -ininame e:\prod\proof\ini\prswD-V91E-C-Prod-E.ini -p E:\appServers\asEmail\asSendRedemptionEmail.p"

and using an appserver 'test-asEmail.p' procedure that issues the following:

commandStr = 'E:\AMCO-WRK\appServers\asEmail\asSendRedemptionEmail.bat'.
OS-COMMAND VALUE(commandStr).

Thinking that this would spawn a free standing _progres.exe session and the code would run just like it does when I open a _progress.exe session on the XP desktop, and/or from a XP desktop Icon.
But alas the OS-COMMAND is totally ignored in the appserver call.
So to my fellow Progress Travelers, does anyone have some inspiration, explanations for my starting appserver project...........??????:biggrin::mad::awink:
 

Casper

ProgressTalk.com Moderator
Staff member
On second thought I don't know if this is your problem since the error is on the body not the send method....
If you want to split of a batch proces then you need to use OS-COMMAND NO-WAIT in stead of OS-COMMAND.

I still think the first attempt has to work, don't know at the moment what goes wrong there. Is outlook local to the appserver?

Casper.
 

aflack

New Member
Casper,
Thanks for the suggestion. I have followed KB P4709, P6373 & P80281 that relate to your KB 19691.

I have tried the OS-COMMAND NO-WAIT as suggested, but the appserver process is still bypassed.

The memory issue seems very process determined.

I have tried issuing a
connectStr = 'DIR > c:\progress\wrk\tempDir.txt'.
OS-COMMAND SILENT OR NO-WAIT via the ON SERVER hasEmail path and the file is created.

My problem seems very related to the use of the prowin32.exe or the _progres.exe binaries. I have tried .r files with the same result.

Tis an interesting snake to kill. The appserver _proapsv.exe seems to be the total controller of the process, and whatever it does to launch and manage the process seems to be at the heart of the issue.

I have examined the Task manager listings along with filemon, and the appserver memory for the asEmail expands approx 5K to 10 in the task manager, and there are no other .exe instances in the task manager task list when the appserver process is running.

I have not been able to locate a truly technical whitepaper on what is being done when the appserver runs a process. Seems we are memory constrained in some form versus a standalone prowin32.exe or _progres.exe code launch.

:confused:
 
Progress V9.1E, XP Pro SP2 Config
I have successfully integrated 4gl code (GUI or Char) that opens the OUTLOOK COM object in a NON DISPLAY mode

Not sure if you mean you're using it as a control, or via automation. If it's the former, note:

Knowledge Base P82675 said:
This is expected behavior.
COM Controls are UI elements, and as the AppServer has no UI it cannot
make use of them. This holds true even if the COM Control is not
actually visible
(such as PSTimer).

A couple of workarounds are suggested, including using automation. Sorry if that's not helpful, please post a solution if you find one; would be useful.

Nice avatar.
 
Top