Trigger an even or process when user ends his session?

Hi all,
I have a table for editing a task. When a given user is editing this task it is being marked (via column TASK_LOCKED_BY) as being locked so no other users can edit it in the same time.
However, the problem is that when a user leaves the page by pressing a browser's back button or simply closes the page - the column TASK_LOCKED_BY is not being updated and so the task appears as being still locked by that user.
Is there a way of setting an event where if the user closes his Apex windows (another words when he stops using the application) that all tasks locked by him are released?
Any other suggestions how to make this locking mechanism better and less error prone?
Regards,
Pawel.

I don't think you will ever be able to find out if a user closed his browser, window or
pressed a back button. Even if you manage this, this would be a complicated process.
Someone may teach me a different thing. However, I would do this in a less complicated
way and I am sure this would serve the purpose:
1. you need to fetch the time stamp of the moment when user locks a record and
store it in a corresponding table,
2. you may tell to the user, he has two minutes to update the task (or you even may
not say anything),
3. I assume, after updating, your record will be released for further processing,
4. you may have a job running every minute, checking the locked tasks and
looking at those, with a time frame longer than two minutes. If it finds them,
it will unlock them, so the other users may work on them. You may decide to
document this as well and use it later on,
5. if your user waits too long but still wants to update the task he loaded, your
process may check first if meanwhile this task has been locked by someone
else and if not, it will allow updating after processing of checksum. If it has been
locked, it will inform your user about this - you can use a page validation process
for these purposes.
This is basically how I would do this. I don't know how many tasks we are
talking about and can not judge upon the frequency and the overhead such
an approach would cause. I also don't know if there are any other rules
you may not have mentioned.
Denes Kubicek

