Get the user executing the process

Hi, I have a servlet. I need to get the user who is executing the process, that is, you can view the users executing each process in the Windows Task Manager, but how can I get the user who is executing the servlet (or Java) by the aplication itself?

I believe that one of the standard system properties includes the ID of the user that the process is running under. Read the API for java.lang.System.getProperties; I think it lists them there.
I'm not sure if that's what you're looking for, though. In the case of a servlet, this would be the user ID of whatever started the servlet environment. In a real production system this is likely to be "nobody" or an idea with low permissions created specifically for the purpose of running the server. Not sure if that's what you're looking for or how useful that would be to you.
In particular, if you're looking for the ID of the person running the browser that requested the page that the servlet in question is servicing...then you're pretty much out of luck.

Similar Messages

  • Get the Process Instance as a process variable

    Hi,
    is there a way on a Workflow Process to get the process instance in order to save it as a process variable (and then store it via a backend call).
    In other words: I have many processes designed via NWDS Process Composer and I'd like to get the process instance ID in order to save it for faster retrieval of the process in the NWA's Manage Process application.
    Thank you,
    Pietro.

    Does it work if the process instance is already created?
    Can you give me an example?
    I've put as the first step of every workflow a callback method that is executed that calls an RFC to confirm, backend-side, that the process has been created.

  • How to get the process id of a sql statement or a session  ....

    How to get the process id of a sql statement or a session . ..?
    Thanks

    What about this?
    SELECT pid
      FROM v$session s, v$process p
    WHERE p.addr = s.paddr
       AND s.sid = :sid;   -- replace :sid with your session idRegards.
    Al

  • Is there any java api available to get the process identifier ?

    Hai,
    I am in need to get the process identifier of a running process.
    Is there any API available or any shell script which can be used in exec command
    to get it.
    Thanks in Advance.
    Kavitha M.

    Hint: Don't use the exec command! This would spawn off a new shell with a different PID. You might want to look at JNI (Java Native Interface) to attach a piece of C code to your Java application that can find out the PID.

  • Get the process ID (pid)

    Is there a way to get the 'process id' in LV?

    Hi codas
    Basically, you have ways to get prcesses id:
    1.- If using Lv 7.x,.NET could be a good choice. See example about task manager and modifie to get ID too.
    2. If not ( or if you like), use system exec.vi to call TASKLIST.EXE.You will get the list of processes as in the windows task manager.
    3.- Calling the apropiate DLL. (Look at microsoft doc)
    Hope it helps.
    Alipio
    "Qod natura non dat, Salmantica non praestat"

  • Problem when getting the process of execution of JAVAWS on PC

    Hello,
    I give here a part of my code:
    boolean stillrunning = true;
    Process p =null;
    while (stillrunning)
    try
         p=Runtime.getRuntime().exec(javawsPath + "javaws " + portalURL_);
    catch (Exception ext)
    printException(ext);
    try{
         int g = p.exitValue();
    stillrunning = false;
         catch(IllegalThreadStateException ex)
              printException(ex);
    The process of javaws is running normally on my Pc (Win Xp), but I have always stillrunning to false, it seems that the process p is killed but the javaws is still running.
    Can you help me? how can I get the Process p?
    Best regards

    Hello,
    Ok , I put the part that causes a problem to me :
    ============================
    Process p = null;
    boolean stillrunning= true;
    try{
    p=Runtime.getRuntime().exec(javawsPath + "javaws " + portalURL_);
    catch (Exception ext)
    printException(ext);
    try{
    int g = p.exitValue();
    stillrunning = false;
    catch(IllegalThreadStateException ex)
    printException(ex);
    ==========================
    The value of "stillrunning" is always "false", the process p is killed, however the application "javaws" is running.
    The value of exit is 0,
    Is it a normal behaviour?
    My purpose is to get the id of the process of javaws that I have launched, have you any idea how to get it.
    Thank you

  • How to get the process instance key so as to retry a rejected task through api while ad provisoing?

    Hi All,
    How to get the process instance key so as to retry a rejected task through API while AD provisioing state?
    API URL - http://docs.oracle.com/cd/E27559_01/apirefs.1112/e28159/toc.htm
    Thanks

    To retry a task that is in a rejected state, you use the SCH_KEY which is the task key.  In OIM, all rejected tasks are listed in the OTI table.  It contains all the important information about a rejected or pending task.
    You can use the APIs found in the tcProvisioningOperationsIntf class to retrieve open tasks.
    -Kevin

  • How to get the Process order Number (Deatials by providing Salese order)

    Hi
    I want help to get the Process order details against with sales order number
    in which table i ll get this information and any particular  Function module is available???
    Regards
    Jagadish

    here KDAUF is empty
    Any other table is there i checked AUFK also AFKO also i ma not getting.

  • I'm using migration assistant to transfer files from my wife old net book to new mac air and the pc dropped out during transfer.  Pc now says waiting for mac to connect and has is stuck at transferring information.  How do I get the process to continue?

    I'm using migration assistant to transfer files from my wife old net book to new mac air and the pc dropped out during transfer. I started up migration assistant on the Pc again and now says waiting for mac to connect! New MacBook Air  is stuck at transferring information.  How do I get the process to reconnect and continue?

    Whew, good luck!
    What version of OSX is on the older one?

  • Getting the Process-Title (WD)

    Hi,
    how can I get the actaul process-title in a web dynpro application.
    In the GP-API I found the interface IGPProcessInstanceInfo but Im not able to get an intance of this.
    I tried out the following, but theres no possibility to get the IGPProcessInstanceInfo.
    runtimeManager.setCustomProcessTitle( executionContext.getProcessId()  , newTitle);
    IGPProcessInstance actualInstance = runtimeManager.getProcessInstance(executionContext.getProcessId(),executionContext.getInitiator() );
    Thanks for helping me
    Steve

    Hi Aliaksei,
    my only wish was to get the process-title.
    So I searched in the API to get informations how to get the title. And I found no way to get it, because there was no method getTitle() only in the interface IGPProcessInstanceInfo, which I cannot achieve.
    Meanwhile I found the method, you proposed me, in the API too.
    Thanks in advance

  • Get the process instance ID

    Hey,
    I've build a Process DC with subprocesses. I would like to retrieve my process instance ID, this way, when I am in a subprocess, I could still put a link to the diagram of the main process !
    Does anyone have any idea how to obtain it ?
    Any help would be appreciated!

    Hi Lynne,
    another question. Did you get the funtion "sendNotification()" running? At line push.pushSharedItem(procon, item, users); I get the error "null null"
    I already checked objects and they seems to be created correct. Might there be any attribute wrong due to the fact that this example is originally for CE 7.0?
    //Setup connection
    IUWLService uwlService = findService();
    final int sessionIdleTimeout = 60;
    UWLContext uwlContext = new UWLContext();
    IWDClientUser clientUser;
    clientUser = WDClientUser.getLoggedInClientUser();
    IUser user = clientUser.getSAPUser();
    uwlContext.setUser(user);
    uwlContext.setLocale(Locale.getDefault());
    IUWLSession uwlSession;
    uwlSession = uwlService.beginSession(uwlContext, sessionIdleTimeout);
    uwlContext.setSession(uwlSession);
    IUWLItemManager itemManager = uwlService.getItemManager(uwlContext);
    //Setup provider conn
    IPushChannel push = uwlService.getPushChannel();
    IProviderConnector procon = uwlService.getRegisterProviderConnector(IProviderConnector.ADHOC_WORKFLOW_CONNECTOR_ID);
    IUserFactory usf = UMFactory.getUserFactory();
    IUser sendToUser = usf.getUserByLogonID(wdContext.nodeNotifData().currentNotifDataElement().getUserId());
    //Setup item
    Item item = new Item(IProviderConnector.ADHOC_WORKFLOW_CONNECTOR_ID,IProviderConnector.ADHOC_WORKFLOW_SYSTEM, "" + new Date().getTime(), sendToUser.getUniqueID());
    item.setUser(sendToUser.getUniqueID());
    item.setSubject(wdContext.nodeNotifData().currentNotifDataElement().getSubject());
    item.setDescription(wdContext.nodeNotifData().currentNotifDataElement().getDescription());
    item.setItemType(ItemType.UWL_ITEM_NOTIFICATION);
    item.setCreatedDate(new Date());
    // item.setDueDate(new Date());
    item.setCreatorId(user.getUniqueID());
    item.setStatus(StatusEnum.NEW);
    item.setCompletedDate(new Date());
    // External Type is used to filter the notifications according to
    // application
    item.setExternalType("UWLNotification");
    //Send item
    Set users = new HashSet();
    users.add(sendToUser.getUniqueID());
    // users.add("USER.PRIVATE_DATASOURCE.un:testuser1");
    push.pushSharedItem(procon, item, users);
    wdComponentAPI.getMessageManager().reportSuccess("Notification Sent");
    Regards

  • How to get the process chain name if we know the data target in sap bi

    Hi SAP BI Gurus,
    Can any help me how to find the process chain name if we know the data target name
    i mean if i know the info cube name how to find the relavant process chain which is holding that info cube
    Thanks,
    Joe

    Hi R Kumar,
    Check the table RSPCCHAIN.
    I mean, Use Table RSPCCHAIN and give the local chain tech name in VARIANTE field and search, in out put you will get meta chain name under the field CHAIN_ID.
    Thanks,
    Sreehari.

  • How to get the process id of a java program

    Hi,
    I know this has been discussed before. But I could not find an answer. So, I'm putting it again.
    How can I find out the PID of an application (I know the name of the application) on any OS?
    Regards.

    1) Use JNI ( http://www.esus.com/docs/GetQuestionPage.jsp?uid=1766 )
    Something like
    JNIEXPORT jint JNICALL Java_Pid_getPid(JNIEnv *env, jobject object) {
    return (int) GetCurrentProcessId();
    2) In JDK 1.5, you can use the java.lang.management API, at least on Windows, to find out the process ID.
    http://www.esus.com/docs/GetQuestionPage.jsp?uid=1796
    http://www.esus.com/docs/GetQuestionPage.jsp?uid=1766

  • How to use PAPI-Ws to get the Process Image

    As what the topic says,
    I use the papi-ws to connect to the BPM engine,
    But I can't find the API to show the Process Image via Papi-WS
    Can anyone help ?
    Thanks a lot~
    Best wishes,
    Alex

    Here is the sample code
    ProcessService processService = null;
    ProcessServiceSession session = null;
    try {
    processService = ProcessService.create(configuration);
    session = processService.createSession(USERNAME, PASSWORD, HOSTNAME);
    for (String processId : session.processesGetIds())
    fuego.papi.Process process = session.processGet(processId);
    ProcessDiagram diagram = session.processGetDiagram(processId);
    diagram.setTheme(ProcessDiagram.THEME_COLOR_BPMN);
    diagram.setDrawFlowOnly(true);
    Image image = diagram.getImage();
    File pngImage = new File(createPngFilename("image"));
    image.write(pngImage, ImageExtension.PNG);
    catch (Exception e)
    e.printStackTrace();
    finally
    session.close();
    processService.close();
    You can also look for more pointers here
    http://beatechnologies.wordpress.com/2011/07/26/archiving-audit-diagrams-as-images-in-oracle-soa-suite-bpm-processes/

  • How do i request the up-to-date program for macbook pro for mountain lion os x i do not get the processes can someone explain it to me with detail

    i cant follow the instructions they do not make sense do i request it when i get the make or when os x is released

    The third post (by BitBytr) quotes the page that I am referring to.  If you read it -- either his post, or the web page, you would realize it says ver batim:
    Customers who purchase a qualifying Mac between June 11, 2012 and the date when Mountain Lion is available in the Mac App Store will have 30 days from the OS X Mountain Lion release date to make a request.
    Ironically, the fifth post (also by BitBytr) emphasizes the exact same quote.  It's the same statement found in two places on Apple's website.  Why are we even arguing this?
    Either way, everyone has referenced Apple's web site.  Congrats, folks.  You have valid references.  But the OP wanted it "Barney style", or broken down to much easier terms to understand, which I feel was provided in my first post.  If anyone disagrees, I welcome corrections or easier wording.  Afterall, we're here to help OP.  Momacandipad, has your question been answered?

  • 10GR2 - Cannot get wb_rt_api_exec to execute a Process Flow

    Hi,
    In version 10.1.3, I was able to use the wb_rt_api_exec procedure to execute process flows within a stored procedure (and called by an Enterprise Manager job).
    I have tried something similar in 10GR2, but when I run stored procedure, it says it has executed successfully, but the process flow has not run.
    My Stored procedure code is like:-
    CREATE OR REPLACE PROCEDURE PROC_TEST IS
    ret NUMBER;
    BEGIN
    ret:= rep_owner.wb_rt_api_exec.run_task('PROCESS_LOCATION','PROCESS','WF_TEST','','',1,1);
    END PROC_TEST;
    I have noticed there is an extra parameter p_background at the end of the run_task function and was not sure if I am setting it correctly. The procedure compiles ok, but does not run the process flow.
    Can anyone help please?
    Thanks
    GB

    To run workflow from SQLPLUS I used the following script:
    set serveroutput on
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := rep_ISM_DEV2.wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := rep_ism_dev2.wb_rt_api_exec.run_task('OWF_LOCATION','PROCESS','ALL_MARTS_PF', ' ' );
    end;
    Prior to running this script I have
    1.     grant execute on rep_owner.WB_RT_API_EXEC to rep_user;
    2.     OWF_MGR is registered as Repository user.
    It is possible that you will get an error: PE-02018: Oracle Workflow schema OWF_MGR on host XXX.XX.XX.XX cannot be accessed using service ORCL through port 1521. Please check the location details and try again.
    To overcome this problem log in to OWB Control Center as the target User (Runtime user) and executed the PF package from there manually. You will get a message that OWF_MGR location was registered by other user and you will get asked to supply the OWF_MGR password. The manual execution should finish normally. After that I am able to run the PF from a command line without problems. It looks like running the PF from the control center stores the OWF_MGR login information somewhere (anybody knows where?) and you do not need to supply it any longer.
    Hope it helps.
    Vladimir

Maybe you are looking for

  • Wild card search in a FM

    Hi experts, I have a FM in which there is one table customer_name It has fields as SIGN (type SIGN), OPTION (type OPTION), LOW (type name1_gp), HIGH (type name1_gp). Now the user can give single value, or a range of values for the customer name. I am

  • Stabilize a segment of a larger clip

    Whenever I use a video stabilizer, it is usually applied to just a portion of a longer clip. It is therefore essential that any segment I stabilize match in position, rotation, scale (and even warp dtstortion, if this should be a factor) any segment

  • 9i and 10g Replication

    Hi, Is there any difference between 9i and 10g Version of Oracle database with respect to Advanced Replication concepts, implementation procedures and methodologies. I mean is 9i Advanced replication concepts are same in 10g or in 11g. Looking for gu

  • Firefox locks file if a hyperlink is used from that file

    If I used a hyperlink contain within a file, Firefox locks the file. Going to a different URL after does not release the file's lock. The only way I've found is to close Firefox. I am then able to delete the file containing the hyperlink.

  • Ctrl-K check names not work working

    I am running an Outlook 2013 client against a Ex2010 server.  One really annoying thing, is that the Check Names  (Ctrl+K) keyboard shortcut is not working. If I manually click the icon it works. Any idea of why this is not Working?