How to determine triggering event at runtime

Hello,
I was wondering how it is possible to determine which event was triggered to initiate a workflow.  I have a basic workflow that may be started via several events and would like to be able to determine within a method which event was the actual trigger.
The key is to make this determination within the first standard task that is called after the event is triggered.  I thought I would be able to make this work by reading SWWLOGHIST using the top level WI_ID and method 'SWW_WI_CREATE_VIA_EVENT_INTERN' (event name is in PARA_VAL2 field).  This approach does not seem to work however and was wondering what the syntax would be to provide this value.
Thanks in advance,
Adam

Hi,
In the workflow header in the Version Independent(task) -> Start Event tab, Add the follwowing Binding
&_EVT_NAME&  -> &eventname&
(Where eventname is a container with HRS1212-EVENT type)
You can use this as an import parameter in your method and utilize it.
Regards
Gautam

Similar Messages

  • How to determine the event generating component in RESTORE-VIEW phase

    Hi,
    I have performance issues with my application.
    I am using PPR for components within the CoreTable. The table-model for this ADF-CoreTable is coded in java instead of binding it to PageDef table.
    The PageDef for the JSF page is heavily loaded with other objects & therefore there a delay in response. I have also found out that maximum time is lost after the RESTORE_VIEW process to before APPLY_REQUEST_ VALUE phase.
    Not sure if I am doing it right, but this is what I plan to do.
    On determining the event from CoreTable components, I want to bypass the ADF phase by passing null to all ADF Phases
    initContext(null)
    prepareModel(null)
    & before Invoke application
    prepareRender(null)
    Is there a way to determine the event generating component in the PhaseListener class?
    This is a ADF 10g project developed on JDeveloper 10.1.3
    Thank you,
    Prakash

    Just for other readers,
    I attempted to create a button to toggle a session scope Flag for test & proceed. However I was still unable to skip the ADF phase.
    In a self defined PhaseListener I also tried to remove ADFPhaseListeners before RESTORE_VIEW & reinstate it back in before RENDER_RESPONSE. Except the ADF InitContext() & processValidation() which run immidately after RESTORE_VIEW all other calls to ADF Phases were skipped.
    The reasults were not helpful to proceed as I need to entirely skip/bypass the ADF lifecycle to achieve the quick responce.
    Thank you

  • How to determine WD application at runtime?

    Hello,
    I have a WD compent which contains two WD applications.
    At runtime I want to control the layout by the WD aplication which was called. How can I do this?
    Thanks for you help,
    Thomas

    Hello Thomas,
    from the IF_WD_RR_APPLICATION you can get the current application name.
      data lo_comp_api type ref to if_wd_component.
      data lo_app type ref to if_wd_application.
      data lo_app_rr type ref to if_wd_rr_application.
      data lv_app_name type string.
      lo_comp_api = wd_comp_controller->wd_get_api( ).
      lo_app = lo_comp_api->get_application( ).
      lo_app_rr = lo_app->get_application_info( ).
      lv_app_name = lo_app_rr->get_name( ).
    BR, Saravanan

  • How to determine method name at runtime

    hello,
    i try to get method name at runtime..i have a logger and i need this info for logger
    private void method(){
    myLogger.debug( "exception in " + getExecutedMethod() ); /* output should be: exception in method */
    }best regards
    cem

    bcem wrote:
    what i needed was
    [http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html|http://today.java.net/pub/a/today/2008/04/24/add-logging-at-class-load-time-with-instrumentation.html]
    regards
    cemYou could also use AOP to add logging. But really, any sort of injected logging is going to be of limited value, since it's very generic and "this method was called with these parameters"-esque. Explicit logging is a lot more descriptive and useful, particularly to support staff who probably won't know what any particular method does

  • How to determine selected Tab in runtime

    Hi,
    Is there a workaround to figure out which tab we are currently on in a tab set? This would help dynamically enable/disable some components.
    Thanks
    Manohar

    There is currently no way to let the model know which tab is currently selected.  This would be a nice feature to have in a future release.
    Regards,
    Gerrit

  • Event handler for dropdownlistbox how to determine selection ?

    Hello,
    As a newby in BSP programming, I'm trying to build a small application with a menu structure . This menu is defined in a page fragment and consists of dropdownlistboxes. The event handling is located in the main page which contains the page fragment.
    My problem is that I cannot get these dropdownlist boxes to work. The coding in the page fragment is :
    ==========================
    <htmlb:content>
      <htmlb:form>
        <htmlb:dropdownListBox id             = "myDropdownListBox1"
                                 tooltip        = "Tooltip for my DropdownListBox"
                                 onClientSelect = "alert('myDropdownListBox1')"
                                 onSelect       = "mySelect" >
            <htmlb:listBoxItem key   = "k1"
                               value = "MenuChoice1" />
            <htmlb:listBoxItem key   = "k2"
                               value = "MenuChoice2" />
            <htmlb:listBoxItem key   = "k3"
                               value = "MenuChoice3" />
            <htmlb:listBoxItem key   = "k4"
                               value = "MenuChoice4" />
            <htmlb:listBoxItem key   = "k5"
                               value = "MenuChoice5" />
            <htmlb:listBoxItem key   = "k6"
                               value = "MenuChoice6" />
          </htmlb:dropdownListBox>
        </htmlb:form>
    </htmlb:content>
    ==========================
    The event handler ( OnInputProcessing ) code is :
    ==========================
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
      DATA: event TYPE REF TO if_htmlb_data,
            ddlb_event TYPE REF TO CL_HTMLB_EVENT_SELECTION.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event IS NOT INITIAL AND event->event_name =
                 'dropdownListBox'.
          ddlb_event ?= event.
        CASE event->event_id.
          WHEN 'myDropdownListBox1'.
            CASE ddlb_event->selection.
           WHEN 'k1'.
            .......( Contains other statements )
           WHEN 'k2'.
            .......( Contains other statements )
           WHEN 'k3'.
            .......( Contains other statements )
           WHEN 'k4'.
            .......( Contains other statements )
           WHEN 'k5'.
            .......( Contains other statements )
           WHEN 'k6'.
            .......( Contains other statements )
         ENDCASE.
        ENDCASE.
        ENDIF.
    ==========================
    I have tried several different event handlers including the example in the documentation of the dropdownlistbox HTMLB element, but in the event handler I don't know how to determine the selection made.
    I would appreciate it hugely if someone could give me an example how to do this ?
    With regards,
    Fred van de Langenberg

    Hello,
    Thanks for your answers & suggestions Subramanian, Ulli & Sebastian.
    I forgot the <htmlb:content> tags ( thanks Ulli ) and eventually I got things working with the following :
    Main page layout : dopdownlistbox element
       <htmlb:dropdownListBox
                id          = "Ddlb1"
                onSelect    = "OnInputProcessing" >
                selection   = "<%= selection1 %>"
            <htmlb:listBoxItem key   = " "
                               value = " "/>
            <htmlb:listBoxItem key   = "k1"
                               value = "k1" />
            <htmlb:listBoxItem key   = "k2"
                               value = "k2" />
            <htmlb:listBoxItem key   = "k3"
                               value = "k3" />
            <htmlb:listBoxItem key   = "k4"
                               value = "k4" />
            <htmlb:listBoxItem key   = "k5"
                               value = "k5" />
          </htmlb:dropdownListBox>
    Event handler
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    Scenario 1: Read event from manager.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event IS NOT INITIAL AND event->name = 'dropdownListBox'.
        DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
        data ?= CL_HTMLB_MANAGER=>GET_DATA(
                  request = runtime->server->request
                  name    = 'dropdownListBox'
                  id      = 'Ddlb1'
         CASE data->selection.
           WHEN 'k1'.
           WHEN 'k2'.
           WHEN 'k3'.
           WHEN 'k4'.
           WHEN 'k5'.
         ENDCASE.
       ENDIF.
    ENDIF.
    Fred van de Langenberg

  • How to determine the target system during runtime of a Generic DS?

    Hi Experts, good afternoon.
    I am coding a Generic Extractor using Function Module. I have to select the field TIMESTAMP on table ROOSPRMSC. To do so, I need the value of RLOGSYS that is the BW system that is calling the Extractor.
    Do anybody knows how to determine via ABAP the RLOGSYS (Remote Logical System) during the runtime of the Generic DataSource Function Module?
    The table ROOSPRMSC keep the TIMESTAMPs values of the last delta upload for each DataSource and for each BW target system. As I have 2 BW's loading data from the same SAP ECC system, I need to know, during runtime of my Generic DataSource, the actual system that is requesting the delta. That's the reason why I need to know the BW's logical system name that is "runnig" the delta InfoPackage.
    Plese, help!!!
    Thanks in advance!
    Leandro Vani

    Leandro,
    The calling program of your FM should have a local variable I_RLOGSYS which is populated with the BW server ID.
    If you don't know how to access a variable in a program that is in call stack using field symbols, search SDN.
    I haven't tested this, so you may have to explore a little.
    Good luck.

  • How to use Mulitple DAQs with a single triggered event on only one of the DAQs

    I have three PXI6115 and would like to tie all these to a single triggered event on one of the DAQs. I've scaned the examples and any assistance would be greatly appreciated....

    TCjr,
    Please refer to your other post:
    How to use Multiple DAQs with a single triggered event on only one of the DAQs

  • How to call pragma autonomus_transation in repeated triggering event

    How to call pragma autonomus_transation in repeated triggering event
    eg :
    create or replace trigger trg_1
    after insert on aa
    for each row
    declare
    PRAGMA AUTONOMOUS_TRANSACTION;
    begin
    insert into aa values(10);
    end;
    insert into aa values(20); ..... can u help me pl

    Welcome to the forum.
    How to call pragma autonomus_transation in repeated triggering event You don't, unless you want to corrupt your data.
    Read:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551198119097816936
    http://www.oracle-base.com/articles/9i/MutatingTableExceptions.php
    http://www.oracle-base.com/articles/misc/AutonomousTransactions.php

  • Triggering event from for-each

    Hi,
    I have a process that takes long to execute, I want to be
    able to send a progress notification to the user with the hope of
    not getting him bored or impatient, for some reason I can't achieve
    it and I don't know where to go for help, if you know how to solve
    this, any help will be greatly appreciated.
    I have some code like this:
    <code in mxml for my application>
    - component declared .. onXEvent="showProgress()"
    - script for showProgress calls refresh for ProgressBar
    Component
    </code in mxml for my application>
    <code for my component>
    for each (var myObject:xObject in MyCollectionOfMyObjects)
    // do some complex logic and calls methods for this item
    // creates and triggers event for progress notification
    </code for my component>
    I would expect to see my ProgressBar advancing as the process
    is completed, but for some reason the process seems to take control
    of the execution and no onProgressEvent is fired until the foreach
    finishes execution. It will run perfectly in the debugger (step by
    step) but it doesn't work at runtime.
    Is there any way I can achieve this in Flex?? Is there any
    event class I can use to solve this issue?
    maybe anyone has done this before or knows a link to more
    information on this subject?
    Thanks in advance
    William Vega
    MCSD / Beginner Flex Developer

    Flash functions execute within a frame. They finish before
    any UI rendering is done. You will have to use callLater , somehow,
    within your loop to give the UI a chance to draw.. There is a more
    detailed answer to this thread somewhere else.
    Tracy

  • How to trigger an event in the program

    Hi,
    I have a program. The purpose of the program is to retrieve the data matching the selection criteria and downlod the same to a file.
    In the selection screen, I have a parameter called 'EVENT'. Here, user enters some event name. Generally, they enter the 'Background job processing events'.
    So, my requirement is... once the files are successfully downloaded, the program should trigger the 'EVENT' specified in the selection screen at run time.
    Can someone help me in this regard. How to trigger an EVENT in the program. Is there any Function Module or Method available in SAP which triggers the EVENT at runtime.
    And is there any table available in SAP which stores all the events available in SAP. Because, whenever the user enters an EVENT in the selection screen, we should check whether the event is valid or not. So, if there is any table available which has all the events then, it will be easy I guess. or is there any other way to validate the EVENT name.
    Please help me. Thanks in advance,
    Best Regards,
    Paddu.

    Hello Paddu,
    have a look at tables
    - btcsev, btcsed (system events)
    - btcuev, btcued (user events)
    and use function BP_EVENT_RAISE.
    kind regards
    Walter Habich

  • Method to retrieve event at runtime

    Hello All,
    I have a situation where it is required to get the event name at runtime. There is a requirement to call a subworkflow in a main workflow. Here we have situation to call different task according to the "Event triggered" at that time.
    Do we have any existing method to call the event. If not how to retrieve the event name at runtime
    Note : The event is different form the event(wi_initiator) which is called at the time of workflow starts.
    Thanks in advance.
    Pritam

    Hi Pritam,
    I think you need to clarify. What do you mean by 'Event triggered'? You say you don't need the original event which started the workflow, so I am lost which event you mean then.
    Regards,
    Martin

  • How to create the event in the report for jobs scheduling.

    Hi Experts,
    i have a requirement like as follows:
    The following triggers for Batch Jobs in the SCM system will be created.i.     
    Background Processing Event = u201CAPO Background Processing Eventu201D. After sending the Event, write a Log Report line u201CEvent u201CAPO Background Processing Eventu201D sentu201D.
    Could you please suggest me how we create the Event or which transaction ?
    Please give me a steps for creating events so that based on these events we use
    CALL METHOD cl_batch_event=>raise
        EXPORTING
          i_eventid                      = p_bpeve
          i_server                       = p_server
          i_ignore_incorrect_server      = p_ignore
        EXCEPTIONS
          excpt_raise_failed             = 1
          excpt_server_accepts_no_events = 2
          excpt_raise_forbidden          = 3
          excpt_unknown_event            = 4
          excpt_no_authority             = 5
          OTHERS                         = 6.
    Right now i received message "APO Background Processing Event" is doesn't exists.
    Thanks in Advance.
    Puneet.

    Hi Puneet,
    Goto transaction SM62 and in there to BckProcEvents tab. There you can create the events.
    You just need to specify the name and Description of an event.
    Hope this serves your purpose.
    Thanks

  • How to avoid triggering of a workflow multiple times at the same time?

    Hello Workflow Gurus,
      This is the situation.
    I have a Notify requisition creator workflow. This workflow is triggered only when a PO is completely released(this Po is created with respect to a purchase req). I have implemented multiple release strategy in my PO workflow. Meaning, if a PO is created for 5 million, 4 entries are created in the release strategy(P0, P2, P3 and P4). Some approvers have authorization to approve P0 and some have authorization to release P2 etc. Before an approver can release P4, P0, P2 and P3 shuould be approved first.
    My problem is when a approver has auth to release both P3 and P4, and if he hits the SAVE button, it is completely released and  2 notify req workflows are being triggered. I use the release indicator = 'C' (completely released) to trigger thos notify req creator workflow. In this case both workflows are triggered at the same time and date. I somehow have to say if this is triggered at the same date and time, complete one workflow.
    BTW, I am not using any user exit to trigger this. This notify req creator WF is triggering event is "RELEASED'. When pO is completely released, 'RELEASED' event gets triggered which caused the notify req creator WF trigger.
    How can I accomplish this?
    Thanks
    Rachana

    Hi Rachana,
    Another way you could acheive this is to use start conditions for your workflow. You could specify that your workflow should get triggered only for release codes = XX or release strategy = XX, etc.. This way even after 1 stage of approval, when the approver clicks on SAVE, the release codes change and because there is start conditions in the workflow that would prevent another instance of the workflow from getting triggered.
    For example, in your case, I presume PO, P1, P2, etc are your release codes.
    You can have a start condition in your workflow wherein you specify that the workflow should get only triggered for release code = P2 [assuming release code P2 is always the 1st stage of approval]. So, once the approver for P2 has completed and Saved, since there is a start condition, there wouldnt be any other workflow instance started. By this way, any stages of approval wouldnt cause another workflow to initiate.
    Hope this is what you have been looking for ?
    Satish

  • How to determine IE type(32 bit or 64 bit) in a task sequence while updating Java

    How to determine IE type(32 bit or 64 bit) in a task sequence
    Hi,
    Currently i have to update new version of Java after removing all the previous existing version of Java by using TS in SCCM 2007.
    we have both 32 bit and 64 bit browser in the environment. I am stucked in determining whether the browser is of 32 bit or 64 bit.
    How to determine IE type(32 bit or 64 bit) in a task sequence so that respective java can be installed for that IE browser.
    will highly appreciate quick response.
    Thanks in advance.
    Daya

    But you also need to install JRE x86 on x64 systems, since most people actually use the 32bit browsers on x64 systems.
    The detection logic is actually pretty simple -- just check the right registry hive to find the installation location of the BIN\JAVA.DLL. Both pathnames are stored in HKLM\Software\JavaSoft\Java Runtime Environment\1.7 in the registry value "JavaHome",
    but the x86 path is stored in the 32-bit hive and the x64 path is stored in the 64-bit hive.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

Maybe you are looking for