If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#45811 by BLOMASKY
Thu Dec 07, 2017 12:29 pm
Aware has SystemSettings (one per application), LoggedInRegularUser (LIRU) one per user, I think I need a Session Record (one per browser instance). To store information, or an easy way to set / retrieve memory variables. Perhaps someone has a good solution to my problem.

Here is my requirement. There are salespeople using the system. It is an order entry system, so they first select a customer, (which I store in LoggedInRegularUser), once selected they start to enter the order. If in the middle of it, another customer calls, they want to open an additional browser tab, log on, select THAT customer and work on their order.

The problem is, there is only LIRU record that is now updated with the selected customer. There are many reasons why I can NOT have an additional RegularUser. Each user can have only one!

Have some of you smarties figured out a solution to this?

Thanks
Bruce
#45812 by eagles9999
Thu Dec 07, 2017 1:09 pm
Bruce,

Check if when you open an additional Browser Tab does Aware open another SESSION.

If so, just create a BO which is created at Login which stores the SESSION_ID and refer to that.
#45813 by tford
Thu Dec 07, 2017 6:34 pm
I would check with Vladimir about running two sessions on the same machine. I vaguely remember having issues in this area and learning that it was inadvisable.
#45816 by Jaymer
Thu Dec 07, 2017 8:48 pm
I normally keep one browser window open to live/production, and another browser window open to test.
Each time I go to test, I do an F5 to refresh/re-login to the test system.
I have seen that if I accidentally go to the live tab, without re-logging in, I get all sorts of weird results.

So for me, I constantly F5 to login again when going between live in test so that I don’t have an issue anymore. But it definitely got confused so I agree with the previous post.
#45817 by CalD
Fri Dec 08, 2017 12:02 am
My Experience is the same Jaymer, lots of F5 happening if I have a test and live session open, also sometimes I might have two tabs open with users under different access levels, also have lots of F5 happening then or you do get weird results... and this does actually make me nervous as we start eventually getting users into the system, as if people these days are not going to try open multiple sessions... a Gen Y user will probably open enough tabs to run the pc out of memory if they can... perhaps support can share some insight if there are ways to deal with this...

Cheers
#45824 by BLOMASKY
Fri Dec 08, 2017 11:41 pm
Mark, (and others), I did think about a session variable ID, but without some "tab in focus logic". as I move between windows or tabs, I don't think aware will know which one is "active". Imagine I have 3 windows / tabs open. When I go to one of them, and click a button, I do not know how Aware will know which one I am currently using. Perhaps Vlad has an answer?

Bruce
#45828 by johntalbott
Sat Dec 09, 2017 1:27 am
I did a quick test, and as I expected only get a single Tomcat session if I open multiple tabs or even a new browser instance.

Meaning if ...
1. I open Chrome and log in as User 1, a Tomcat session starts
2. I open another instance of Chrome and log in as User 2, a second Tomcat session does NOT start. User 2 takes over the open session.

But if I open Chrome in incognito or use IE, FF, etc, another Tomcat session DOES starts.

My impression is that LIRU represents the user's active Tomcat session. For this reason, I've stayed away from using LIRU at all. It's a quick and easy way to manage state, but there may be side-effects.
#45830 by pureist
Sat Dec 09, 2017 6:06 am
what about redesigning the order entry system so users don't have to spend time opening a new browser tab and logging in again just to enter an order for another customer concurrently with the WIP order?

I thought you were about 'pixel perfect' placement and elegance? This seems clunky. :mrgreen: :mrgreen:

why not just open another order entry tab in the application?

alternatively you could use exec_script to access the browser object '.. sessionStorage' to store and access the ID of any user logged in, or indeed the ID of any customer which already has a WIP order.

https://www.w3schools.com/html/html5_webstorage.asp

you could also use '.. localStorage' to prevent a 2nd instance of the application being opened altogether in any tab in any browser.

HTML Web Storage Objects - HTML web storage provides two objects for storing data on the client:

window.localStorage - stores data with no expiration date
window.sessionStorage - stores data for one session (data is lost when the browser tab is closed)


