Dialog Tasks one after another

Hi All,
This is regarding ECM workflow. The workflow gets stuck at 'CHECKSTATUS" step.
Generally, (for any workflow) if there are two dialog tasks one after another being sent to the same agent,
how and why the workitem of the second task automatically opens up ?
I mean it gets executed automatically. I do not have to go to inbox again. Any Idea ?
Thanks
Deb

Hi,
There is a setting in the workflowstep definition.
If your step is an activity, go to the second tab (details)
Then check the Work Item Response. Second option is Advance with dialog.
If this is checked then at runtime the second workitem will automatically open for the same agent.
If it is unchecked then at runtime the agent has to get back to the inbox to open the second workitem.
Hope this helps
Kr
Robert

Similar Messages

  • How do I run mutiple tasks one after another after each one finishes?

    Ok so I have a loop like this:
    for(int i = 0;i < this.totalItems();i++){
       model.setCurrentPhoto(i+1);
       messagebox("current photo: "+model.getCurrentPhoto());
       model.setWaiting(this.totalItems()-model.getUploaded());
       model.setProcPhoto(this.getfile(i));
       task = new Task();
       task.addPropertyChangeListener(this);
       task.execute();
      ///while( !task.isDone() == true ){} // HAHA>>> made this attempt...didn't work out to well...lol
    }and this loop may instigate one task creation (easy and works now) OR it could loop twice in which case the tasks just collide and my progress bar ( in the other part of the application ) is ...uhh...for lack of a better word...FUBAR!
    So here is my nice and easy question (for all you geniuses out there), how can I make these tasks go one after the other...I am not completely hopless cause my attempts (though pathetic. trust me..i know :) would be something like:
    taskwait() // but here what will it wait for?
    TaskQueue queue = new TaskQueue;// use this??
    Thanks - I am so lost...this will complete my program when I get this working...help me out please and thank you,
    Adam

    alright so this is what i did (still gotta question :)
    // This is how I defined it
    private Task[] task;
    // Then this in the constructor
    task = new Task[TOTAL_IMAGES]; // max of TOTAL_IMAGES (which is 10) for tasks also
    // This is somewhere in the program
    for(int i = 0;i < this.totalItems();i++){
        model.setCurrentPhoto(i+1);
        model.setWaiting(this.totalItems()-model.getCurrentPhoto());
        model.setProcPhoto(this.getfile(i));
        // Create the task and execute
        task[i] = new Task();
        task.addPropertyChangeListener(this);
    task[i].execute();
    I gotta have something at the end or at the start of the loop stop the tasks for starting and sort of put them on a queue.  How do I do that?
    EDIT: SORRY for the double post...dunno how i was that stupid not to edit the last point...duuuhhhh...lol
    Adam
    Edited by: ScottyAdam on Dec 19, 2009 1:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to play two presentations from the DMP one after another and looping

    Can anyone help me on this.I want to play two presenations one after another and looping from the DMP.

    Semuhtu,
    The easiest solution for looping two or more DMD presentations
    is to create a nested playlist within DMD.  You simply
    create a master presentation and add a playlist to this
    presentation.  Add the desired presentations to this playlist
    and then schedule or send the Action to the DMP(s) to play
    the Master Presentation.  The 2 or more child presentations will
    play and loop until you stop it manually.
    Summary of Tasks
    * Using DMD create Presentations (2 or more) that you would like
      to display on the DMP-Display(s).
    * After the presentations are created, you will need to find out
      what the URL addresses are for each presentation. Using the
      "Actions" drop down on the DMM-DMP Manager screen, you select
      a DMP and send the Presentation to the DMP.  Once the DMP displays
      the presentation, access the DMP-DM Web admin page and copy the URL
      address in the "Startup URLs-->Browser" field.   Repeat this process
      for each DMD presentation that you want to loop.
      For example:
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_95_.htm
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_96_.htm
      and so on...
    * Another parameter or variable that you will need to find out is
      the duration of your DMD presentation(s).  Some Presentations may be
      a slideshow of images and some may contain videos.  Your will need to
      play each presentation on the DMP to determine the duration length of
      each presentation that you will add to the looped playlist. 
    * Create a Master presentation using DMD. In this presentation, you will
      create add a "Playlist" to the presentation by selecting the Playlist
      button-drop down.  Select "All Media Types" and a Playlist object will
      be added to the Master presentation.
      - Double-click on the object to add content
      - Select "Add URL" button in the Playlist Content window.
      - Fill in the required fields (URL Title & Link) in the "Add URL"
        window.  Repeat the process for each presentation that you want
        to add.
      - Set the Duration for each item in the Playlist. Select the Item
        in the list and then DOUBLE-CLICK on the "Planned Duration"
        field and edit the time to desired duration.  Repeat process for
        each item.
      - Save Master Presentation
    * Schedule or use the  "Actions" drop down on the DMM-DMP Manager screen
      send the Master Presentation to the DMP(s).  The Playlist will play and
      Loop after the last item in the Master Playlist.
    If this answers your question, Please take time to mark this
    discussion answered & rate the response.
    Thank You!
    T.

  • Execute functions one after another

    I would like to make a function that could execute other
    functions
    execute the one after another - in a manner that the next
    function is executed only after the one before has finished its
    task
    I have been thinking about how to achieve this but haven`t
    come up with anything good.
    If you have any ideas please share
    Thanks in advance

    hey,
    what you want to is no problem at all. you just need to have
    conditional statements within your main function that tell it when
    to execute your other functions.
    here is an example:

  • IDCS6 MACOSX JS: Data Merging many txt files one after another

    Hello everybody.
    I have a situation where I have to data-merge many text files to the one actual indesign "base" file. The formats of the databases are all the same, the point of difference is a code in the second field of the database that refers to a mailing zone (not a zip/postcode, a "distribution centre" code that has 56 or so possibilities). I would prefer to data merge one file and then somehow split the resulting PDF via Acrobat, but the length of the resulting mailing zones is inconsistent and something that can't be done though the "split document" feature in acrobat.
    The database starts out as one massive file but using a one-line  code, can be split into its mailing zones into separate text files.
    My ultimate question: is there any way to data merge more than one file at once (e.g. one after another) and give them their names based on the names of the input text file?
    Ole Kvern had a script to Data Merge one file without the UI. I have altered the last line slightly so that it outputs to a PDF based on [High Quality Setting]:
    if(app.documents.length != 0){
            var myDocument = app.activeDocument;
            app.dataMergeOptions.removeBlankLines = true;
            //Select a source file.
            var myDataFile = File.openDialog("Select a data file")
            var exported = "file location(redacted for the sake of this post)"
            if(myDataFile != ""){
                    myDocument.dataMergeProperties.selectDataSource(myDataFile,);
                    myDocument.dataMergeProperties.exportFile(exported,"[High Quality Print]",);
    I figure the answer has to do with the variable "myDataFile" and rather than being simply open a dialog, it would be somehow selecting an array of text files, but this is where I am out of my depth.
    Any insights or other thoughts that may not involve trying to do many merges at once but may somehow revolve around one large merged PDF?
    Many thanks
    Colin

    I've answered my own question, but the answer lies outside of Adobe InDesign – it uses bookmarks within Adobe Acrobat.
    1) Data Merge the art/data to one large PDF file.
    2) In the resulting PDF file, manually search out the mailing zones and apply bookmarks to each first instance only of each mailing zone. In this case, it is a manual process of find/replace to find one of 70 possible mailing zones that may be used in any database. Each bookmark should be named with its respective code. It is a manual process, but it would take 5 minutes so this is acceptable.
    3) Using "Split Document" from the pages panel, make sure the "top level bookmarks" radio button is checked, and in the Output Options make sure that the "Use bookmark names for files" radio button is checked.
    I'm aware that this was a rather obscure question that only a fraction of users on this forum may wish to know an answer for, but hopefully this workaround helps someone else in a similar situation.
    Colin

  • When I try and open Microsoft Word 2011 documents they start opening one after another at a rapid speed and I can't stop it. I reboot and same thing happens?

    When I try and open Microsoft Word 2011 documents on my  IMAC they start opening one after another at a rapid speed and I can't stop it. I reboot and same thing happens. The documents open in rapid succession on their own and don't stop until I force close or after maybe 100 or more open I start getting the following message for each document attemting to open "This document could not be registered. It will not be possible to create links from other documents to this document" and then in paretheses the name of the document. After I click okay another trys to open. Any suggestions?

    If you had multiple documents open and quit the app without closing all of the docs first, it will open them again when you launch the app. Open Word, and then close all the documents, you may be asked to save the document, if the document was already saved but you made changes to it before you quit the app, you may need to save the changes first, shorcut ( command and s keys). After you close all of the documents then quit the app and restart the computer. See if this works.

  • Displaying images in canvas one after another

    Hi all,
    I have a problem displaying images in canvas one after another. I am using for loop and when i run the application, all images run back in the and only finally only the last image gets displayed in the emulator. I also used thread.sleep(). But it din't work.
    Here is my code:
    // A canvas that illustrates image drawing
    class DrawImageCanvas extends Canvas
    Image image;
    public void paint(Graphics g)
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    String images[]={"paint_2.PNG","radha.PNG","cute.png","design.png","flowers.png"};
    for(int i=0;i<images.length;i++)
    image = null;
    System.out.println("/"+images);
         try
         image = Image.createImage("/"+images[i]);
    catch (IOException ex)
    System.out.println(ex);
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    return;
    if (image != null)
    g.drawImage(image, width/2, height/2, Graphics.VCENTER | Graphics.HCENTER);
    try
    Thread.sleep(5000);
    catch(Exception ex)
         System.out.println("the exception is.."+ex);
    Help me and Thanks in advance.

    See the code below : prefer the use of a Timer and a TimerTask instead of Thread.sleep().
    showNotify (from Canvas) is used to launch the timer.
    import java.io.IOException;
    import java.util.Timer;
    import java.util.TimerTask;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    public class DrawImage extends Canvas {
        Image image;
        String images[] = {"img1.png", "img2.png", "img3.png", "img4.png", "img5.png",
                            "img6.png", "img7.png"};
        Image[] tabImage;
        int imageCounter = 0;
        public DrawImage(){
            try {
                tabImage = new Image[images.length];
                for (int i = 0; i < images.length; i++)
                    tabImage[i] = Image.createImage("/" + images);
    } catch (IOException ex) {
    ex.printStackTrace();
    public void paint(Graphics g) {
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    image = tabImage[imageCounter];
    if (image != null)
    g.drawImage(image, width / 2, height / 2, Graphics.VCENTER | Graphics.HCENTER);
    else{
    System.out.println("null");
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    protected void showNotify(){
    Timer t = new Timer();
    t.schedule(new PhotoSwitcher(), 5000, 5000);
    private class PhotoSwitcher extends TimerTask{
    public void run() {
    if (imageCounter < images.length - 1)
    imageCounter++;
    else
    imageCounter = 0;
    repaint();
    I hope this will help you !
    fetchy.
    Edited by: fetchy on 14 ao�t 2008 09:48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Playing movies in Front Row one after another automatically?

    I have a number of short video clips that I can watch with Front Row. However, every time a clip ends, I have to go and click “play” on the next clip and this is annoying. I am wondering if there is a way to make movies play one after another without stopping. Thanks for the help!

    David,
    Thanks for the help. I'm still thinking there must be SOME way to pull this off. It seems like Mac's can do just about anything if you take the time to figure it out. Why wouldn't the people who designed Front Row not add this feature? It doesn't make any sense. There has to be a way. Anybody else have any ideas?

  • JMF Play files in a sequence one after another

    Hi
    i developed a JMF based player for playing more than one files in a sequence one after another.
    problem is that it playes all files at same time.
    it should run 2nd file when one file is completed.

    I think time period or state of media will be helpful

  • How do i play two sound file one after another

    Hi All,
    How do i play two sound file one after another using single AudioClip Component?.
    Advance in thanks
    Manivel

    AudioClip gives you very little control over what happens to the sound, it also isn't capable of playing long clips or waiting until a clip ends. It will play multiple clips over top of each other.
    To do what you want you should use the facilities of javax.sound. Here's a post with an example: http://forum.java.sun.com/thread.jspa?forumID=513&threadID=450768
    There is also a tutorial, but its example fails for long clips.

  • One after another

    Hello,
    SQL> with my_table as
      2             (
      3            select 'M082012' pera, to_number(10584338) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
      4            select 'M092012' pera, to_number(15965177) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
      5            select 'M082012' pera, to_number(14254501) snr, to_number(20) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      6            select 'M012013' pera, to_number(14254505) snr, to_number(15) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      7            select 'M012013' pera, to_number(14254506) snr, to_number(15) pnr, 'Wallen' name, 'Monika' f_name from dual union all
      8            select 'M082012' pera, to_number(10584339) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
      9            select 'M092012' pera, to_number(15965178) snr, to_number(10) pnr, 'Beule' name, 'Anna' f_name from dual union all
    10            select 'M012013' pera, to_number(10674833) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    11            select 'M012013' pera, to_number(10674834) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    12            select 'M082012' pera, to_number(10674835) snr, to_number(15) pnr, 'Tester' name, 'Toni' f_name from dual union all
    13           select 'M012013' pera, to_number(10539210) snr, to_number(30) pnr, 'Klose' name, 'Werner' f_name from dual union all
    14           select 'M012013' pera, to_number(12345678) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    15           select 'M012013' pera, to_number(22345789) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    16           select 'M082012' pera, to_number(10584346) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    17           select 'M062012' pera, to_number(10550971) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    18           select 'M092012' pera, to_number(15965185) snr, to_number(77) pnr, 'Carl' name, 'Frank' f_name from dual union all
    19           select 'M082012' pera, to_number(10584352) snr, to_number(50) pnr, 'Meier' name, 'Otto' f_name from dual union all
    20           select 'M092012' pera, to_number(15965191) snr, to_number(80) pnr, 'Duster' name, 'Hucke' f_name from dual)
    21       select case when pera = 'M012013' and rn3 = 1 then '*' end mark,
    22              pera,
    23              snr,
    24              pnr,
    25              name,
    26              f_name,
    27              case when pera = 'M012013' and rn3 = 1 then snr end mark_snr
    28         from (select pera, snr, pnr, name, f_name,
    29                      row_number() over (partition by pera, pnr, snr, name, f_name order by pnr, name) rn,
    30                      row_number() over (partition by pera, name, f_name order by pnr) rn3
    31                 from (select pera, snr, pnr, name, f_name,
    32                              max(case when pera = 'M012013' then 'Y' end)
    33                              over(partition by upper(name||f_name)) m_flag,
    34                              count(*) over(partition by upper(name||f_name)) cnt
    35                         from my_table)
    36                        where m_flag = 'Y'
    37                          and cnt > 1
    38                order by 4,5,6, to_number(substr(pera,4,4)||substr(pera,2,2)) desc)
    39       order by 4,5,6, to_number(substr(pera,4,4)||substr(pera,2,2)) desc,3
    40  /
    M PERA           SNR        PNR NAME   F_NAME   MARK_SNR
    * M012013   10674833         15 Tester Toni     10674833
      M012013   10674834         15 Tester Toni
      M092012   15965177         15 Tester Toni
      M082012   10674835         15 Tester Toni
    * M012013   14254505         15 Wallen Monika   14254505
      M012013   14254506         15 Wallen Monika
      M082012   14254501         20 Wallen Monika
    * M012013   12345678         50 Meier  Otto     12345678
      M012013   22345789         50 Meier  Otto
      M082012   10584352         50 Meier  Otto
    10 Zeilen ausgewählt.
    SQL>
    SQL> I would like to get the SNR column values one after another in MARK_SNR Column.
    It is possible to get the following output with a sql statement???
    M PERA           SNR        PNR NAME   F_NAME   MARK_SNR
    * M012013   10674833         15 Tester Toni     10674833, 10674834, 15965177, 10674835
    * M012013   14254505         15 Wallen Monika   14254505, 14254506, 14254501
    * M012013   12345678         50 Meier  Otto     12345678, 22345789, 10584352

    Try this:
    WITH my_table AS
            (SELECT 'M082012' pera,
                    TO_NUMBER (10584338) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965177) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (14254501) snr,
                    TO_NUMBER (20) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (14254505) snr,
                    TO_NUMBER (15) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (14254506) snr,
                    TO_NUMBER (15) pnr,
                    'Wallen' name,
                    'Monika' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584339) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965178) snr,
                    TO_NUMBER (10) pnr,
                    'Beule' name,
                    'Anna' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10674833) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10674834) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10674835) snr,
                    TO_NUMBER (15) pnr,
                    'Tester' name,
                    'Toni' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (10539210) snr,
                    TO_NUMBER (30) pnr,
                    'Klose' name,
                    'Werner' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (12345678) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M012013' pera,
                    TO_NUMBER (22345789) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584346) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M062012' pera,
                    TO_NUMBER (10550971) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965185) snr,
                    TO_NUMBER (77) pnr,
                    'Carl' name,
                    'Frank' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M082012' pera,
                    TO_NUMBER (10584352) snr,
                    TO_NUMBER (50) pnr,
                    'Meier' name,
                    'Otto' f_name
               FROM DUAL
             UNION ALL
             SELECT 'M092012' pera,
                    TO_NUMBER (15965191) snr,
                    TO_NUMBER (80) pnr,
                    'Duster' name,
                    'Hucke' f_name
               FROM DUAL),
         t AS
            (  SELECT CASE WHEN pera = 'M012013' AND rn3 = 1 THEN '*' END mark,
                      pera,
                      snr,
                      pnr,
                      name,
                      f_name,
                      CASE WHEN pera = 'M012013' AND rn3 = 1 THEN snr END mark_snr
                 FROM (  SELECT pera,
                                snr,
                                pnr,
                                name,
                                f_name,
                                ROW_NUMBER ()
                                OVER (PARTITION BY pera, pnr, snr, name, f_name
                                      ORDER BY pnr, name)
                                   rn,
                                ROW_NUMBER ()
                                OVER (PARTITION BY pera, name, f_name ORDER BY pnr)
                                   rn3
                           FROM (SELECT pera,
                                        snr,
                                        pnr,
                                        name,
                                        f_name,
                                        MAX (CASE WHEN pera = 'M012013' THEN 'Y' END)
                                           OVER (PARTITION BY UPPER (name || f_name))
                                           m_flag,
                                        COUNT (*)
                                           OVER (PARTITION BY UPPER (name || f_name))
                                           cnt
                                   FROM my_table)
                          WHERE m_flag = 'Y' AND cnt > 1
                       ORDER BY 4,
                                5,
                                6,
                                TO_NUMBER (
                                   SUBSTR (pera, 4, 4) || SUBSTR (pera, 2, 2)) DESC)
             ORDER BY 4,
                      5,
                      6,
                      TO_NUMBER (SUBSTR (pera, 4, 4) || SUBSTR (pera, 2, 2)) DESC,
                      3)
    SELECT *
      FROM (SELECT MARK,
                   PERA,
                   SNR,
                   PNR,
                   NAME,
                   a.F_NAME,
                   CASE
                      WHEN mark = '*' THEN
                            MARK_SNR
                         || ','
                         || SUBSTR (b.str, INSTR (b.str, ',', 1) + 1)
                   END
                      mark_snr
              FROM t a,
                   (  SELECT f_name,
                             listagg (SNR, ',') WITHIN GROUP (ORDER BY pera) str
                        FROM t
                    GROUP BY f_name) b
             WHERE a.f_name = b.f_name)
    WHERE mark_snr IS NOT NULL;OUTPUT:
    MARK     PERA     SNR     PNR     NAME     F_NAME     MARK_SNR
    *     M012013     10674833     15     Tester     Toni     10674833,10674834,10674835,15965177
    *     M012013     14254505     15     Wallen     Monika     14254505,14254506,14254501
    *     M012013     12345678     50     Meier     Otto     12345678,22345789,10584352Cheers,
    Manik.

  • Run Jobs One After Another

    I know this is possible, I'm not sure how to go about it using Oracle's Scheduler. I simply want to create a special "queue" that I can submit jobs to which will run one after another. After they run, then then are gone. There many be no jobs at anyone time, and then at other times I may submit 10 jobs to the queue. Currently when I submit jobs they all run parrallel, this is not what I want. I guess I don't understand why Oracle calls it a Job Queue when all my jobs run in parrallel and not in a queue as the name implies.
    This is not say that I don't have other jobs which I would not want to send to this "queue". In other cases I would just want to submit the job and let it run right away and not wait on anything.
    I'm currently using the DBMS_JOB package, which I'm pretty sure won't let me do what I want.
    Any help would be greatly appreciated.
    Thanks,
    Joe

    Here is and example that creates Resource Manager objects and
    two job classes that will permit 1 and 3 jobs to
    run in parallel. Note this will work in 11R1 and 10.2.4
    Assumes user user scott/tiger exists.
    --  Remove existing scheduler objects, jobs and classes
    CONNECT /  as sysdba
    BEGIN
       DBMS_SCHEDULER.DROP_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS'
    END;
    BEGIN
       DBMS_SCHEDULER.DROP_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS'
    END;
    BEGIN
      FOR I IN 1..30 LOOP
      BEGIN
        SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.SERIAL_' || I, FORCE=>TRUE);
      EXCEPTION WHEN OTHERS THEN NULL;
      END;
    END LOOP;
    END;
    BEGIN
      FOR I IN 1..90 LOOP
      BEGIN
        SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.PAR3_' || I, FORCE=>TRUE);
      EXCEPTION WHEN OTHERS THEN NULL;
      END;
    END LOOP;
    END;
    ALTER SYSTEM SET RESOURCE_MANAGER_PLAN='';
    set echo on
    --  Remove previously defined  resource plan, resource plan
    --  directives, and resource consumer groups  for this test
    BEGIN
        -- Prepare the pending area
        DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA;
        DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
        -- Delete resource plan, its resource plan directives, and
        -- any associated resource groups
        DBMS_RESOURCE_MANAGER.DELETE_PLAN_CASCADE(
           plan => 'JOBQS_PLAN'
        -- Submit the changes
        DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA;
        DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;
    END;
    -- Create resource manager objects
    BEGIN
       DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
            CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',  
            COMMENT => 'Consumer group to force jobs to execute in serial'
       DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
            CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',  
            COMMENT => 'Consumer group to allow jobs to run in parallel 3'
       DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
    END;
    BEGIN
       DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PLAN
          ('JOBQS_PLAN', 'PLAN TO SUPPORT JOBQS');
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_1_GROUP',
          COMMENT=>'Associates with job class JOBQ_WIDTH_1_CLASS',
          CPU_P1 => 25,
          PARALLEL_DEGREE_LIMIT_P1 => 1,
          ACTIVE_SESS_POOL_P1 =>1
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_3_GROUP',
          COMMENT=>'Associates with job class JOBQ_WIDTH_3_CLASS',
          CPU_P1 => 75,
          PARALLEL_DEGREE_LIMIT_P1 => 2,
          ACTIVE_SESS_POOL_P1 =>3
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'OTHER_GROUPS',
          CPU_P1 => 0,
          CPU_P2 => 100,
          COMMENT=>'Required'
       DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
    END;
    -- Create scheduler classes
    BEGIN
       DBMS_SCHEDULER.CREATE_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS',
          LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
          LOG_HISTORY => 5,
          RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',
          COMMENTS => 'Force jobs to run in serial, through plan JOBQ_PLAN and group JOBQ_WIDTH_1_GROUP'
    END;
    BEGIN
       DBMS_SCHEDULER.CREATE_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS',
          LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
          LOG_HISTORY => 5,
          RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',
          COMMENTS => 'Allow up to 3 jobs in parallel, enforced by plan JOBQ_PLAN and group JOBQ_WIDTH_3_GROUP'
    END;
    connect / as sysdba
    grant execute on jobq_width_1_class to scott;
    grant execute on jobq_width_3_class to scott;
    begin
      dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_1_GROUP',false);
      dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_3_GROUP',false);
    end;
    alter system set resource_manager_plan='';
    connect scott/tiger
    begin
      for i in 1..30 loop
      sys.dbms_scheduler.create_job(job_name => 'scott.serial_' || i,
          job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
          job_class=>'jobq_width_1_class',
          enabled=>true);
      end loop;
    end;
    begin
      for i in 1..90 loop
      sys.dbms_scheduler.create_job(job_name => 'scott.par3_' || i,
          job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
          job_class=>'jobq_width_3_class',
          enabled=>true);
      end loop;
    end;
    /-- The par3_90 job should finish about the same time as the serial_30 job since
    -- we run 3 jobs in paralled and serial respectively.
    -- check user_scheduler_job_run_details for after the test completed to verify.

  • Invoking 2 SQL statements one after another?

    Hi,
    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? Some thing like this:-
    method(){
    String insertSql="insert into employee(Name,Age)values(?,?);
    Connection conn=null;
    PreparedStatement pst=null;
    int insertRows=0;
    ResultSet rs=null;
    try{
    conn=getConnection(); //will get the connection object
    if(insertRows==0){
    pst=conn.preparedStatement(insertSql);
    pst.setString(1,"Jason");
    pst.setString(2,"30");
    insertRows=pst.executeUpdate();
    conn.commit();
    if(insertRows>0) {
    pst=conn.createStatement("select * from employee");
    //retrieving the data from the same table
    rs=pst.executeQuery();
    while(rs.next()){
    System.out.println("The name is::"+rs.getString(1)+ " "+rs.getString(2));
    }catch(Exception e){
    }finally{
    try{
    if(pst != null) {
    pst.close();
    pst = null;
    if(rs != null) {
    rs.close();
    rs = null;
    if(conn != null) {
    conn.close();
    conn = null;
    }catch(Exception e) {
    e.printStackTrace();
    Here one more thing is that i want the insertSQL statement to be invoked only once that is in the beginning and the next time the method() is called it should skip the insert block and should only retrieve the data using "select * from employee". How to do it? I tried with few options nothing works.. Please do provide a solution for this... It is really urgent.
    Thanks

    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? I think what you're asking is if you need a new Connection and/or Statement object for every query. The answer is no. In fact, most applications pool Connections so literally thousands or millions of queries are done in the lifetime of a Connection. You can reuse Statements and PreparedStatements as well as long as you intend on executing the same query.

  • Songs Skip Forward One After Another/Sporadic and Out of Nowhere

    I have an older IPOD 40g that skips through songs, one after another, without playing anything, and seems to do it in any mode, especially in overall Shuffle mode. I have the "shuffle Songs" feature on, but other than that, it has a pretty standard set up.
    I have restored to the defaults, last week, and it started doing the wierd stuff again today.
    Sometimes I have a hard time getting it to unfreeze and reset as well.
    I appreciate any help.

    Have you tried Party Shuffle? If you control click on a track, you can choose "Play Next In Party Shuffle". I often listen the way you're describing. I start listening in Party Shuffle (which I have set to select from a specific playlist). When I am reminded of another song, I select the song and then choose Play Next in Party Shuffle. And so on.
    As for your second question, you could try moving your entire short playlist into Party Shuffle. Once that playlist was done, Party Shuffle would revert to it's normal selection criteria (you could set it to pull from your entire library or a specific playlist). Music would keep playing.
    Can you tell I like Party Shuffle?

  • View photos one after another

    I want to be able to go to a tag section and view the photos one after another.  Using Adobe 9 pre and pse.

    Hi,
    I did not completely understand your workflow. Can you please elaborate a bit more?
    Thanks
    Andaleeb

Maybe you are looking for

  • ICal Date Headings Missing from Day and Week Views

    Good morning, A few days ago, the date headings disappeared from the Day and Week views in iCal. I can see the date heading in Month view, but when I switch back, the dates are missing. All of my events are there, and correct. I have resolved font du

  • Some GL A/C's are showing in B/S under Not-Assigned Accounts

    I am facing one issue regarding Financial statement/Balance Sheet GL accounts updation. 100177-Inventory Repairs & 200402-Distribution GL accounts(Both are Balance Sheet items) are assigned In Financial Statement Version But they are not updating in

  • How to turn off the authorization checks for a object in infoproviders?

    Hi - how can I turn off the authorization check for an object (ex: 0orgunit) in infoproviders? I have 0orgunit as an authorization-relevant object and is used in one of the cubes. When reports are run for this cube, this is causing authorization issu

  • Proxy settings in R/3

    While calling a r/3 webservice from java it is showing an error. Connection IO Exception. Check nested exception for details. (Unable to connect to proxy: 8080 - proxy. anybody knw the reason.. the tcodes associated for proxy settings in R/3. In SLDA

  • Unable to install Safari 3.2 on 10.5.5

    I have successfully installed Safari 3.2 onto my G4 Mac mini running OS 10.5.5, via Software Update. Software Update on my MacBook reports no updates available. I downloaded Safari 3.2 from Apple's download site and attempted to install. I get the fo