How to handle long running Processes in J2EE

Hi all,
we want to design something like a process engine on our application server. It should be possible to start processes asynchronous, so we think what we need is a message driven bean to start processes.
The problem is that there are different states while running the process and it should be possibe to request the current state at the running process. But how we get access to the process after its once started over the stateless message driven bean?
I hope you can understand the problem and maybe have a solution.
Thanks & regards
Rene G.

You are totally right, but i think my problem is not to design a good software application, my problem is to design this in j2ee. I have not so much j2ee experience in this way. Normally to solve this problem i would think about something like a container which contains one thread for each process. But i read that it is forbidden in j2ee to have your own thread management, so this seems to be a bad solution in j2ee, not at all.
I hope you understand me a little better now and i hope you don't think that i only want to utilize your knowledge to have less work by myself. I think this is a kind of j2ee specific question, which can be ask in a forum like this, isn't it?
Thanks & regards
Rene G.

Similar Messages

  • How to Handle Long running alerts in process chain...Urgent!!!

    Hi All,
    I am trying to find ways for handling long running alerts in process chains.
    I need to be sending out mails if the processes are running for longer than a threshold value.
    I did check this post:
    Re: email notification in process chain
    Appreciate if anyone can forward the code from this post or suggest me other ways of handling these long running alerts.
    My email id is [email protected]
    Thanks and Regards
    Pavana.

    Hi Ravi,
    Thanks for your reply. I do know that i will need a custom program.
    I need to be sending out mails when there is a failure and also when process are running longer than a threshold.
    Please do forward any code you have for such a custom program.
    Expecting some help from the ever giving SDN forum.
    Thanks and Regards
    Pavana
    Message was edited by:
            pav ana

  • In forms how to cancel long running process or query in 10g

    We have application which is hosted on 10g AS. Some forms has lot of processing to be done and sometimes user wants to cancel the processing in between maybe because he wants to change some value and refire processing.
    Based on the search on net 'Esc' key was used in earlier version of forms to function as User requested Cancel operation. How can same be done in 10g. Do we have to do anything in fmrweb.res for this. Is there some setting to be done in forms or in AS for this functionality.
    Does this matter on whether JInitiator is used or JPI is used for running the application?
    Edited by: suresh_mathew on May 21, 2013 1:36 AM

    Hi,
    Exit can be used to cancel query mode i.e. in case you go into query mode by Exit you can cancel query mode. Suppose you went into query mode and you have fired query which will take some time to fetch how can I abort it.
    In earlier version of form there was 'Cancel' facility wherein if triggered it used to fire an error message 'Ora--01013 user requested cancel of current operation"
    With this facility you can abort any query which is executing or any long running process which forms is currently performing.
    fmrweb.res would have entry like
    27 : 0 : "Esc" : 1001 : "Cancel"
    The above entry I picked from OPN
    Java Function Numbers And Key Mappings For Forms Deployed Over Web [ID 66534.1]
    Unfortunately this is not working for us even if I put this in frmweb.res of 10g AS
    Basically I want ability to Abort/Cancel a long running process be it query execution or standard process triggered in the form.
    Any advise or help is highly appreciated.
    Suresh

  • Handling long running processes in APEX

    Hello Experts,
    I need your help!
    I would like to call a long running PL-Proc from an Apex-App. So I build a page for the parameters with the wizzard - all fine.
    Pressing the button starts the pl-proc - thats also fine.
    Problem: While the PL-Proc is running, there is no activity signaled in the browser. There is no way to see, that something is running in the background.
    After the pl-proc is finished, the branch to an other site took place - so the "after process" action is working as desired.
    I tried "javascript:html_Submit_Progress(this);" - but this is not a solution because there is only a very short time to reload the page itself. The PL-Proc need much more time.
    Is there a way to show the user, that background action is running?
    Any Ideas?
    Thanks for your help!
    Kind regards,
    Frank

    A few things to keep in mind. The animated gif solutions don't show a true progress bar indicator, it's just an animation on a loop. If the process takes too long, you will hit the session timeout value defined for Oracle HTTP Server.
    Another thought is this. In the code that is the long running process, make calls to [dbms_application_info.set_session_longops|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_appinf.htm#i996999] that indicate the real progress in the code. Then have a page that queries v$session_longops and refreshes every x (say 5 seconds). That page could even have an animated gif on it to indicate there is still activity.
    Tyler Muth
    http://tylermuth.wordpress.com
    [Applied Oracle Security: Developing Secure Database and Middleware Environments|http://www.amazon.com/gp/product/0071613706?ie=UTF8&tag=tylsblo-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0071613706]

  • ORABPEL-05002 for long running process

    Hi everybody,
    My question is related with a long running process I have designed and which, after running for a couple of days, ends by reporting the ORABPEL-05002 error:
    ===============================================================
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ===============================================================
    Looking in the Manual Recovery screen, I can see an Activity I can recover. It's about an assign Activity where I'm doing a single boolean assignation.
    Of course, together with the ORABPEL-05002 error I got also the 'Transaction was rolled back: time out' message. Note that I have modified the transaction-timeout value to 180000. The error occurs during the night, with no heavy load of the server.
    Recovering the assign activity brings back the process in the running state.
    My process pattern:
    while (1 == 1) {
    do activity;
    wait_timeout();
    So, I have the following questions:
    1. Which is cause of this error?
    2. How may I automatically recover this lost activity? RecoveryAgent?
    Any suggestion is appreciated.
    Regards,
    amo
    P.S: the full stack of error messages reported in domain.log:
    ===============================================================
    <2006-09-18 08:08:34,101> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
    java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:873)
         at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.Exception: No Exception - originate from:
         at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:871)
         ... 10 more
    javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:08:34,129> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,236> <ERROR> <SRH.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "activity manager": Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
    ORABPEL-02094
    Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
         at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
         at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
         at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
         at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
         at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
         at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
         at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
         at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,274> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    ORABPEL-02094
    Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
         at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
         at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
         at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
         at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
         at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
         at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
         at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
         at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,275> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ===============================================================

    These are the possible cause to the problem and their solutions:
    Poor performance of the dehydration database If you are using Oracle Lite as dehydration store, please switch to use Oracle 9i or 10g. If Oracle 9i/10g is already in use, check the database parameter 'process' and 'session' to make sure it can handle the expected throughput.
    OC4J has too few available connections to the dehydration database. Increase the maxConnection number of the BPELServerDataSource at the BPEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/data-sources.xml (for developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/data-sources.xml (mid-tier installation).
    Size of message is too big Two ways to deal with this problem:
    Increase the transaction timeout at PEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/server.xml (developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/server.xml (mid-tier installation)
    Decrease the auditLevel from BPELConsole -> Manage BPEL Domain -> Configurations tab. Doing so will reduce the amount of data saved to the dehydration store.
    Cheers
    Anirudh Pucha

  • Handle long-running EDT tasks (f.i. TreeModel searching)

    Note: this is a cross-post from SO
    http://stackoverflow.com/questions/9378232/handle-long-running-edt-tasks-f-i-treemodel-searching
    copied below, input highly appreciated :-)
    Cheers
    Jeanette
    Trigger is a recently re-detected SwingX issue (https://java.net/jira/browse/SWINGX-1233): support deep - that is under collapsed nodes as opposed to visible nodes only, which is the current behaviour - node searching.
    "Nichts leichter als das" with all my current exposure to SwingWorker: walk the TreeModel in the background thread and update the ui in process, like shown in a crude snippet below. Fest's EDT checker is happy enough, but then it only checks on repaint (which is nicely happening on the EDT here)
    Only ... strictly speaking, that background thread must be the EDT as it is accessing (by reading) the model. So, the questions are:
    - how to implement the search thread-correctly?
    - or can we live with that risk (heavily documented, of course)
    One possibility for a special case solution would be to have a second (cloned or otherwise "same"-made) model for searching and then find the corresponding matches in the "real" model. That doesn't play overly nicely with a general searching support, as that can't know anything about any particular model, that is can't create a clone even if it wanted. Plus it would have to apply all the view sorting/filtering (in future) ...
    // a crude worker (match hard-coded and directly coupled to the ui)
    public static class SearchWorker extends SwingWorker<Void, File> {
        private Enumeration enumer;
        private JXList list;
        private JXTree tree;
        public SearchWorker(Enumeration enumer, JXList list, JXTree tree) {
            this.enumer = enumer;
            this.list = list;
            this.tree = tree;
        @Override
        protected Void doInBackground() throws Exception {
            int count = 0;
            while (enumer.hasMoreElements()) {
                count++;
                File file = (File) enumer.nextElement();
                if (match(file)) {
                    publish(file);
                if (count > 100){
                    count = 0;
                    Thread.sleep(50);
            return null;
        @Override
        protected void process(List<File> chunks) {
            for (File file : chunks) {
                ((DefaultListModel) list.getModel()).addElement(file);
                TreePath path = createPathToRoot(file);
                tree.addSelectionPath(path);
                tree.scrollPathToVisible(path);
        private TreePath createPathToRoot(File file) {
            boolean result = false;
            List<File> path = new LinkedList<File>();
            while(!result && file != null) {
                result = file.equals(tree.getModel().getRoot());
                path.add(0, file);
                file = file.getParentFile();
            return new TreePath(path.toArray());
        private boolean match(File file) {
            return file.getName().startsWith("c");
    // its usage in terms of SwingX test support
    public void interactiveDeepSearch() {
        final FileSystemModel files = new FileSystemModel(new File("."));
        final JXTree tree = new JXTree(files);
        tree.setCellRenderer(new DefaultTreeRenderer(IconValues.FILE_ICON, StringValues.FILE_NAME));
        final JXList list = new JXList(new DefaultListModel());
        list.setCellRenderer(new DefaultListRenderer(StringValues.FILE_NAME));
        list.setVisibleRowCount(20);
        JXFrame frame = wrapWithScrollingInFrame(tree, "search files");
        frame.add(new JScrollPane(list), BorderLayout.SOUTH);
        Action traverse = new AbstractAction("worker") {
            @Override
            public void actionPerformed(ActionEvent e) {
                setEnabled(false);
                Enumeration fileEnum = new PreorderModelEnumeration(files);
                SwingWorker worker = new SearchWorker(fileEnum, list, tree);
                PropertyChangeListener l = new PropertyChangeListener() {
                    @Override
                    public void propertyChange(PropertyChangeEvent evt) {
                        if (evt.getNewValue() == SwingWorker.StateValue.DONE) {
                            //T.imeOut("search end ");
                            setEnabled(true);
                            ((SwingWorker) evt.getSource()).removePropertyChangeListener(this);
                worker.addPropertyChangeListener(l);
                // T.imeOn("starting search ... ");
                worker.execute();
        addAction(frame, traverse);
        show(frame)
    }

    At the end of the day, it turned out that I asked the wrong question (or right question in a wrong context ;-): the "problem" arose by an assumed solution, the real task to solve is to support a hierarchical search algorithm (right now the AbstractSearchable is heavily skewed on linear search).
    Once that will solved, the next question might be how much a framework can do to support concrete hierarchical searchables. Given the variety of custom implementations of TreeModels, that's most probably possible only for the most simple.
    Some thoughts that came up in the discussions here and the other forums. In a concrete context, first measure if the traversal is slow: most in-memory models are lightning fast to traverse, nothing needs to be done except using the basic support.
    Only if the traversal is the bottleneck (as f.i. in the FileSystemModel implementations of SwingX) additional work is needed:
    - in a truly immutable and unmodifiable TreeModel we might get away with read-only access in a SwingWorker's background thread
    - the unmodifiable precondition is violated in lazy loading/deleting scenarios
    there might be a natural custom data structure which backs the model, which is effectively kind-of "detached" from the actual model which allows synchronization to that backing model (in both traversal and view model)
    - pass the actual search back to the database
    - use an wrapper on top of a given TreeModel which guarantees to access the underlying model on the EDT
    - "fake" background searching: actually do so in small-enough blocks on the EDT (f.i. in a Timer) so that the user doesn't notice any delay
    Whatever the technical option to a slow search, there's the same usability problem to solve: how to present the delay to the end user? And that's an entirely different story, probably even more context/requirement dependent :-)
    Thanks for all the valuable input!
    Jeanette

  • Question : Scheduling a Long Running Process in BPEL

    Hi All,
    I have a doubt regarding deployment and scheduling of a Long Running Process in BPEL console like the way we schedule a concurrent program in Oracle Apps.
    Business Scenario:
    We have developed a BPEL process to pull data from the Database, do the required transformation and then enqueue the transformed data in a queue present in another database.
    Then a Java program will pick the data from the queue and then generate an XML file and send it to FTPserver of the Trading Partners(TP's).
    We have two Trading Partners and hence the generated XML will be put into the appropriate FTP servers of the TP's.
    The BPEL processing for both the Trading Partners is identical. Only the generated XML is put in different FTP servers.
    My question here is:
    1. Since the processing is same for both the TP's, how can we use the same process for both the Trading Partners.Can we handle it in the BPEL process itself ?
    2. Is there any way to schedule the same process in BPEL console, to first run for Trading Partner TP1 and wait for say 15 mins and then run for another Trading Partner TP2 and this cycle should continue since we will be deploying it in production environment and continuous updation of the transactions will be happening in the database.
    So far my knowledge in BPEL goes, i could not find any way to schedule a process in BPEL console. If any one has come across similar scenario, please post your updates/approach which will help us in defining the architecture for our client.
    Thanks In Advance,
    Cheers
    Dibya

    Hi Marc,
    Thanks a Lot for ur inputs.
    Need some more clarification for quetsion no.1 in my previous post.
    From our BPEL process we are calling a package which takes the Trading Partner name as the input and some other parameters. Our BPEL process will be run for both the Trading Partners since the processing is identical.
    If we develop two different processes for both Trading Partners, then there will be locking issues in the database since both the processes will refer to the same table.
    Hence we were looking for an option where we can use the same process for both the Trading Partners. Is there any way to handle it in BPEL process.
    Your inputs will be really helpful.
    Thanks In Advance,
    Dibya

  • Correlating to long running process

    I'm trying to set up a long running process that handles item-storage. For handling of the BPEL I have a process which needs to tell the long running process which item is stored in that particular storage. For example: i have 200 bins, which can contain up to 100 items. As the bins are handled individually (when filled), I need the 100 bpels that handle the items to wait until the long running process is finished.
    So, I figured to make a BPEL that accepts 2 messages: 'initiate' and 'addItem'. Initiate sets up the bin and waits until filled before handling the bin.
    The addItem is placed in a onMessage branch. This branch should be 'create Instance = no", as the instance is created when the bin is initiated. I get one initiate message and 100 addItem messages. Initiate & additem are correlated, so I should only receive the messages for this particular bin. However, when I try to compile this process, I get the following message:
    Error(36): [Error ORABPEL-10050]: no create instance activity [Description]: in line 36 of "L:\workspaces\MyTests\LongRunningProcess\LongRunningProcess.bpel", There is not an activity (receive/pick) to start the process. [Potential fix]: You might want to set createInstance="yes" for this <receive> / <pick>.
    Well, the 'fix' is not quite what I had in mind. I cannot have a createInstance='yes' here, as the instance is already created when I started handling the bin. Besides, I have to handle 100 incoming messages, not just 1.
    I have a need for this kind of pattern, as I have a lot of converging & diverging messages in our processing. Diverging is easy, converging is giving me a lot of headaches.
    Anyone has ideas how to help me find a solution for this? Thanks in advance!

    Hi,
    1) You could use conversation for the first issue which are designed for this usecase.
    Conversations are essential for any web service involved in asynchronous communication. This includes web services that communicate with clients using callbacks or polling interfaces, and web services that use controls with callbacks.
    More info at http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/converse/navMaintainingStatewithConversations.html
    Thanks
    Vimala

  • ProgressIndicator and  hourglass for long running processes

    Hi all,
    Iam using Oracle ADF 10g with EJBs.
    I have a long running process for which I want to give the user an indication of its progress. The process is run upon clicking a submit button.
    I have tested the use of the combination of progressIndicator + poll according to the example of Gerger consulting( http://gergerconsulting.blogspot.com/2007/04/adf-faces-progressindicator-example-for.html) but it did not work. The problem is that my long running process hangs the page and the progress bar does not work until the process has finished.
    I have seen a similar post in this foum (Re: How to run long background jobs in ADF applications where a user complains that there is not an Oracle method for running asynchronous processes from Oracle ADF.
    I've tested to isolate my asynchronous process with the progressIndicator + poll in a single ADF page. The process is being activated from an invokeAction from the executables of the pagedef file. But again the process hangs the page and the progressIndicator does not display at all.
    So I have abandoned the idea of the progress indicator and Iam thinking of using an hourglass.
    Is there an example or guidelines of how I can do it?

    Thanks John for your reply,
    Iam still working on the progressIndicator. I have read the discussion thoroughly quite many times.
    One thing I have not yet figured out from your discussion is how you manage to create the long-running-process thread within an action method within the managed bean and make the thread still be active, while the parent action method has finished.
    Usually the managed beans attached to a .jspx pages has request scope. So a commandButton's action method (that will spawn the long running thread) will finish much earlier than the thread and it will kill the thread.
    Thanks,
    Dimitris

  • GF 3.1.1 Admin Console Freeze -- A long-running process has been detected

    I installed Glassfish 3.1.1 on both sparc and intel servers for solaris 10 & 11 platform. All my servers have the same symptom when I access the admin console. The console freezed and pop-up a message "A long-running process has been detected". There is nothing I can do at this point. I've tried accessing from different PC with different browsers (IE, Firefox 5, Chrome and Safari), but nothing is working including clearing the cache. Also, tried uninstall and install again (with and without updatetool) many times. Any idea how do I stop the popup message? Am I the only one has this problem? I'm using JDK 1.7 (GF 3.1.1 support JAVA 7). I need help!!!!!
    Thanks,
    - Johnny

    The only fix I know of for this issue is to reboot the host.
    If there is another fix someone please let me know as I have users who run into this often.
    Thanks
    Bonnie.Partridge

  • How to continue the running process behind the model dialogue box options ?

    How to continue the running process behind the model dialogue box options like this
    In Updation of K7 user press the Cancel Button
    New dialogue box appear with Yes/No options.
    But the backend updation is going on... not Pause the updation.
    Like this how to do ?
    Please provide me code.

    I don't know, if you mean you have done your form or you have solved the problem.
    It's visible your code is only partly reflecting your screenshot, and that's okay to demonstrate the problem you have given a fine example.
    As you marked my suggestion as solution this may not be needed anymore, but here's how I modified your code and used a self made QuestionBox instead of messagebox.
    The essential part is defining a callback method and letting the QuestionBox call back there. It's not essential I used RAISEEVENT, but it's fine as it has all the behaviour and parameters needed to call back.
    Public oTestFrm
    oTestFrm=Createobject("MyForm_Model_to_NonModel")
    oTestFrm.Show
    Define Class MyForm_Model_to_NonModel As Form
    onxx = 0
    Add Object lbl_DispValue As Label With Top=90, Left = 120, Width = 50, Height=30, Caption=''
    Add Object cmd_Start As CommandButton With Top=120, Left = 120, Width = 50, Height=30, Caption='Start'
    Add Object cmd_Stop As CommandButton With Top=120, Left = 190, Width = 50, Height=30, Caption='Stop', Enabled =.F.
    Procedure cmd_Start.Click
    This.Enabled =.F.
    Thisform.cmd_Stop.Enabled =.T.
    Thisform.onxx = 0
    Do While Thisform.onxx < 90000000
    DoEvents
    Thisform.onxx = Thisform.onxx +1
    Thisform.lbl_DispValue.Caption = Transform(Thisform.onxx)
    Enddo
    This.Enabled =.T.
    Thisform.cmd_Stop.Enabled =.F.
    Thisform.lbl_DispValue.Caption = ''
    Procedure cmd_Stop.Click
    * Here, I want NO PAUSE -- (Show running numbers continuously...)
    * how to control Model to NonModel in Messagebox.
    QuestionBox('Really stop the process', Thisform, 'handleanswer')
    Endproc
    Procedure handleanswer
    Lparameters tlYes
    If tlYes && means Stop
    Thisform.onxx = 99999999999999999
    Endif
    Endproc
    Enddefine
    Procedure QuestionBox()
    Lparameters tcMessage, toCaller, tcCallback
    If Not Pemstatus(_Screen,"oForms",5)
    _Screen.AddObject("oForms","Collection")
    Endif
    oMsgBox = Createobject("QuestionBoxForm", tcMessage, toCaller, tcCallback)
    _Screen.oForms.Add(oMsgBox)
    oMsgBox.Show(2)
    Endproc
    Define Class QuestionBoxForm As Form
    Autocenter = .T.
    AlwaysonTop = .T.
    Minwidth = 200
    Add Object label1 As Label With AutoSize=.T., WordWrap =.T.
    Add Object cmdYes As CommandButton With Caption = "Yes", Width=40
    Add Object cmdNo As CommandButton With Caption = "No", Width=40
    Procedure Init()
    Lparameters tcQuestion, toCaller, tcCallback
    Thisform.label1.Caption = tcQuestion+" ?"
    This.AddProperty("oCaller",toCaller)
    This.AddProperty("cCallback",tcCallback)
    This.Width = Max(This.Minwidth, Thisform.label1.Width)
    Thisform.label1.Left = (This.Width-Thisform.label1.Width)/2
    This.Height = Thisform.label1.Height+48
    This.cmdYes.Left = This.Width/2 - 10 - This.cmdYes.Width
    This.cmdNo.Left = This.Width/2 + 10
    This.cmdYes.top = Thisform.label1.Height+24
    This.cmdNo.top = This.cmdYes.top
    Endproc
    Procedure cmdYes.Click
    #Define clYes .T.
    Raiseevent(Thisform.oCaller,Thisform.cCallback,clYes)
    Thisform.Release()
    Endproc
    Procedure cmdNo.Click
    #Define clNo .F.
    Raiseevent(Thisform.oCaller,Thisform.cCallback,clNo)
    Thisform.Release()
    Endproc
    Enddefine
    I didn't yet introduced a timer for counter display updates. As you see the counter hangs a bit, if you mouse over your form, but it is a way of multithreading without using a separate thread and instead keep the rest of the application active by DOEVENTS
    in the long running loop code.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

  • Long running process/query

    One of my after submit processes involves a lot of processing, temp tables, sorting, aggregating, etc.
    When this process is invoked from a page, is there a way to put up a generic 'Processing...' page that auto refreshes and when my back-end process is done, takes me to my results page?
    Thanks

    Let me see if I understand you...
    So, the first page (that would have invoked the long running process) branches to the "processing page". That page has a onload that does doSubmit(). The after submit process on this processing page calls my long running process via dbms_job. When the long running process ends, the branch on the processing page takes me back to the first page (or whereever).
    But then as far as the browser is concerned, the processing page never "finishes loading". IE's progress bar would creep ahead sloooowly and it would appear as if the page is loading for a looong time!
    Wouldnt it be cleaner to use the META refresh tag like John was suggesting?
    Also, using either of your approaches, how would I allow the user to "Cancel" the long running process and go back to the first page?
    Could you please put up a quick sample of this in action on htmldb.oracle.com?
    Thanks

  • Call long running process and return immediately

    Hi everyone,
    Here' my problem : I am calling an onDemand application process when clicking on a button. It's a very long running process; and while waiting for the response my browser stops responding (white page).
    So, is there a way to call a process and return immediately to the javascript. The process will set a field to a given value when it finishes. In javascript side, I can then check in a while boucle the value of this field to know if the process has ended.But I dont know how to return just after the application process call ...
    Thanks and best regards,
    Othman

    I presume that you can achieve that by means of a batch job.
    You can use an automatic page reload every X seconds until a certain "flag" (or similar mechanism) changes state and check it in a before header process. In the meanwhile you can display some animated GIF for instance.
    Once the processing is completed you remove the reload timer from the header or you branch to a different page using a programmatic technique like procedure owa_util.redirect_url.
    Bye,
    Flavio
    http://www.oraclequirks.blogspot.com/search/label/Apex

  • How to stop the running process chain

    How to stop the running process chains or infopackges...just qm status change is enought?

    BI - SM 37 - Kill the Job
    ECC - SM 50 - Kill the job

  • Does a long running process survive a server crash

    Hi, I assume the bpel dehydration means that a long running process can survive a server crash, but I'd like some expert to confirm this.
    Suppose I have a long running process which is in an infinite loop to keep invoking a web service. In the middle of it, the server is either stopped or crashed. When the server comes back, will the process continue from where it was left?
    Thanks.

    Yes. Your understanding is correct. Give it a try. After restart, go to the BPEL console and click under the processes tab on the "Run Recovery Agent" link. -Edwin

Maybe you are looking for

  • Hp printer 8620

    I just got the office jet 8620.  I took the sole paper tray out in my way to set up the machine.  It happens that the tray came out with ease but now it wont go in.  I made sure that I put it in the tracks, etc.  But no way.  HP sent me a new tray to

  • How to Archive and Purge SLA data?

    We are looking for a solution to archive and purge SLA tables. I have opened an SR with Oracle and they suggested to work with third party who specialized in archiving and purging data. I would like to see if any of the clients have developed a custo

  • Turned camera on its side to take a movie. The movie is also on its side.

    I took a movie of my grandson's wedding, turning my SX40HS on its side.  When I downloaded the movie, it too was on its side.  How do I get it right side up?

  • InDesign CC 2014 crashing and... why thousands of unique links?

    I have issues with my version of InDesign. After working with larger files for a while, Indesign starts lagging and behaving strange and then craches. It can take 10 minutes, 40 minutes, 5 minutes - it dosen't really matter, it suddenly happens. Can

  • Forms icons

    Hi, I have created a little application with Forms Builder in Oracle Dev suite 10g. Is it possible to change the provided toolbar icons of forms with personal icons ? If yes, how can I perform this ? Thank You and Best Regards Gaetano