Getting UWL workitem count in WD 4 Java Application

Hi,
Our team is trying to get the UWL workitem count that appears on the Tasks tab in a webdynpro for Java application . Is it possible to get the count .i.e. (New Workitems)/(Old Workitems) in a Webdynpro for Java application?
Thanks
Aditya

PLEAAAASE!!! somebody help us out with this one, we really need to get this done, and given the lack of responses this has got so far, I think it might not be possible at all.
Just some thoughts on the subject, anyway.
When creating the UWLcontext, you need to set a user for it (e.g. context.setUser( ) ), so does that mean that I will never be able to get the UWL task list/count for more than one user at a time? and does that also mean that, if a user is set to the UWLContext, in order for it to work, it needs to be authenticated with an ongoing session at the time of execution?
Again, please, these observations might or might not provide additional help in order to resolve this issue, but at least got to try something...

Similar Messages

  • Getting UWL task count for all users in a role.

    Hi.
    I recently posted a question regarding a very similar issue, but I haven't got any response yet. I think my question might have been somewhat poorly phrased, so I will try to do better at explaining what we need.
    We have a number of processes, most of which need to be dynamically assigned to a user when created. The way we want to assign those tasks is by executing a WebService which would receive a role name and get all the users for that role. Then, using the UWL API, it would check how many tasks each of the users have in their UWL, and return the UserID for whoever has the least tasks. I haven't been able to get this to work. I keep getting Logged in users context or session doesn't exist Exception.
    Please, any help on this will be greatly appreciated.
    Currently working with SAP NWDS 7.1 SP05 PAT0005

    Hi,
    Thank you for your response, however, that's not what I need.
    For you and anyone esle who might find this extra info useful...
    I know how to get a user's role(s), and how to get the users in a role.
    I also know how to assign a task to a specific user dynamically.
    Using the UWL API, I know how to get the tasks (or items) in a user's UWL from a WD application, I need to do that from a WebService and using pretty much the same code, with the necessary adjustments, I can't get it to work.
    Furthermore, I'm able to get the UWL tasks for ONE user, that user being the one I log into the application with. For example, if I write code to get the tasks for user testUser1, I need to log in with testUser1 to get it to work, if I log in with any different user or make it a non-authenticated application, it won't work.
    Again, help on this is much needed and will be appreciated.

  • Using xml file in java application

    How can i get the attribute name & value into my java application from a xml flie?

    read the file
    parse the contents
    store attribute name & value pairs.
    %

  • How to track session in Webdynpro Java application

    Hi All,
    How to get the session reference of any Webdynpro Java Application . My purpose is that thr is one WD application is getting launched , now if suppose user didn't perform any action on it and session for that application got expired . After the session got expired i have to update the table with the status . So to track that i need the session reference of WD application which i m looking for .
    How could i get the same . Kindly help me on this .
    Thanks & Regards,
    Mitul.

    Hi ,
    HttpSession session = request.getSession(false); //get the current session, if there is no session yet, return null
    if (session == null) //forward to first page
    else //do normal work
    Then u can update ur session right ,
    Regards ,
    Venkat

  • Hardware identification using Java-application

    Hi,
    please help me! I would like to get some hardware-specific information using a Java-application? Is it possible?
    Thanks everybody,
    dzsitter

    Probably not, in pure Java. Depends on what the "hardware" is that you had in mind.

  • Obtaining Current dialog in a nonfocused Java application

    I am trying to get the current/top dialog in a java application regardless of whether it is active or not. If the application is active I can use the keyboard focus manager. However, if the application is not active and a background thread caused an exception for instance I want to make sure that the exception dialog is shown with the previous current dialog as its parent.

    You can check if current user is member of role.
    import the  com.sap.security.api
    then extract the IUSER
    IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
    com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
    then check if is member of role
    IRole theGroupcom = UMFactory.getRoleFactory().getRoleByUniqueName(<yours>);
    finally
    if (user.isMemberOfRole(theGroupcom.getUniqueID(),false)) ecc ecc
    Bye.

  • Playing a Sound clip in a Java Application

    Ive searched a bunch on google to find a way to play an audio file in java, ive found how to do this in an applet but this is not what i want, I need to get it to work in a normal java application, any help would be appreciated.

    The methods that load an audio clip for you in the Applet class are static methods; iow you don't need an Applet at all, just use the (utility) methods in that class. Granted, these methods deserve a better, more neutral place.
    kind regards,
    Jos

  • How to get the workitem id from UWL

    HI All,
               I have developed a workflow and   starting this workflow from webdynpro abap.I integrated that task in SWFVISU
    transaction  to trigger the webdynpro from UWL up to now its working fine.
    but now the problem is i need to get the WI_ID of the particular workitem (which i clicked on UWL to trigger my webdynpro application).
    Thank you,
    Harsha P

    Thank you very much for your quick response
      Please guide me to complete this
    1.  I have created parameter type DYNPRO in SWFVISU transaction and i have created a application parameter in my webdnypro
         application also even though i cannot get the workitem id in to  my default method of my WD component window 
         So could you please send us any document links regarding this issue
    Thank you,
    Harsha p

  • How to get the FILE COUNT from File directory

    Hello,
    i have to develop a scenario like, get  the file count from source file directory and validate whether the file count is 5 or not. if 5 files exist i need to process those 5 files to DB tables. if file count is not equal to 5 then i need to send a mail to customer that files are missed at source directory. (subject as files were missed at source directory and in content i need to display the file names exist at source file directory. So that missed file will be generated by the customer based on this mail).
    Could you please let me know how to get the count of files from source file directory. if it is possible only with UDF please provide the Java code
    Best Regards,
    SARAN

    Do these files have some fixed names?
    Can you try to use the option Advanced Selection For Source File to make XI  pick all 5 files in one shot?
    Check this blog on the same -
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    If this is not a option - BPM sounds the only possible way.
    Regards,
    Bhavesh

  • Webdynpro java application in UWL

    Hi Experts,
          My requirement is we  had one Java application , we need to link up this application into UWL  , and every month end who is accessing that application that guys have to get alert for to fill that form
        My question is is there any chance to link up this java application into UWL , please help on this issue or any possible ways is there.
    Thanks
    Renuka

    Hi Renuka,
    Have you had a look at the Javadocs?  The API is listed here and could fullfill your needs.  I have seen other customers build their own custom connectors to link to their own custom applications with the API documentation and coding:
    http://help.sap.com/javadocs/
    When you get to the main page, pick the version that you are working with, and then select Universal Worklist API's.
    Beth Maben
    EP - Senior Support Consultant
    AGS Primary Support, Business Suite & Technology
    Please see the UWL Wiki @
    http://www.sdn.sap.com/irj/scn/wiki?path=/display/bpx/uwl+faq  ***

  • WD java application in UWL link has authentication problems !

    Hi ,
        I am facing a starnge problem in UWL. I am trying to open an WD Java application upon clicking of UWL workitem. In the WdDoInit() method I have RFC present in R3-HR system. but Rfc execution could not be done when I click UWL work item and it opens in a new window. When I execute same application from place like through an Iview, it works fine. I feel WD_MODELDATA_DEST tickets are not being passed .
    for the work arond I made application prperty Authentication to true. When I opens for the first time , application hits rfc n fetch out data. but strangely on the second time onwards it prompts me for user authentication.
    Kindly give me possible solutions .
    Thanks
    Abhay

    Hi,
    1. Have you done the all the visualization settings in SWFVISU?
    2. If yes then did you re-register the server you are using?
    2. Are you able to view the WDJ view while clicking the link in UWL?
    and one more thing WdDoInit() will execute only once.
    please check the above things
    Regards
    SM Nizamudeen

  • Getting result from a telnet command through Java

    Hi,
    I've been using a set of classes found here: http://javatelnet.org/
    to do telnet through Java in a non-interactive mode.
    However I've got a problem when retrieving the result of a command sent to the remote host: the classes read the stream until the prompt is encountered; my problem is I must execute commands on several remote hosts, and the prompt is not necessarily the same on all hosts.
    Is there a simple means to establish a telnet connection through Java and retrieve the result of the commands?
    Any help would be appreciated.

    Thanks again, this is a very good article
    I see it is still the same strategy to get the result of a command : wait 'til the prompt is sent. Maybe there is just no other way to get it .
    But as I don't know the prompt on the different hosts I have to query, this won't do it.
    The article gave me an idea though : I only need to count the files in a directory on the remote host; until now I was trying to send the 'ls | wc -l' command by Telnet.
    Maybe I can simply do it by FTP (retrieve the list of files, and then count the lines with JAVA).

  • Displaying UWL tasks in Webdynpro java application

    Dear Experts,
    I am developing a WebDynpro Java application to access uwl tasks,
    Have added the following code in try catch block with external jars
    1. prtapi.jar
    2. bc.uwl.service.api.jar
    IUWLService uwlService = null;
    IWDClientUser user1 = WDClientUser.getLoggedInClientUser();
    IUser epUser =user1.getSAPUser();
    IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
    if( runtimeResources == null)
       wdComponentAPI.getMessageManager().reportSuccess("Portal Runtime NULL");
    else
       uwlService = (IUWLService)runtimeResources.getService( IUWLService.ALIAS_KEY);
    UWLContext uwlContext = new UWLContext();
    IUser user = user1.getSAPUser();
    uwlContext.setUser(user);
    uwlService.beginSession(uwlContext, 20);
    IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
    QueryResult result = itemManager.getItems(uwlContext,null,null);
    int size = result.getTotalNumberOfItems();
    ItemCollection collection = result.getItems();
    java.util.List list = collection.list();
    Item item = null;
    Date date = null;
    String subject = null;
    for(int i = 0; i < 5; i++)
      if(!(i > (size -1)))
          item = collection.get(i);     
          date = item.getDueDate();     
          subject = item.getSubject();
         wdComponentAPI.getMessageManager().reportSuccess("item "+item);
         wdComponentAPI.getMessageManager().reportSuccess("date "+date);
         wdComponentAPI.getMessageManager().reportSuccess("subject "+subject);
      }//if
    }//for
    I have created this webdypro application with Authentication mode set as True.
    After deploying this application, i'm getting this error...
    "java.lang.NoClassDefFoundError: com/sap/netweaver/bc/uwl/IUWLService "
    can anybody tell me what is the problem???

    Hi
    see the following link it will be helpful for u.
    [UWL Tasks|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#12]
    Regards
    Hazrath
    Edited by: Hazrath on Mar 25, 2008 8:01 AM

  • How to get file line count.

    Hey guys,
    How to get file line count very fast? I am using BufferedReader to readLine() and count. But when dealing with big file, say several GB size, this process will be very time consuming.
    Is there any other methods?
    Thanks in advace!

    What I'd do is you create an infofetcher, register a listener, implement gotMore() and have that scan for '\n'
    Some might suggest getting rid of the listener/sender pattern or use multiple threads to make ii faster. This might help a little, but only if your I/O is super-duper speedy.
    you are welcome to use and modify this code, but please don't change the package or take credit for it as your own work.
    InfoFetcher.java
    ============
    package tjacobs.io;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.Iterator;
    * InfoFetcher is a generic way to read data from an input stream (file, socket, etc)
    * InfoFetcher can be set up with a thread so that it reads from an input stream
    * and report to registered listeners as it gets
    * more information. This vastly simplifies the process of always re-writing
    * the same code for reading from an input stream.
    * <p>
    * I use this all over
         public class InfoFetcher implements Runnable {
              public byte[] buf;
              public InputStream in;
              public int waitTime;
              private ArrayList mListeners;
              public int got = 0;
              protected boolean mClearBufferFlag = false;
              public InfoFetcher(InputStream in, byte[] buf, int waitTime) {
                   this.buf = buf;
                   this.in = in;
                   this.waitTime = waitTime;
              public void addInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        mListeners = new ArrayList(2);
                   if (!mListeners.contains(fll)) {
                        mListeners.add(fll);
              public void removeInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        return;
                   mListeners.remove(fll);
              public byte[] readCompletely() {
                   run();
                   return buf;
              public int got() {
                   return got;
              public void run() {
                   if (waitTime > 0) {
                        TimeOut to = new TimeOut(waitTime);
                        Thread t = new Thread(to);
                        t.start();
                   int b;
                   try {
                        while ((b = in.read()) != -1) {
                             if (got + 1 > buf.length) {
                                  buf = IOUtils.expandBuf(buf);
                             int start = got;
                             buf[got++] = (byte) b;
                             int available = in.available();
                             //System.out.println("got = " + got + " available = " + available + " buf.length = " + buf.length);
                             if (got + available > buf.length) {
                                  buf = IOUtils.expandBuf(buf, Math.max(got + available, buf.length * 2));
                             got += in.read(buf, got, available);
                             signalListeners(false, start);
                             if (mClearBufferFlag) {
                                  mClearBufferFlag = false;
                                  got = 0;
                   } catch (IOException iox) {
                        throw new PartialReadException(got, buf.length);
                   } finally {
                        buf = IOUtils.trimBuf(buf, got);
                        signalListeners(true);
              private void setClearBufferFlag(boolean status) {
                   mClearBufferFlag = status;
              public void clearBuffer() {
                   setClearBufferFlag(true);
              private void signalListeners(boolean over) {
                   signalListeners (over, 0);
              private void signalListeners(boolean over, int start) {
                   if (mListeners != null) {
                        Iterator i = mListeners.iterator();
                        InputStreamEvent ev = new InputStreamEvent(got, buf, start);
                        //System.out.println("got: " + got + " buf = " + new String(buf, 0, 20));
                        while (i.hasNext()) {
                             InputStreamListener fll = (InputStreamListener) i.next();
                             if (over) {
                                  fll.gotAll(ev);
                             } else {
                                  fll.gotMore(ev);
    InputStreamListener.java
    ====================
    package tjacobs.io;
         public interface InputStreamListener {
               * the new data retrieved is in the byte array from <i>start</i> to <i>totalBytesRetrieved</i> in the buffer
              public void gotMore(InputStreamEvent ev);
               * reading has finished. The entire contents read from the stream in
               * in the buffer
              public void gotAll(InputStreamEvent ev);
    InputStreamEvent
    ===============
    package tjacobs.io;
    * The InputStreamEvent fired from the InfoFetcher
    * the new data retrieved is from <i>start</i> to <i>totalBytesRetrieved</i> in the buffer
    public class InputStreamEvent {
         public int totalBytesRetrieved;
         public int start;
         public byte buffer[];
         public InputStreamEvent (int bytes, byte buf[]) {
              this(bytes, buf, 0);
         public InputStreamEvent (int bytes, byte buf[], int start) {
              totalBytesRetrieved = bytes;
              buffer = buf;
              this.start = start;
         public int getBytesRetrieved() {
              return totalBytesRetrieved;
         public int getStart() {
              return start;
         public byte[] getBytes() {
              return buffer;
    ParialReadException
    =================
    package tjacobs.io;
    public class PartialReadException extends RuntimeException {
         public PartialReadException(int got, int total) {
              super("Got " + got + " of " + total + " bytes");
    }

  • Get estimated record count

    for pagination, we want to show the total pages. the way is to get the total count,then divided by the record number per page. The problem is its too expensive to get the total count.
    In pl/sql, we can get the estimated record count with
    select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); but my question is how to get this number from application code, like java or php.
    Thanks,

    Hi,
    Though what you're trying to do can be achieved in three steps *(i)* importing of java.io.* and java.sql.* packages *(ii)* establishment of a connection using JDBC driver, and *(iii)* query execution, it would NOT be constructive for the fact that a SELECT statement (as stated in the above reply) will always be a part of the query sentence for the following reasons:
    (a) When objects are executed in Java, the first statement that is compiled is a SQL statement.
    (b) Parameters cannot be defined in SQL strings.
    Hence, as per my understanding, you can either stick to the existing approach or modify it as per the defined standards and not customized ones.
    Regards,
    Naveed.

Maybe you are looking for

  • Fixed Asset Sale through SD & AA Module

    Dear All, While selling the fixed asset, carried out the following procedure. Is it correct? In India, we need to pay excise. Due to this, the asset which is required to be sold, needs to be created as a material. Following steps are carried out - a)

  • I have a new computer, I have itunes library on an external drive.  How do I configure my new computer?

    I have a new Windows 7 computer.   On my old XP, I had my iTunes on an external hard drive that I still want to use, but now I need to figure out how to set up my new computer to do this.   Do I do a fresh install of ITunes first, on my new computer?

  • DVD from iPhoto is not sharp

    Made a slideshow with high resolution jpg's and music using iPhoto. Exported to QT at highest setting, dropped it in Toast 10 to burn a DVD, put it in my DVD player to view it on my 1080P 42" LCD (using composite inputs RCA) and the image looks unsha

  • Basic settings

    am new to iphone so am a bit clueless; how do i get the clock to read out in 24 hour mode/military mode?

  • Fetching parameter value without using AWR report

    Hi, I am working on Oracle 10.2.0.2 RAC database. I want to get the following values of the database in one particular day. maximum LOGICAL READ maximum PHYSICAL READ BUFFER HIT RATIO LIBRARY HIT RATIO The purpose is to make a monthly report where th