"Here is my requirement. There are salespeople using the system. It is an order entry system, so they first select a customer, (which I store in LoggedInRegularUser), once selected they start to enter the order. If in the middle of it, another customer calls, they want to open an additional browser tab, log on, select THAT customer and work on their order. "
#45831 by BLOMASKY
Sat Dec 09, 2017 2:08 pm
[quote="pureist"]what about redesigning the order entry system so users don't have to spend time opening a new browser tab and logging in again just to enter an order for another customer concurrently with the WIP order?

Lets discuss this pureist, right now, I have a customer query which takes up the screen. Once the user selects a customer, I open up a new tab with multiple panels. One is a query with all of the selected customers orders. one panel is the entry form.

If I allow multiple order tabs open, I have to have some way to know which is the selected customer. That is my problem. I can use LIRU, I can use a BO to store it, but, (and this is the thing I am stuck on)...

--> As the user clicks between the multiple order entry tabs, how will I know which customer I am working on?

That is where my tired brain is having an issue resolving.
#45833 by johntalbott
Sat Dec 09, 2017 2:59 pm
Backing up a bit ...
When the salesperson selects a customer and the order form opens, at that point the order is associated with the appropriate customer, yes? If that is that case, what is driving the need to "hold on" to the customer in LIRU?

If there is no way to avoid using LIRU ...
You could use a script to call a process that sets the LIRU every time a customer form becomes "active".
#45838 by pureist
Sun Dec 10, 2017 5:34 am
It sounds like you're using DISPLAY LAYOUT (in a tab) to achieve the 'multiple panels' in the newly opened order entry tab.

".. I have to have some way to know which is the selected customer .." (for each tab - I assume you mean)

Why? (same as John asked)

Per John, the Order Entry form in the tab should automatically inherit into context the customer selected, which lead to the tab being opened (as should the all-orders query in a panel in the tab).

Is the reason why, because of the all-orders query in a panel of the opened tab?

Or are you using ENTER NEW .. AND VIEW IN TAB, thus the order form doesn't inherit into context the customer object instance selected?
(saying that, ENTER NEW can include WITH to pre-complete form fields (ie. ID of customer), but this won't put the customer selected into context)

If you're using ENTER NEW, then you should instead change your process which runs upon selection of a customer to instead CREATE a new customer order initially and then VIEW it in a new tab, so that the order form inherits everything into context.
#45844 by BLOMASKY
Sun Dec 10, 2017 9:28 pm
QuoteScreen.jpg
QuoteScreen.jpg (234.69 KiB) Viewed 19589 times
CustomerScreen.jpg
CustomerScreen.jpg (218.35 KiB) Viewed 19589 times
I must be missing something. Let me try with a couple of screen shots.

The 1st one shows the customer search tab (pay no attention to the left 2 tabs. This tab has a customer query. Once I select customer and click the quote button, I get the quoting tab to open (2nd screen shot). This panel has a query on the right, which, when I select a record, it fills in the form on the left. So far all is good

Notice near the top right, there are 3 buttons, one says "Enter PO". If this is selected, I have to do "stuff" with the customer. This is easy when only one window open and I have the selected customer in LIRU, but assuming I had multiple customer tabs and therefore, multiple quote tabs, My problem is, how can I know which customer I am working with?

Yes, I could have the buttons in the query, and use an operation with records, which would give me the customer ID, but thats sort of kludgy. The buttons on the form on the top of the screen, have no context. They do not know which customer I am working with (if more than one.)

Does this make sense? or am I missing something?
#45848 by aware_support
Mon Dec 11, 2017 12:03 am
Opening a new browser tab must NOT be done - it is a recipe for disaster. Aware IM WILL get confused if you login more than once using the same browser. Opening another browser, though, will work, but I agree with purist, in principle, that it's better to redesign the UI of the application rather than let users open other browsers or browser tabs. How to do this is a separate discussion (which I haven't been following yet, sorry)
#45854 by tford
Mon Dec 11, 2017 12:44 am
This is easy when only one window open and I have the selected customer in LIRU


When and how do you put the selected customer in LIRU? How does that step relate to the timing of clicking the PO button?

Who is online

Users browsing this forum: Google [Bot] and 29 guests