Getting server logout when running long batch jobs in Seam - batch-file

One of the requirements I have is to generate flat files in a specific format. The user selects the year from the UI and clicks the generate button.
The flat files process usually takes 3 to 4 hours to generate all the files. When the process is running and flat files are being created, the UI shows a modal that the job is being processed.
The problem is that after the files are successfully generated, the UI redirects to the login screen. Instead I want to refresh the UI showing the message that the process has successfully completed.
I am looking for help on this. Also would increasing the conversation timeout or session timeout in web.xml help fix this issue?

yes you could increase both session timeout and conversation timeout (if doing work in conversation scope) so they exceed the duration of the job
a better solution may be to store information on the jobs in a higher scope (eg. application or to the database), then if the user accidently logs out the job will continue running and complete

Related

How can I see the status of the messages in a batch from Azure Portal?

I am new in the field of Azure. I am testing the functionality called "Send, receive, an batch process messages in Azure Logic Apps". This is the link of the documentation:
Batches in Logic Apps
I could do everything what in that tutorial exists and it works. I created a batch called "Test" (This is the Batch name). My question is: Is there a monitor in Azure portal where I can see which messages were created in that batch from the "batch sender" and therefore see the current status of these messages?.
In other words I would like to see which message was already processed by the "batch receiver" and which ones still remain to be processed. I would like to know if I can monitor this batch that I created.
I would like to see which message was already processed by the "batch receiver"
As of now there is no way we can alone monitor the batch process but Here is one of the workarounds for this, You can add a compose connector and add all the parameters as per the requirement.
Here is my logic app workflow
So each time this logic app gets triggered by the batch process we can check all the properties that we have mentioned for that particular message.
Here is the sample output:
You can check the processed message by the "batch receiver" from the run history of the logic app.
and therefore see the current status of these messages?.
You can monitor this from Azure Monitor logs. which gives number runs that are running, succeeded and failed.
and which ones still remain to be processed.
This depends on from where you are trying to send the messages
You can follow this document for Monitor logic apps by using Azure Monitor logs

azure logic app to grab email attachment slow to trigger

I have a azure logic app that monitors my emails and when target is found, it drops the attachment into blob storage. The plan is a consumption plan.
The issue is, sometimes it takes up to 50 minutes for the email to be grabbed and dropped. I know there is a startup time when things go idle, but I was reading seconds/minutes. Not close to an hour. Does anyone know how I can trouble shoot this?
sometimes it takes up to 50 minutes to grab and drop the email
Based on this doc ,
The reason for delay is:
When the triggers encounter a new file, it will try to ensure that the new file is completely written. For instance, it is possible that the file is being written or modified, and updates are being made at the time the trigger polled the file server. To avoid returning a file with partial content, the trigger will take note of the timestamp such files which are modified recently, but will not immediately return those files. Those files will be returned only when the trigger polls again. Sometimes, this may lead a delay up to twice the trigger polling interval. This also means that the trigger does not guarantee to return all files in a single run when "Split On" option is disabled.
For more information you can refer this:
. Automate tasks to process emails by using Azure Logic Apps | MS DOC, .
.How to Send an Email with one or more attachments after getting the content from Blob storage? | SO Thread & Logic app Created with add email attachments in Blob storage .

Does JMeter scripts actually creates records in database

Let's say I run a recorded script for 'New User Registration' function of a web site to evaluate the response time for entire scenario. When I run the recorded script from JMeter, for each registration script, is there a new user record getting created in the application database ?
Yes, if you record registration and correlate it (meaning you create a valid unique name for every request) you will create a real user in your environment.
JMeter is simulating a real scenario which effect your environment.
That is part of the reason JMeter will be executed in different environment than production (as stage)
Well-behaved JMeter script must represent a real user using a real browser as close as it is possible.
Browsers execute HTTP requests and render the response
JMeter executes the same HTTP requests but doesn't render the response, instead it records performance metrics like response time, connect time, latency, throughput, etc.
HTTP is a stateful protocol therefore given you execute the same request you will get the same response. So if there are no mistakes in your script it either should create a new user or fail due to non-unique username error.
Yes, if your script accurately represents the full set of data flows associated with the business process, "New User Registration," then the end state of that process should be identical to that of the user behavior so modeled.
A record will be created in the database. If not, then your user is not accurate in its behavior

Best approach for real time process information / Server + JS Client

I have a C# Web API project on server side and on front-end I have ExtJS 4.2.1 (Javascript framework client).
There is a section in my app where I request to start a long running process (about 5 minutes) and I want to show the user the status of the process being executed.
Basically, the process will run a special calculation for every employee in the database (about 800), so I want to let the user know which Employee is being processed in that moment.
So I was thinking in two ways of doing this, and maybe I don't know if having both is ok.
Use SignalR to show the information of the process in Real Time.
Write to a database table all the process log (every employee that its being processed).
If I use the first approach, if the user close the browser he will loose all the information about the process and if he log into the app again he will only see the actual status.
If I use the second approach, if he log into the app again he could see all the information, and using maybe a timer on client side the data could be refreshed every 5 seconds.
Does anyone have implemented something like this? Any advice is appreciated.
You should use a combination of the two. When you have calculated a employee save the state to the database and publish the change on a service bus.
Let SignalR pick these messages up and forward them to the client. This way the user will see old state when he connects and new state then they arrive with SignalR. I have created a Event aggregator proxy that makes this very easy.
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/wiki
Follow the wiki to set it up, here is a demo project
https://github.com/AndersMalmgren/SignalR.EventAggregatorProxy/tree/master/SignalR.EventAggregatorProxy.Demo.MVC4
Live demo
http://malmgrens.org/Signalr/

Scheduled Task to kill specific internet explorer tab

Is it possible to schedule a task that will kill a specific internet tab every 15 minutes?
Our operatives all access a reports dashboard, but due to the number of licenses we keep finding ourselves being unable to log on as people leave their screen open despite not using it.
If there was a scheduled task that ran every 15 minutes, perhaps that just kicked off a batch file that looked for an internet tab that's always called 'Dashboard' then it would kill it, that would be great.
Can anyone help please?
Thanks
I don't think this can be done easily if it can be done at all.
Does the application you use - Dashboard? - have a setting to handle a session after some time of inactivity as being closed like when closing the page in the browser or terminate the browser?
It would be better to control the session and license management from server side instead of from client side.
Do you use OpenStack Dashboard (Horizon) as I found the page Horizon does not implement a browser session timeout with the information that there is now such a feature.

Resources