Similar Messages

  • CUP not updating OCS status when user ends call

    Hi All,
    I have an issue where, when a user places/receives a call their MOC status shows them as "on a call", 99% of the time when they end the call the MOC status changes back to what ever is was set to, i.e. Available.
    The 1% of the time is will stay "in a call".
    Now I have managed to trace a call from the CUP server and when the status updated correctly I can see a SIP message "ConnectionClearedEvent", however when the status does NOT change back there is no "ConnectionClearedEvent" in the SIPProxy trace file.
    So I am assuimg that some thing between CUCM and CUP is failing everynow and again.
    I am having a mental black and need to be pointed to the CUCM process that would pass the information to the CUP server.
    CUCM 6.1.5.10000-10
    CUP 7.0.3.10000-63
    Any other help would be appreciated too..
    Cheers
    Jason

    I would recommend you upgrade to CUPS 7.0.8 before troubleshooting.
    In each relase between 7.0.3 and 7.0.8 there are some OCS bugs fixed.  Not saying that upgrade would fix your problem.  But at least it would rule out the known defects.
    If there's no CSTA (INFO) message sent to OCS, the problem would be on CUPS side.  It could be the CUPS lost its connection with CTIManager thus not able to get CTI event updates.
    Michael
    http://htluo.blogspot.com

  • How to catch data from Purchase Order form, when user click CLOSE menu?

    Hi,
    I need do my own biz process when user click CLOSE in the Data menu to close a purchase order.
    But I don't know how to get data from PO form which opened by user.
    Can anybody give me some suggestions? thanks.

    Clicking "Close" is menuUID 1286. (Check this by going to View->System Information, and then hovering your mouse over "Close" in the menu. The menuUID is displayed in the bottom left of the screen)
    So catch the menu event, when menuUID and pVal.BeforeAction = True.
    The slightly tricky thing here is that pVal for a menu event doesn't give you the form, but it will be the active form, so you can do this:
    Private Sub SBO_Application_MenuEvent(pVal As SAPbouiCOM.IMenuEvent, BubbleEvent As Boolean)
         If(pVal.BeforeAction And pVal.menuUID = "1286")
             SAPbouiCOM.Form oForm = SBO_Applcation.Forms.ActiveForm
             //Now you have the form, when the user has clicked close, so process the data
             //from the form as normal
         End If
    End Sub
    Syntax might be wrong, I typed it up from memory and have no error checker!
    Edited by: njmog1 on Feb 28, 2011 10:35 AM

  • Run a process when leaving a page

    Hello,
    Is it possible to run a process when users leave a page?
    Let me explain:
    On a page, I have an Automatic Row Processing (DML) and a PL/SQL process. These two process are run when users click on the "Apply change" button.
    Is it possible to run these two processes ALSO when users leave the page (click on another tab) ?
    I want to do this to make sure that the changes are saved, even if users forget to click the "Apply Changes" button.
    Thank you in advance for your help.

    Have you looked into using a pl/sql dynamic action page unload event?  I haven't tried before but if you set the item values in the first step of the dynamic action and then execute a pl sql routine that mimics the DML it may work.  Since the action would fire after every page unload, it would also probably need some validation to ensure it does fire during normal processing.
    Ricker

  • How I can auto approve pending workflow process, once month end proces

    I have created workflow process for timesheet approval.
    I want to auto approve all pending timesheet (i.e (default notification timeout is 7 days) notification send to approver, but still not approved) in Oracle workflow Process, when Month end process started
    Month end process will initiate a flag in pending timesheet header table with process started

    I am not sure if I understand your requirements completely.
    1) If your requirement is that all the pending timsheets have to be approved by month-end (not really when month-end process starts) then set the Timeout of the notification to Absolute Time of end of that month... so that by the end of the month the background engine will pick it up.
    You may design the approval notification within a Sub-process with RESULT attribute of Approve / Reject. Design a Timeout transition for the Notification Activity within the sub-process that will go to an END activity that has Approve result. Thus once the notification times out, the sub-process will complete with result APPROVED.
    2) One other way is to respond to OPEN notifications using APIs.
    WF_NOTIFICATION.SetAttrText(nid, 'RESPOND', 'APPROVED');
    WF_NOTIFICATION.Respond(nid);
    You should have queried up all OPEN notifications for Timesheet approval and do this in a loop... which could be time-consuming sometimes.
    Thanks

  • Problem in setting user end date from oim to account expiry date in AD process form

    Hi all,
    i am updating the user end date from oim to user account expiry date in ad process form using oim api.
    i am able to get the end date value from oim but when i am setting it using api it through exception but all other attribute i am able to update in process form.
    i am facing the problem only with end date field because of different date format in OIM and  AD .
    so please suggest me what are date format in Active Directory and how can i change the oim date format to Active directory time format in in my java code.

    Thanks for the reply.
    But all iplanet users need not contain end date attribute, and its an update on existing user.
    Can you please ellaborate more on Transformation class..?? example should be helpful.

  • Process does not end when binding a object to registry

    I am writing a Unit Test case in which i need to create a datasource and bind it to RMI registry so that the methods i need to test can get a database connection . The problem is that after the test cases have finished running the process does not end and i have to shut it down manually . When i do not bind the datasource , the process ends put with errors because the methods do not get a connection. Even unbinding it after running the test cases does not help.
    Edited by: gurpreetbhalla on Jun 25, 2009 11:56 AM

    public void testIntraDayForClient() throws Exception
              ConstantConfig.JNDI_FACTORY = "com.sun.jndi.rmi.registry.RegistryContextFactory";
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
              env.put(Context.PROVIDER_URL, "rmi:");
    InitialContext ic = new InitialContext(env);
    // Construct DataSource
    SQLServerConnectionPoolDataSource ds = new SQLServerConnectionPoolDataSource();
    ds.setURL("jdbc:sqlserver://10.200.41.201:1433;databaseName=TradeportTC");
    ds.setUser("sa");
    ds.setPassword("superuser");
    DataSource d = ds;
         ic.unbind("TCDB_JNDI");
    ic.bind("TCDB_JNDI", ds);
              HttpServletRequest req = new MockHttpRequest();
              HttpServletResponse resp = EasyMock.createMock(HttpServletResponse.class);
              ActionContext context = EasyMock.createMock(ActionContext.class);
              HttpSession session = EasyMock.createMock(HttpSession.class);
              EasyMock.expect(session.getAttribute("ZephyrUserName")).andReturn("sclient90");
              EasyMock.expect(session.getAttribute("ZephyrDomainId")).andReturn("8a48a9cb1860e2a4011860e2c64d003a");
              EasyMock.expect(session.getAttribute("isTrader")).andReturn(false);
              EasyMock.expect(session.getAttribute("accountsDataDB")).andReturn(null);
              EasyMock.expect(context.getSession()).andReturn(session).times(12);
              session.setAttribute("vawTrades", null);
              session.setAttribute("noOfDays", null);
              session.setAttribute("accountNo", null);
              session.setAttribute("exchange", null);
              session.setAttribute("symbolName", null);
              session.setAttribute("trCode", null);
              session.setAttribute("status", null);
              session.setAttribute("accountsDataDB", null);
              EasyMock.replay(session);
              EasyMock.replay(context);
              MyOrdersAction action = new MyOrdersAction();
              action.execute(req, resp, context);
    This is the unit test case which does not exit , if i skip this binding ic.bind("TCDB_JNDI", ds);
    then it exits normally with a failure,

  • Process.Start(procStartInfo) error when user cancels

    I'm attempting to allow a product to self-elevate but get an error if the user clicks cancel on the security dialog.
    I've attempted to error trap this, but it doesn't work.
    Dim procStartInfo As New ProcessStartInfo
    Dim procExecuting As New Process
    With procStartInfo
    .UseShellExecute = True
    .WorkingDirectory = ("C:\MyDirectory")
    .FileName = "MyProductName" & My.Settings.VerInfo.ToString & ".exe"
    .WindowStyle = ProcessWindowStyle.Normal
    .Verb = "runas" 'add this to prompt for elevation
    End With
    Try
    Process.Start(procStartInfo)
    End
    Catch ex As Exception
    MsgBox("There was an unexpected problem executing the product as an administrator....blah blah")
    End
    End Try
    I'm getting the error at Process.Start(procStartInfo) if the user happens to not choose to click run for the security dialog. 
    Thanks in advance :-)
    Programming is mostly just a hobby for me :)

    I'm using Visual Studio Express 2012 for Windows Desktop, if that helps.
    Programming is mostly just a hobby for me :)
    I don't know anything about express editions. Or how yours is setup specific to this application. I can not replicate the issue. And it seems as if your Visual Studio is debugging code that is not displayed in the code window. Since when using the TryCatch
    my VS 2012 does not have the same issue. Until I remove the try catch.
    It's almost like your VS is not building the code displayed. But debugging some previous code which doesn't have the try catch.
    Regardless you may want to upgrade to
    Visual Studio Community wth Update 4 which is free. And probably does everything all Visual Studio Express editions can do and whatever some of Visual Studio Professional can do.
    "Download Visual Studio Community for a free, full-featured IDE with powerful coding productivity features, cross-platform mobile development tools for Windows, iOS and Android, and access to thousands of extensions. This edition of Visual Studio
    is available at no cost for non-enterprise application development.
    Sign in to Visual Studio within 30 days with your Microsoft account to synchronize your settings across multiple machines and register your product. "
    Supported operating systems
    Windows 8.1 (x86 and x64)
    Windows 8 (x86 and x64)
    Windows 7 SP1 (x86 and x64)
    Windows Server 2012 R2 (x64)
    Windows Server 2012 (x64)
    Windows Server 2008 R2 SP1 (x64)
    Hardware requirements
    1.6 GHz or faster processor
    1 GB of RAM (1.5 GB if running on a virtual machine)
    20 GB of available hard disk space
    5400 RPM hard disk drive
    DirectX 9-capable video card that runs at 1024 x 768 or higher display resolution
    Additional requirements
    This version of Visual Studio works best with  
    Internet Explorer 10 or higher. If Internet Explorer 10 is not installed on your computer, 
    some features might not work as expected.
    KB2883200 (available through Windows Update) is required
    For Windows Phone development: 
    Windows Phone 8.0 development requires Windows 8.1 (x64) or higher
    Windows Phone 8.1 development requires Windows 8.1 (x86) or higher
    For the Windows Phone emulators, Windows 8.1 (x64) Professional edition or higher, and a processor that supports Client Hyper-V and Second Level Address Translation (SLAT)
    If your computer meets the operating system requirements but does not meet the hardware requirements for the Windows Phone Emulators, the Windows Phone development tools will install and run. However, the Windows Phone 8.0 and 8.1 Emulators will not function
    and you must use a device to deploy or test Windows Phone apps.
    La vida loca

  • Error on load: System.IO.IOException: The process cannot access the file : error in event viewer when users want to view documents from this third party deployed scan solution

    Error on load: System.IO.IOException: The process cannot access the file
    '\\server1\SCANSHARED\.pdf' because it is being used by another process.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
       at abc.Scan.Layouts.ICC.Scan.View.Page_Load(Object sender, EventArgs e)
    I faced this  error in event viewer  when users want to view documents from this third party deployed scan solution
    here I have two WFS servers  and they configured with load balancing in F5 .
    when I enable both servers in F5 I receive this error messages in 2nd server,
    when users want to view documents
    adil

    Do you have antiVirus installed on the sharepoint servers?
    These folders may have to be excluded from antivirus scanning when you use file-level antivirus software in SharePoint. If these folders are not excluded, you may see unexpected behavior. For example, you may receive "access denied" error messages when files
    are uploaded.
    Please follow this KB and exclude the folders from Scanning.
    http://support.microsoft.com/kb/952167
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Hot to begin a BPEL process when a TRIGGER from DATABASE is on

    Hello, I have acces to a database Oracle Lite in BPEL (Jdevelopper) and I 'd like to begin a process when a trigger of this table is on (when update for example) do you know how to catch this event?
    Thak's a lot
    Jack

    Hi Jack,
    Please have a look at - http://www.orafaq.com/faqpol.htm
    Oracle lite databse does not give you normal RDMS database facilities (e.g oracle). If you want to have a control at the databse level, then install your SOA Suite with a Oracle 9i or 10G database.
    When you do so, you can configure your trigger to call a PL/SQL procedure which can use utilities like dbms_job to call the BPEL webservice.
    Regards,
    Nishant

  • When I open iTunes , iTunes Match started to process step 1. Always same process and never ending

    When I open iTunes , iTunes Match started to process step 1. Always same process and never ending...
    I tried some suggestions but I cant fix my problem. Do you have any knowladge about this problem?

    For the past few months, and several iTunes upgrades, iTunes Match spends some time in Step 1 "Gathering" and sending information to Apple. Then Step 2 runs through the first 2092 of 2094 pretty quickly. Jumps to 2094. And then immediatly back to Step 1 again.
    Repeat every 5 minutes or so until Match is manually turned off.

  • Hi, I can't access my iTunes store even though I had updated to the latest version of the iOS. It always shows "the request could not be processed" when I tried to access the iTunes store. Pls help..

    Hi, I can't access my iTunes store even though I had updated to the latest version of the iOS. It always shows "the request could not be processed" when I tried to access the iTunes store. This has been going on for the past 3 days already. Pls help..

    Many thanks b Noir
    This is a copy of ONEof the keys  in the registry I changed  as told by Apple support today. I also have changed others as instructed by GEAR  software support to manually delete GEAR drivers (that I had installed but couldn't delete some of the others  they mentioned from Windows system 32. Then some bright spark at work told me I need the Gear drivers so  I downloaded the software and installed again.
    Sorry, just this minute went to insert image  and it is giving me a message saying this sort of content  is not allowed?.
    The most recent key I altered is in: HKey _local _machine. System\class - 4D36E965-E325-11CEBFC1-08002BE10318. Upper Filter data: Upper filter NTIDrvr  SiRem GEARAspiWDN.
    The GEARsoftware info about manually deleting  GEAR drive is from:
    http://www.gearsoftware.com/wiki/index.php?title=DRIVERS:_Windows_-_Updating%2C_ removing%2C_64_bit_versions%2C_etc
    I hope you can help

  • My call will not end when pushing end sign even when shut down and restarted.  any ideas?

    call will not end when pushing end sign even when shut down and restarted.  any ideas?

    Sounds like a major hardware problem.
    If no change after restoring your iPhone as a new iPhone or not from your iPhone's backup, there is a hardware problem.

  • How to trigger a custom code when user log in?

    Hi my friends,
    We are using multiple sharepoint sites at work. Users log in with AD accounts, so they dont see any login page.
    I need to run a custom code when user login to website. Event receivers do not help at this point. Any suggestions?
    thanks in advance

    Hi Ahmet,
    From your description, my understanding is that you want to trigger some custom code when users log in SharePoint.
    As a solution, you could customize a login page for your SharePoint, then you could trigger your code.
    You could also use httpmodule to monitor user login. Please refer to this article about how to use httpmodule:
    http://sharepoint.stackexchange.com/questions/100976/get-the-current-logged-in-user-in-sharepoint-added-httpmodule
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to trigger email notification when users fail to reset your password in fim 2010 r2.

    Hi,
    how to trigger email notification when users fail to reset  your password in fim 2010 r2
    Regards
    Anil Kumar

    Hi Sylvain,
    I did all thing as you told me.First i created Criteria based Set after this we created a Workflow type Action and Actvities Type Notifcation Email template and finally i called this Workflow in MPR as Set Transition and call Set that i was created below.and
    check Advance View of Set this gives
    <Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Dialect="http://schemas.microsoft.com/2006/11/XPathFilterDialect"
    xmlns="/Request[(Creator">http://schemas.xmlsoap.org/ws/2004/09/enumeration">/Request[(Creator = 'b0b36673-d43b-4cfa-a7a2-aff14fd90522') and (RequestStatus = 'Denied or PostProcessingError')]</Filter>
    But this is not working for me so please tell me where i am wrong.
    Regards
    Anil Kumar

Maybe you are looking for