Feature #6425
SESSION handle features
100%
Related issues
History
#1 Updated by Greg Shah almost 2 years ago
- Related to Feature #4391: enhance existing SESSION:STARTUP-PARAMETERS support to honor -H -db -S -ld -N values added
#2 Updated by Greg Shah almost 2 years ago
Add the following to the SESSION
system handle:
LOCAL-VERSION-INFO
SUPPRESS-WARNINGS-LIST
MESSAGE-AREA-MSG()
methodSTARTUP-PARAMETERS
add support for:-logginglevel
-logentrytypes
-logfile
-ubpid
-logname
-logthreshold
-numlogfiles
-ASID
-ubpropfile
-p
-param
-pf
#3 Updated by Greg Shah about 1 year ago
- Assignee set to Theodoros Theodorou
#4 Updated by Theodoros Theodorou about 1 year ago
- Status changed from New to WIP
#5 Updated by Theodoros Theodorou about 1 year ago
The code message session:local-version-info
prints Progress.Lang.OEVersionInfo...1000
using FWD and Progress.Lang.OEVersionInfo...1006
using OE on the VM. Should I make it identical or it doesn't matter?
#6 Updated by Greg Shah about 1 year ago
It doesn't matter.
#7 Updated by Theodoros Theodorou about 1 year ago
I think the SESSION:MESSAGE-AREA-MSG
does not exist. Can you please confirm?
#8 Updated by Greg Shah about 1 year ago
We believe it exists but it is undocumented. It is possible it only exists in some recent level of OE. Please check and if it doesn't exist there, we will ask the customer to check on their specific version (we don't currently have access to their OE dev env).
#9 Updated by Theodoros Theodorou about 1 year ago
- File Screenshot from 2023-03-02 23-07-54.png added
I tried on a customer AWS VM which has v11.7 and it throws an error. Also, the autocomplete does not show MESSAGE-AREA-MSG
as an option. I also tried searching the documentation and couldn't find anything https://docs.progress.com/search?labelkey=&q=message-area-msg.
#10 Updated by Theodoros Theodorou about 1 year ago
- Status changed from WIP to Review
- % Done changed from 0 to 100
Finished with the startup-parameters. The ticket is ready for review. I should also create a test, right?
#11 Updated by Greg Shah about 1 year ago
I tried on a customer AWS VM which has v11.7 and it throws an error. Also, the autocomplete does not show
MESSAGE-AREA-MSG
as an option.
Is there a compiler error? Please try to compile and see what happens.
I also tried searching the documentation and couldn't find anything https://docs.progress.com/search?labelkey=&q=message-area-msg.
That just means it is undocumented, not that it doesn't exist.
#12 Updated by Theodoros Theodorou about 1 year ago
You are right, it exists. I tried to run it with many arguments and examples and I found that it takes one integer argument, e.g. session:message-area-msg(1234).
I executed it and I couldn't see any results. I also tried to add message
and display
in front but it showed nothing.
How can I discover the functionality of an undocumented method when I cannot see anything?
#13 Updated by Greg Shah about 1 year ago
Trial and error. I would guess that the integer arg is the message "line number" for which to get the current text. Try values like 1 or 2.
#14 Updated by Theodoros Theodorou about 1 year ago
I tried many combinations like the following without any result.
security-policy:symmetric-encryption-algorithm = 'fgtyj' no-error. message session:MESSAGE-AREA-MSG(0). message "awef". display "test". message session:MESSAGE-AREA-MSG(1). message session:MESSAGE-AREA-MSG(2). message session:MESSAGE-AREA-MSG(4). message session:MESSAGE-AREA-MSG(7). message session:MESSAGE-AREA-MSG(0).
I will need help on this.
#15 Updated by Greg Shah about 1 year ago
I suggest that you should not use the MESSAGE
statement while also testing MESSAGE-AREA-MSG()
. What is returned by MESSAGE-AREA-MSG()
? Is it always empty string?
How is security-policy:symmetric-encryption-algorithm
related to this case? Are you just trying to create an error? Using NO-ERROR
on that line will suppress the output to the message lines.
#16 Updated by Theodoros Theodorou about 1 year ago
Yes, MESSAGE-AREA-MSG()
always returns an empty string.
security-policy:symmetric-encryption-algorithm
is a random command that I used, it is not related to the task. Yes, I just tried to create an error. If I do not add NO-ERROR
the application does not start.
I tried many numbers for session:message-area-msg(1).
but I can't make it return something. I tried adding display
and message
in the front without any luck.
#17 Updated by Greg Shah about 1 year ago
I'll ask the customer if they can provide details of what it should do or how to write code to see it in action.
#18 Updated by Theodoros Theodorou about 1 year ago
Great, thanks :)
#19 Updated by Greg Shah about 1 year ago
- % Done changed from 100 to 90
- Status changed from Review to WIP
The customer reports that:
- The idea is that this method will return the current text in the message area. They didn't say how the indexing was supposed to work, but in the 4GL indexes are always 1-based so that is a good assumption. Thus I would expect the topmost message line to be 1, then line below that to be 2. In GUI, there can be more than 2 message lines and the window will scroll. In ChUI, a max of 2 message lines can ever exist.
- On their current system, this is returning empty string for them as well. They could not get it to return actual text.
- At some point in the past it was working but they think some OE release must have taken it away.
- They don't think it is critical so it is OK for us to just return empty string. Since that is what OE does, it is the correct/compatible result.
Please try these additional indexes to ensure we have this right.
- ? (unknown value)
- 0
- -1
- -10
- negative number smaller than min 32-bit integer size
- positive number larger than max 32-bit integer size
If any of the numbers provide errors or different behavior, then make sure we know that the boundary conditions are. Document the results and implement the behavior.
#20 Updated by Theodoros Theodorou about 1 year ago
I usually use the VM1. Today I used VM2 because the VM1 was occupied. I tried to run
message 'test'. message session:message-area-msg(1).
once more and it worked! I was 100% sure that I tried this scenario already. I thought I was getting crazy. I tried it again on the VM1 and it didn't work. I noticed that the progress developer studio (eclipse) opens a different window on these two VMs when executing a .p app. The VM1 uses the GUI and the VM2 uses the ChUI.
I should continue with the implementation of message-area-msg
, right?
Where can I find more info about the OE GUI and ChUI and their differences?
#21 Updated by Greg Shah about 1 year ago
Hmmm, it requires ChUI.
I noticed that the progress developer studio (eclipse) opens a different window on these two VMs when executing a .p app. The VM1 uses the GUI and the VM2 uses the ChUI.
Don't run from the developer studio. Just run from the command line directly. If you run prowin.exe
you will get GUI and if you run pro
or mpro
you'll get ChUI.
Where can I find more info about the OE GUI and ChUI and their differences?
I'm not exactly sure. The 4GL docs for the OE command line will talk about how to start each kind of session. But they dont really say much about the differences between modes. Most things work roughly the same in both, but some features are only available in one or the other. GUI has things like drag and drop that are not available in ChUI. ChUI doesn't have much that isn't in GUI but there are places where the internals differ. If you search in FWD, you can see how we lookup isChui()
to make some decisions. This will need to be one of those cases.
I should continue with the implementation of
message-area-msg
, right?
Yes. Make sure you confirm that prowin.exe
always returns "" in case there was something weird with the dev studio.
#22 Updated by Theodoros Theodorou about 1 year ago
I am doing some modifications in the java method message()
. Is there a way to check that I haven't broken anything?
#23 Updated by Greg Shah about 1 year ago
We are working on the initial creation of our CI/CD environment but it is going to take some weeks before it is in place. We do have some automated test suites but without the CI/CD it is a little tricky to run them.
Before we go there, please share some details of what you think needs changing so we can advise. The message text is available from Window.messageArea
from which you can call MessageArea.getMessageTexts()
to get the array. I was not expecting that message()
itself would need any changes.
The only tricky thing is this needs to be exposed as a downcall in ClientExports
but otherwise it seems pretty straightforward.
#24 Updated by Theodoros Theodorou about 1 year ago
- Status changed from WIP to Review
- % Done changed from 90 to 100
#25 Updated by Theodoros Theodorou about 1 year ago
The task is ready for review. Should I also create a test in testcases?
#26 Updated by Greg Shah about 1 year ago
Theodoros Theodorou wrote:
The task is ready for review. Should I also create a test in testcases?
Yes, please do.
#27 Updated by Theodoros Theodorou about 1 year ago
I created some tests under testcases/session/session_features.p
. Please review.
#34 Updated by Greg Shah 10 months ago
- File which_appserver_agent_is_executing_a_program_article.pdf added
- File can_not_start_openedge_broker_when_port_in_use_article_p26109.pdf added
- File appserver_agent_pid_openedge_development_forum_article.pdf added
The exact implementation of these may not be possible in FWD since we have a different architecture. Each one must be evaluated on a case by case basis.
ubpid
Google shows this article that mentioned -ubpid
: https://community.progress.com/s/article/P26109 (also attached as a PDF)
It sounds like in the older OE, this caused the unified broker pid to be written to a logfile. It could then be found later and used for a kill
command in the OS.
logname
Did you try it out to see what is output to that log file?
asid
I guess this is the application server id. Google shows these:
https://community.progress.com/s/article/which-appserver-agent-is-executing-a-program
https://community-archive.progress.com/forums/00019/02011.html
It suggests that OE inserts the appserver agent pid into the command line options using this parameter.
ubpropfile (unified broker properties file?)
Probably. Test it out.
db (physical database name?)
This one is well documented.
#36 Updated by Greg Shah 9 months ago
- Related to Feature #7675: add missing runtime support for 4GL command line parameters added
#37 Updated by Greg Shah 9 months ago
Some changes for this task were written in branch 4938b and were merged into trunk as revision 14688. Runtime support for the command line options will be implemented in #7675.
Theodoros: Please list those things that are complete and those things (other than the items in #7675) that are not complete.
#38 Updated by Theodoros Theodorou 9 months ago
Greg Shah wrote:
Theodoros: Please list those things that are complete and those things (other than the items in #7675) that are not complete.
The following parameters have at least one reference in the code:
-v6colon
-rereadnolock
-icfparam
-ininame
-T
-logginglevel
-logentrytypes
-logthreshold
-numlogfiles
-p
-param
-cpinternal
-clientlog
-debugalert
-errorstack
-inp
The following do not have any references yet:
-logfile
-ubpid
-logname
-asid
-ubpropfile
-pf
-H
-db
-S
-ld
-n
Please note that some parameters may be used but their functionality may not be 100% complete. For example the -cpinternal
has a reference in the code but it is not implemented yet.