How to get transitions BPM activities with PAPI?

Hi:
I wonder if you can get the transitions of the activities of a process with PAPI. And how do you get?.
Also, if you can get the expiration time of each activity, and process in general, and how to get those times.
I hope you can help me and your prompt response.
Greetings.

Hi Eduardo,
Not sure how you'd get the transitions for an activity using PAPI, but here's how you could get the deadline for a work item instance.
Once you get your instance in the "for" loop below you'd use the PAPI variable "PREDEFINE_DEADLINE". As you know, there is an activity deadline (created by having a Due transition coming out of an activity) and a process deadline (created by setting the predefined variable "deadline" somewhere inside the process). This PAPI logic below uses the instanceInfo's three methods getDeadline(), getProcessDeadline() and getActivityDeadline() to retrieve the instance's deadline, process deadline and activity deadline respectively. Know you know this, but the "deadline" variable stores the time of the either the activity or process deadline that will expire first (e.g. if the due transition coming out of an activity will fire in 5 minutes and the process deadline won't fire for another 30 minutes, the PAPI getDeadline() method returns the activity deadline's time of 5 minutes in the future).
If the activity does not have a Due transition, the getActivityDeadline() method returns a null value. Similarly, if the process's "deadline" predefined variable has not been set, then the getProcessDeadline() method returns a null value. If both the activity and the process deadlines are null, then the getDeadline() method also returns a null.
This PAPI logic assumes that you've already done a search and have a list of instances in your "instances.toArray()":
     for (InstanceInfo ii : instances.toArray()) {
       // this gets the deadlines
       Time dl = (Time) ii.getDeadline(); 
       Time adl = (Time) ii.getActivityDeadline(); 
       Time pdl = (Time) ii.getProcessDeadline();
       System.out.println("deadline: " + dl
                             + "\nactivity deadline: " + adl
                             + "\nprocess deadline: " + pdl);
       // this gets the role where the work item instance
       //    is currently is sitting
       System.out.println("role name: " + ii.getRoleId());
       // this gets the name of the activity where the
       //    work item instance is currently sitting
       System.out.println("activity name: " + ii.getActivityName());
. . .Hope this helps,
Dan

Similar Messages

  • Has anyone figured out how to get speech recognition working with sticky keys enabled on mountain lion?

    I'm trying to use speech recognition to input text on my iMac running the latest mountain lion, 10.8.3.
    I have sticky keys enabled.
    When I try to start speaking by pressing the function key twice nothing happens. I can only get it to work if I disable sticky keys.
    The same problem occurs with all the other modifier keys as shortcut, they do not work with sticky keys.
    When I try to select a different shortcut, I am unable to select a two key combination, but am limited to one.
    If I select the F6 key, or any other single key, I am able to start speech recognition. However the second time that I press the key, it does not stop recognition and process my words. Instead, it restarts the recognition.
    Has anyone figured out how to get speech recognition working with sticky keys enabled?
    Or a way to get an individual key shortcut to start on the first press and process it on the second?
    Or a way to get key combinations to work, as specified by the help:
    Dictation On and Off
    To use Dictation, click On.
    When you’re ready to dictate text, place the insertion point where you want the dictated text to appear and press the Fn (function) key twice. When you see the lighted microphone icon and hear a beep, the microphone is ready for you to speak your text.
    Shortcut
    By default, you press the Fn (Function) key twice to start dictation. If you like, you can choose a different shortcut from the menu.
    To create a shortcut that’s not in the list, choose Customize, and then press the keys you want to use. You can press two or more keys to create your shortcut.

    I noticed with version 10.8.4 of OS X that I am now able to select F6 to activate, and the return key to complete the speech recognition. This is still different than the description of how these should function that's included in the help, but at least it's an improvement.

  • How to get gui_download and gui_upload with popup filename?

    how to get gui_download and gui_upload with popup filename?

    Here is a short example.
    report zrich_0003 .
    data: ifiletab type filetable.
    data: xfiletab like line of ifiletab.
    data: xstring type string.
    data: rc type i.
    data: itab type table of string.
    data: xtab type string.
    start-of-selection.
      call method cl_gui_frontend_services=>file_open_dialog
        changing
          file_table              = ifiletab
          rc                      = rc.
      read table ifiletab into xfiletab index 1.
      xstring = xfiletab-filename.
      check not xstring is initial.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = xstring
      changing
        data_tab                = itab.
      loop at itab into xtab.
        write:/ xtab.
      endloop.
    Regards,
    Rich Heilman

  • How to get the contents associated with a component.

    How to get the contents associated with a component.
    Like i have 2 buttons and i want to get the contents associated with these button without clicking them i.e without firing the event.
    By Contents i mean, whatever things we get after firing the event,we get some other window and some thing is added to the current page and so on.

    grab all the code inside the actionPerformed(ActionEvent e) method

  • How to get a minus sign with the cost  field in ALV.

    Hi ,
    How to get a minus sign with the cost field in ALV.
    The Ouput will be displayed like  Rs -1500 instead of 1500-
    I can't use concatenate also as i may have to use the sum functionality of ALV .
    Cheers
    Sunny

    Hi sunny,
    1. The OTHER FIELD
       has to be character field of say length 15.
    2. Write the original numeric value to
       this character field (in a loop)
    3. But simply writing won't help.
    4. use this kind of logic.
    5.
    REPORT abc.
    DATA : m TYPE i.
    DATA : chr(15) TYPE c.
    m = -100.
    WRITE m TO chr.
    IF m < 0.
      SHIFT chr RIGHT BY 1 PLACES.
      CONDENSE chr.
      CONCATENATE '-' chr INTO chr.
    ENDIF.
    WRITE chr.
    regards,
    amit m.

  • How to get vlan tag programe with mac book air

    how to get vlan tag programe with mac book air,i'm using the usb ethernet adapter

    For prompt help contact TATA.
    For more on this: https://discussions.apple.com/thread/3680625?tstart=270

  • How to get an error icon with tool tip in a displaying table   in a particu

    How to get an error icon with tool tip in a displaying table   in a particular field..
    Thanks.

    Hi,
    In the context  create an attribute of type string .
    Create the attribute in the node which you bind for table.
    In the layout .
    1.create a Table UI element.
    2 create binding for UI element.
    3Right click on the Table UI and select insert table column.
    4.once the table column is inserted right click on table column and select insert cell editor.
    5.create the cell editor of the type image.
    6.Bind the source property of the image to the attribute in the node which you have created.
    so depending on what image(type of icon) needs to be displayed set the attibute accordingly.
    refer to the link for image :
    [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/frameset.htm]
    Priya

  • How to get instance of Class with its type parameters

    Hi,
    Have any of you folks been dealing with generics long enough to show me how this should be written? Or point me to the answer (I have searched as well as I could).
    I boiled down my situation to the included sample code, which is long only because of the inserted comments. And while boiling I accidentally came across a surprise solution (a bug?), but would obviously prefer a smoother solution.
    My Questions (referred to in the code comments):
    #1. Is there a way to get my parameterized type (classarg) without resorting to using the bogus (proto) object?
    #2. Can anyone understand why the "C" and "D" attempts are different? (All I did was use an intermediate variable????) Is this a bug?
    Thanks so much for any input.
    /Mel
    class GenericWeird
       /* a generic class -- just an example */
       static class CompoundObject<T1,T2>
          CompoundObject(T1 primaryObject, T2 secondaryObject)
       /* another generic class -- its main point is that its constr requires its type class */
       static class TypedThing<ValueType>
          TypedThing(Class<ValueType> valuetypeclass)
       // here I just try to create a couple of TypedThings
       public static void main(String[] args)
          // take it for granted that I need to instantiate these two objects:
          TypedThing<String>                        stringTypedThing = null;
          TypedThing<CompoundObject<String,String>> stringstringTypedThing = null;
          // To instantiate stringTypedThing is easy...
          stringTypedThing = new TypedThing<String>(String.class);
          // ...but to instantiate stringstringTypedThing is more difficult to call the constructor
          Class<CompoundObject<String,String>> classarg = null;
          // classarg has got to be declared to this type
          //    otherwise there will rightfully be compiler error about the constructor call below
          // This method body illustrates my questions
          classarg = exploringHowToGetTheArg();
          // the constructor call
          stringstringTypedThing = new TypedThing<CompoundObject<String,String>>(classarg);
       } // end main method
       // try compiling this method with only one of A,B,C,D sections uncommented at a time
       private static Class<CompoundObject<String,String>> exploringHowToGetTheArg()
          Class<CompoundObject<String,String>> classarg = null;
          /* Exhibit A: */
      ////     classarg = CompoundObject.class;
             results in compiler error "incompatible types"
             found   : java.lang.Class<GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = CompoundObject.class;
                                            ^
             I understand this.  But how to get the type information?
          /* It's obnoxious, but it looks like I will have to construct a temporary
              prototype instance of type
                 CompoundObject<String,String>
              in order to get an instance of
                 Class<CompoundObject<String,String>>
              (see my Question #1) */
          CompoundObject<String,String> proto = new CompoundObject<String,String>("foo", "fum");
          /* Exhibit B: */
      ////     classarg = proto.getClass();
             results in compiler error: "incompatible types"
             found   : java.lang.Class<capture of ? extends GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = proto.getClass();
                                            ^
          /* Exhibit C: */
      ////     classarg = proto.getClass().asSubclass(proto.getClass());
             results in compiler error: "incompatible types"
             found   : java.lang.Class<capture of ? extends capture of ? extends GenericWeird.CompoundObject>
             required: java.lang.Class<GenericWeird.CompoundObject<java.lang.String,java.lang.String>>
                   classarg = proto.getClass().asSubclass(proto.getClass());
                                                         ^
          /* Exhibit D: (notice the similarity to C!): */
      ////     Class tmp1 = proto.getClass();
      ////     classarg = tmp1.asSubclass(tmp1);
          /* It compiles (see my Question #2) */
          return classarg;
       } // end method exploringHowToGetTheArg()
    } // end class GenericWeird

    Thanks so much, Bruce. (Oh my goodness, how would I have ever come up with that on my own?)
    So in summary
    This doesn't compile:
          classarg = (Class<CompoundObject<String,String>>)CompoundObject.class;but these do compile:
          classarg = (Class<CompoundObject<String,String>>)(Class)CompoundObject.class;or
          Class coclass = (Class)CompoundObject.class;
          classarg = (Class<CompoundObject<String,String>>)coclass;And this doesn't compile:
           classarg = proto.getClass().asSubclass(proto.getClass());but this does:
           Class tmp1 = proto.getClass();
           classarg = tmp1.asSubclass(tmp1);

  • How to get terminal address along with Change document header

    Dear All
    My client want a report of the frequencies of a sales document changes along with terminal address. In table CDHDR i can get user name, date, t-code but not the terminal address. So requesting to guide me of how to get the terminal address from which terminal the document has been updated.
    Appropriate answer will be rewarded.
    Regards
    Kingshuk
    Edited by: Kings_Roy on May 31, 2010 11:02 AM

    I don't think this information is kept in change documents.  So for the change documents that are already created, you cannot get this information.
    For future however you can do some code changes to get this information.
    Function module TH_USER_INFO can return terminal name as well as IP address for a given client and user.
    All you have to do is either store this additional information along with change documents. For this i think you can check the FMs that are writing SD change documents. 
    OR
    You can use user exit exit SUSR0001 (User exit after logon to SAP System) to call this Function (TH_USER_INFO) at user logon and store this info in a Z table. Later when you are reading change documents, you can get user name, date time from change document and search this Z table for respective user Terminal name and IP Address.
    This is not a complete solution but i hope it will direct you to a solution.
    cheers.

  • How to get player's score with Adobe's Gaming SDK GameCenter ANE

    Hi! I need your help with something that should be super easy, but I really couldn't find anywhere.
    How do I get local player's highscore with adobe's gamecenter ane, from Gaming SDK? There is a requestScores, but in the only parameter it would make sense to specify the player type (playerScope:String) I only have 2 options to specify (Friends or Global). No option for Local. Default is global..
    When using GameCenter, I want to show the player when he beats his own GameCenter's highscore, and print the current highscore on a results screen when he doesn't beat it. But I can't find anywhere how to get it through this ANE.

    Hi Decco, I would like to show only the player's highscores inside my game, for each leaderboard.
    4morrone, I have the highscore stored in the device, but I would prefer if the player could see his highscores in any device he is logged in. Or if he re-installed the app, for example. When the player beats a level with a new highscore I show him a "New Highscore" screen, which wouldn't be so cool if the local highscore doesn't match his GameCenter score.
    I mean, Its not a really big problem, but I thought it would be easy. It's kind of strange that there is a function to get friends scores, global scores, but not local player's scores (which is a more important information), why would I get friend's GameCenter scores, if I can't compare them to the player's GameCenter score.

  • How to get a quiz developed with a timer in Adobe captivate 8

    I want to develop a quiz with 10 questions. So those who answer max correct answers with less time should be announced as winner
    Current version 8 doesn’t show the option to publish file into exe.
    Also I have few issues with the current package I prepared.
    Not sure how to get the timer
    enabled in the package.
    Need to add logo on all slides
    3. How to add hyperlink
    for Adobe Registration.
       Some experts please help me

    Well, first, I believe if you update CP8 to the latest version:
    Adobe Captivate Help | Adobe Captivate 8 patch
    Then the .exe option is restored to Captivate.
    But that probably won't help your other request.
    For Captivate itself to know if someone's score is best, it has to know what all the other users' scores are.
    How will it find that out? (especially as an .exe which is going to likely have even a harder time getting info from the web)
    The best way to do what you want is to use an LMS with that 'leaderboard' feature (i.e ExpertusOne)...so it can evaluate everyone's recorded scores and show the best.
    And even that would probably need a hack as I *assume* it basis 'best' on the score, not on the time.
    So even if you could do a timer in Captivate, it has no way of knowing other users' scores nor a way to evaluate which is 'best' even if it did.
    (you might be able to work that all in with extensive JS hacking?)
    Fortunately, the logo is pretty easy - put the logo image on the master slide(s) you use in the piece.
    What sort of Adobe Registration do you mean?

  • How to get the application expose with a mouse

    Hi,
    I want to get a quick overview of all open windows of the SAME application (= application expose). Normally, you can do this with your trackpad (three or four fingers down movement); I am now working with a "normal" (non-Apple) mouse and keyboard. How do I get the application expose with the mouse? I am able to quickly get the misson control wiht CTRL + right mouse click; and I am getting the App expose with shift + arrow down.
    Isn't there a way to get the application expose with the mouse as well? E.g. CTRL + Shift + right click would be very useful but that's taken by the 'slow moving' mission control.
    I know, it's a minor detail but it would be quite good for the workflow
    Any hint is most welcome. Many thanks.

    grab all the code inside the actionPerformed(ActionEvent e) method

  • How to get users provisioned / enabled with all OIM Resources.

    Looking for help on java / sql query on how to get all the users in OIM (9102 BP 13) provisioned/enabled status only,
    with all OIM Resources available in System.
    Edited by: 907571 on Apr 18, 2012 4:12 AM

    select usr.usr_login, usr.usr_status, obj.obj_name, ost.ost_status, act.act_name
    from oiu, usr, ost, obj, usg, act
    where oiu.usr_key=usr.usr_key
    and oiu.ost_key=ost.ost_key
    and ost.obj_key=obj.obj_key
    and usr.act_key=act.act_key
    --and obj.obj_name in ('Resource Name')
    --and usr.usr_status = 'Active'
    and ost.ost_status in ('Enabled','Provisioned')
    -Kevin

  • How to get creation date from Fuego.Papi.Instance

    I got all process instances from papi. The instances are Fuego.Papi.Instance.
    I also need the creation date of the process instance, but I cannot find it in Fuego.Papi.Instance.
    How to get the creation date from Fuego.Papi.Instance?
    Thanks,

    Yes, I knew Fuego.Lib.ProcessInstance is able to get creation date.
    But my code is not in the that process. I am using papi to get the process instance which returns me Fuego.Papi.Instance. Is there a way to get Fuego.Lib.ProcessInstance from Fuego.Papi.Instance?
    My code is like this
    businessProcess = ProcessService.getProcess(process : "processName");
    instances = businessProcess.getInstancesByFilter(filter : instFilter);
    //then loop each instance and I need the creation date

  • How to get Windws 8.1 with Bing Installation media

    Hey Guys, So i did get windows 10 installed on my tablet. HOORAY or so I thought. It wont't recognize my internal activation key in the BIOS. So I think I have to downgrade to windows 8.1 with Bing to get this happen and let it recognize the activation key, then hopefully upgrade the proper way again and hope for no blue screen this time. Does that sound right? Any idea how to get this installation media or windows 10 to recognize the internal BIOS activation key from the OEM? THANKS FOR ALL YOUR HELP!

    I installed Windows 10 from USB, when everything finished, I open activation page, clicked Activate, and activated it's all.

Maybe you are looking for

  • Folder with question mark keeps coming back

    Hello there , i have a problem with my mac pro. The problem is that every time i start up the mac it can't find my startup disk and then gives me the Folder with ? mark in it. Some times just do a start up for the second time helps but most of the ti

  • Not able to install CS6 Design and Web upgrade

    I bought an upgrade from CS3 Master Collection (which qualifies for the upgrade) to CS6 Design and Web premium. Upon installation it asks me for the CS3 serial number. I put the CS3 serial number and it gives me an error. Do I need to deactivate it C

  • Where should an user package be stored ?

    Suppose I create a package package MyPackage; public class MyClass { How can I compile MyClass so it is placed in the appropriate package directory structure and make the new class available to the compiler and the interpreter ? Thank you, Hung Vo.

  • Purchase Doc. Release Procedure - Reg.

    Dear Experts In my release procedure, i need to include one status say C-Need to be clarified. Means, approver should have the option of selecting C as code, in case he needs to get some clarification from purchasing doc. creator. Also, this C is not

  • 3D Display

    I have a Sony 24 in 3D Display monitor. I have had it for over 6 months now and every day one or two times a day it will go black but only for one second and then it will come back on. Is there any thing I can do about this?