JMS Events  for triggering workflows

Hi,
I am trying to send an xml message from a java client to a JMS Queue(the default
queue com.bea.wlpi.EventQueue). I am trying to trigger a workflow that checks a root
element. For some reason it is not working when I set the trigger to be an XMLEvent.
If I set it to be a manual trigger and trigger the workflow from the worklist, it
executes the workflow.
Any help, documentation, code snippet for trigger an xml event trigger would be greatly
appreciated.
Thanks,
Nitin

Probably way too late with this response but here goes anyways.
Have you defined the event key for your xml root element via the configuration/events
menu option ?
The expression defined there for the xml root element is used compare the incoming
xml message with the (normally) literal value you specify in the start key value
expression.
cheers,
mairt
"Nitin" <[email protected]> wrote:
>
Hi,
I am trying to send an xml message from a java client to a JMS Queue(the
default
queue com.bea.wlpi.EventQueue). I am trying to trigger a workflow that checks
a root
element. For some reason it is not working when I set the trigger to be
an XMLEvent.
If I set it to be a manual trigger and trigger the workflow from the worklist,
it
executes the workflow.
Any help, documentation, code snippet for trigger an xml event trigger would
be greatly
appreciated.
Thanks,
Nitin

Similar Messages

  • How to add new attribute for triggering workflow?

    Dear Expert,
    I want to create condition for triggering workflow.
    I am working on travel request workflow, using BUS2089.
    my requirement is to differentiate or make condition of triggering workflow based on trip activity type,
    but I can't find any attribute about trip activity type.
    how to add activity type to be available for create condition?
    thanks

    Hi,
      If am not wrong you are trying to raise event when ever there is a new travel request raised, so the BOR would be availbel in the workflow container to be more preciese it would be available in the event container, so you need to find out the right attribute in the BOR where the trip type is assigned and validate this in the start conditions i mean in the basic data of the workflow where you activate the event linkage.
    Regards
    Pavan

  • Details for triggering workflow on changing material

    Hi Experts ,
    I am triggering workflow BUS1001006 for creating/changing material .
    Is it possible to get the details that has been changed in the material using this ?
    Is there any other way to get the fields changed in MM02 for a material through
    workflow ?

    Hi
    Check the business object all the attributes in the log. If you get its fine if not create an attribute write your logic in that for changed material.
    Regards
    vijay

  • Asynchronous Business Object Event not triggering Workflow

    Hello everybody,
    I created a workflow for processing of inbound messages (IDoc). The workflow is correctly started when an IDoc arrives. Then it prepares some data and runs into a waiting step. After the user processes the messages via a custom transaction, the workflow should proceed and send some additional information to the message origin.
    I created a new BO with an event ProcessComplete, which is called in the custom transaction via the following code:
    INCLUDE <cntn01>.
    DATA lo_zisu TYPE swc_object.
    swc_container lo_container.
    swc_create_container lo_container.
    swc_set_element lo_container 'VAR1' lv_var.
    swc_create_object lo_zisu 'ZABC' lv_object_key.
    swc_raise_event lo_zisu 'ProcessComplete' lo_container.
    But when I call this code, the workflow does not continue. When I use SWEL to manually create an event on this object, the workflow only continues when I set the check box "synchronous call". So in some way, the asychronous calls disappears completely.
    Can anyone give me a hint, where to look for these calls? May there be a setting not active on the system for this particular workflow? Other workflows with the same method of event handling work well.
    Thanks and regards,
    Christoph

    Hello,
    I debugged deeper into the whole issue. When I call the function module for the event creation directly (not via the macro posted in my initial post), I have the option to control syncronous va. asynchronous processing:
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        objtype              = 'ZISU_MDC'
        objkey               = lv_objkey
        event                = 'ProcessComplete'
        start_recfb_synchron = 'X'
      IMPORTING
        receiver_count       = lv_rcvcnt
        event_id             = lv_evtid
      TABLES
        event_container      = lo_container
      EXCEPTIONS
        objtype_not_found    = 1
        OTHERS               = 2.
    The export parameter start_recfb_synchron controls this. In the program flow, the following is the difference between the two ways:
    Synchronous:
          CALL FUNCTION im_handler->m_linkage-recfb
               DESTINATION im_handler->m_linkage-rfcdest
               EXPORTING
                 sender                   = l_sibf_object_por
                 event                    = l_sibf_event
                 rectype                  = l_sibf_rectype
                 handler                  = l_receiver_por
                 exceptions_allowed       = 'X'
                 xml_size                 = l_xml_size
                 event_container          = lt_xml_container
               IMPORTING
                 result                   = l_result
               EXCEPTIONS
                 temp_error               = 1
                 OTHERS                   = 99.
    Asynchronous:
          CALL FUNCTION im_handler->m_linkage-recfb
               IN BACKGROUND TASK
               AS SEPARATE UNIT
               DESTINATION im_handler->m_linkage-rfcdest
               EXPORTING
                 sender                   = l_sibf_object_por
                 event                    = l_sibf_event
                 rectype                  = l_sibf_rectype
                 handler                  = l_receiver_por
                 exceptions_allowed       = ' '
                 xml_size                 = l_xml_size
                 event_container          = lt_xml_container
          CALL FUNCTION 'ID_OF_BACKGROUNDTASK'
               IMPORTING
                    tid = l_trfc_id.
    The first one works fine, the event gets processed, there is an entry in SWEL, the workflow continues. The second way does not work. The second function returns a tRFC ID, but when locking tRFC in the debugger and search for the call via SM58, there is no entry.
    In parallel I opened an OSS message, but did not get any (useful) response yet.
    Regards,
    Christoph

  • Event not triggering workflow always

    Hi,
    I have a parallel approval workflow which I trigger everytime I receive a decision from a UWL.it works fine but in some cases all the decisions are not received by the workflow.
    Steps: I receive the decision from UWL via a RFC
               I trigger the workflow with the decision using SAP_WAPI_EVENT_CREATE.
               However sometimes out of 5 decisions only 4 reaches and the workflow never completes since I wait till all the decisions  are received.
    After triggering the event I also update a table which shows correct values meaning the data is correctly passed from UWL.
    Not sure what can be the cause. Anyone any ideas.
    Thanks
    Papiya

    Hello,
    Either the event isn't being created, or the event is being created ad the workflow isn't triggering.
    Check tx SWEL (event trace, turn on with SWELS) to see if SAP_WAPI_CREATE_EVENT is creating the events.
    It will also show you if a workflow is triggered, and what the workitem id is. It will also show any errors.
    regards
    Rick Bakker
    Hanabi Technology

  • Two events for same workflow

    Hi Friends,
    I needs to develop a workflow. In my workflow i have to send email notification when it is relesed as well as if user will change the PO after finally released  i need to send email notification for change also. 
    i.e : 1. email notification for PO aprroval
          2. after finally approve the PO if they change again i have   to send mail. In future also if they change   released PO i have to send mail again.
    Is this possible in one workflow OR i have to create 2 workflows.
    Thanks,
    NK

    Hi Naresh  ,
    Yes you can do this within the same workflow . Just add an entry in the transaction SWEC for change event of your object .
    Here are the steps :
    Click New Entry.
    Give Change doc object .
    Object type as your  object .
    Event as your event name which you created..
    Select Change radio button .
    Save.

  • For triggering events

    Hi frnds ,
    I want to trigger events based on some conditions . i have created a subtype of my bus object . i will trigger my eveny using Funct. MOdule  BBP_EV_API_EVENTS_SAVE . This FM does triggers standard events . What i want to know is if i create my custom event i will fire it by using the same FM then will my event trigger or should any coding needs to be done inside the event in my custom bus object .
    Also is it always necessary that we have to do any coding inside the event for triggering it . Provided that we have done all the configurations in all the transactions like swec , swe2 .
    Thanks
    Rohit

    Hi Rohit,
    >
    ROHIT GUPTA wrote:
    > Also is it always necessary that we have to do any coding inside the event for triggering it . Provided that we have done all the configurations in all the transactions like swec , swe2 .
    You couldn't do any coding inside the event. You probably need to do some coding to trigger the event.
    Regards,
    Martin

  • Terminating Event for BUS2017 Custom Method

    Dear Experts,
    I have an issue with the Terminating Event of the Workflow for BO : BUS2017. The event is getting triggered but receiver is not being picked.
    I have created two events GR_103 and POST_105 in the Custom BO ZBUS2017 by delegating it to BUS2017. GR_103 is the triggering event for my workflow which I have triggered in the POST_DOCUMENT Method of the Implmentation for BADI : MB_MIGO_BADI.
    GR_103 is triggered while doing MIGO (Goods Receipt) for Movement Type 103. My Workflow is triggered perfectly and then I have used a Dialog Asynchronous Task in which I have called the MIGO Transaction for Releasing the GR Blokced Stock using the Movement Type 105. I have created a Custom Method POST in the BO ZBUS2017 and I have used the FM: MIGO_DIALOG to call the MIGO. I am trying to raise the POST_105 event in the Method MB_DOCUMENT_BEFORE_UPDATE of the Interface IF_EX_MB_DOCUMENT_BADI.  I have defined the Terminating Event for the asynchronous Task as POST_105.
    Now the event POST_105 is triggered, but SWEL says 'No receiver entered'. Even the SWEINST shows the object data as the current Work Item along with Object Key, but still receiver not picked. When I try to trigger the same event in a test report by using call transaction, then the event triggers and work item gets completed without any issues.
    Please advise.
    Below is my terminating event code.
      READ TABLE xmseg INTO wa_mseg INDEX 1.
      CONCATENATE wa_mseg-mblnr wa_mseg-mjahr INTO l_objkey.
      IF wa_mseg-bwart = '105' .
        CALL FUNCTION 'SWE_EVENT_CREATE'
          EXPORTING
            objtype           = 'BUS2017'
            objkey            = l_objkey
            event             = 'POST_105'
          EXCEPTIONS
            objtype_not_found = 1
            OTHERS            = 2.
      ENDIF.
    Regards,
    Raju.

    Have a COMMIT WORK after the function call. (At least test it - I am not sure if it will have some effects in your BADI - at least you will know whether the issue is about missing commit).
    And please use SAP_WAPI_CREATE_EVENT instead of the old function you are using.
    Also, make sure that the events will look exactly the same in event monitor SWEL when triggered from your code and when using test tool. Maybe there is some minor difference/mistake (object key, etc.) that you haven't noticed.
    Regards,
    Karri
    Edited by: Karri Kemppi on Feb 7, 2012 8:14 AM

  • Create new event for BOR object  for vendor creation

    Hello,
              I AM working on workflow.. Requrement is that , when a vendor is created I wanted the workflow to be triggered..
    But I dont find any bussiness object for this...
          Then I have created customized BOR object super type as LFA1. And created new event. Now I need to assign functionlity to this event, that is As soon as the vendor is created this event should be triggered so that I can use this as the start event for the workflow..
    Plz guide me ...
    Regards and Thanks,
    Poornima...

    Hi Poornima,
    Create a subtype and add the event in the BOR.
    Now call the FM  Userexit / BADI.
      CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          OBJECT_TYPE             = 'ZKNA1'
          OBJECT_KEY              = OBJECT_KEY
          EVENT                   = 'ONSAVE'
    *   COMMIT_WORK             = 'X'
    *   EVENT_LANGUAGE          = SY-LANGU
    *   LANGUAGE                = SY-LANGU
    *   USER                    = SY-UNAME
    *   IFS_XML_CONTAINER       =
    * IMPORTING
    *   RETURN_CODE             =
    *   EVENT_ID                =
       TABLES
         INPUT_CONTAINER         = IT_CONTAINER
    *   MESSAGE_LINES           =
    *   MESSAGE_STRUCT          =
      IF SY-SUBRC <> 0.
        ENDIF.
    &******************Reward Point if helpful*************************&

  • BTE 1030 - we use for AP documents, create an event that triggers a workflow

    Hello all,
    We use SAP's program RFBIBL00 to post AP documents.  We coded a function module that is called when BTE 1030 is reached.  Our FM creates an event that triggers a workflow.
    We are now doing some testing with an external vendor who is creating AP documents by doing an RFC  using function module BAPI_ACC_DOCUMENT_POST.
    It seems that this BTE, 1030, is not being triggered when the IDOC created by this function module posts the AP document.
    Has anybody else seen this issue and found a way to deal with it?
    Thanks
    Bruce

    AFAIK BAPI_ACC_DOCUMENT_POST and FI posting should trigger BTE 00001030 but BAPI_INCOMINGINVOICE_CREATE and AC interfacewould trigger BTE 00001050. (or is BAPI_ACC_DOCUMENT_POST also using AC interface, I will let you check it)
    Nevertheless call your FM triggered thru BTE 1030 also in a FM triggered thru BTE 1050. Also in the call check for update task
    function z_fi_00001050.
    call function 'TH_IN_UPDATE_TASK'
         importing
           in_update_task = in_update_task.
       if in_update_task eq 0 and i_xvbup eq 'X'.
         call function 'Z_FI_00001030' in update task
           exporting
             i_xvbup = ' '
           tables
             t_bkpf  = t_bkpf
             t_bseg  = t_bseg..
       else.
         call function 'Z_FI_00001030'
           exporting
             i_xvbup = ' '
           tables
             t_bkpf = t_bkpf
             t_bseg = t_bseg...
       endif.
    Regards,
    Raymond

  • 'CHANGE' event not triggering for BTE 2214 on park/change from FBV1/FBV2

    I have designed a workflow template for FI parking. If the parked document is rejected, i need to trigger FIPP 'CHANGE' event for sending workitem to approver when someone changes the parked document. In SWEL event trace, the 'CHANGE' event is not getting raised.
    So i implemented a BTE 000002214 and now i am able to raise 'CHANGE' event and capture it in workflow. But this is only working when i park a document using FV50 transaction and later change it.
    But when i park a document using FBV1 and then make changes from FBV2, the 'CHANGE' event is not being triggered in SWEL. Should i implement some other BTE like 2218 etc? Can you please help?

    Hi Gokul,
    You can try handling the SAVE event instead of the CHANGED event.
    T-code FBV2 will not allow you to save the document unless you make some changes.
    Try implementing BTE 2218 and revert.
    Thanks,
    Sreekanth

  • Wait for Event step in Workflow (Urgent).

    Hi,all!
    I am unable to implement the wait for event successfully in my workflow..
    Sceanrio: I have created a container element in the WF with of type a <b>BOR(ISUPARTNER)</b> whose <b>CREATED</b> event is being waited for in the workflow.
    Then in the <b>WAIT FOR EVENT</b> step in WF I m giving putting in the details  of the event..
    Then putting a send mail after this.
    Problem: Now my workflow is throwing error and the send mail task is not executed even after the said event is done in the system..
    Plz... suggest as to how to do it..
    Thanks,
    Sudipto

    <i>Now for this I m actually creating a container element of type BOR B in my workflow n putting a step WAIT FOR EVENT in which I m putting the CREATED event. For triggering the CREATED event no instance is required...</i>
    - Once again, Wait For Event step is only possible when the Object Key is available to the Workflow container when the flow reaches the event (are you waiting for a specific ISUPARTNER to be created or you don't care as long as some ISUPARTNER is created).
    <i>my event CREATED is not getting triggered automatically...</i>
    - First check if the standard system triggers the event for your object. If not explore different options for doing that.
    For your scenario, check if you can trigger a custom event BORB_Created for BORA when BORB is created and use BORA in the Wait step.
    Please post future Workflow questions in the Business Process Management forum.
    Cheers,
    Ramki Maley.
    Message was edited by: Ramki Maley
    Message was edited by: Ramki Maley

  • Std Workflow events for HR Scenarios

    Hi I am looking for standard workflows for the following scenarios. Can someone tell me if there are any standard workflow events or should I go for creating a new WF event.
    1.Legal Name change---Is there a Wf that triggers some notification.
    2.Hire Action in SAP--Is there a Wf that triggers some notification to HR team and Dept mgr.
    3.Hire Action in SAP--Is there a Wf that triggers some notification to HR team and Dept mgr.
    4.Leave of Absence--Sap notifying HR team.
    5.Initial change(IT 105)--Payroll Admin sends notification to associate as well as security team.
    6.Marital Status Change.
    7.Termination(Voluntary and Involuntary)--Notification to Security team.
    8.Probation--Sap reminds the HR team that date is due for employee to return.
    I was thinking that for every scenario we have to create a new wf event. I may be wrong but is there a standard wf for the above.
    Thanks in advance.

    There are std. workflows for this, but it will depend upon your configuration. You can trace whether a workflow is getting triggered from txn: SWEL.
    The better option is to use the MAIL feature of dynamic actions. Here's the process:
    Enter the name of the feature which defines the characteristics of the mail.
    Example
    Infotype  Field  .....  Ind.    Var.function part
    0001     SACHP         M       M0001
    A mail is sent when the field SACHP is changed. The characteristics of the mail are defined in feature M0001.
    In the standard system, feature M0001 is provided as a model. The documentation on feature M0001 explains how to define the characteristics of a mail.
    Thanks
    Sankhadip
    <b>Reminder: Points should be awarded on answers</b>

  • Event is triggered once, but two workflow instances start

    Hello all,
    I have a workflow that is triggered by the event ISUSWITCHD.Created.
    Unfortunately two workflows of the same version start on this event.
    This event is triggered only once according to SWEL.
    i have already copied the old workflow pattern (deactivated) and created a new pattern. Problem still exists.
    There are no double entries in SWETYPV also.
    Is this a Basis problem?
    Any help is aprreciated,
    Bye,
    Holger
    Edited by: Holger Reimer on Sep 20, 2010 9:43 AM

    1. Go to the transcation SWE2 and check whether there is entry for the same workflow two times. If yes then check for what 
        other event the same workflow is being triggered.
        Create a check function module to test what was the actual triggering object.
    2. If there is no such entry then check through out the code whether that worlflow is being called through a function module or  
       not. If that is being callde by a function module then the the SWELS cannot trace the triggering of the workflow and the
       workflow will be trigered.
        If such type of entry is still not there means  that the code does not contain any FM that will trigger the workflow then check 
        for it.
    3.Go to the transcation PFTC.
       Give the workflow number and choose the workflow template. There you can check wherther any other event is assigned to  
       the workflow. If yes then trace that and deactivate the linkage if it is not required.
    Thanks!

  • JMS subscriber is triggered twice for a single message.

    I have a JMS distributed topic created on a cluster (WLI sp4). When a message is published to the topic, the subscriber (JPD) is triggered twice. Two instances of the same JPD are triggered and they run parallely. I have two managed servers associated with the cluster.
    Can any of you help me know why this is happening? Is this a known issue in sp4?
    Will really appreciate if you help me out of this.
    Edited by elangosv at 12/11/2006 1:07 PM

    No, this is a correct behaviour of WL distributed topics (DT). When you
    publish message into DT it'll be replicated to all physical members of the
    DT. JMS Event Generator (EG) which will trigger the jpd is just an MDB,
    subscribed on DT (on its local physical member). I assume you have two JMS
    servers deployed on each managed node and your EG and JPD are deployed to
    the cluster (on both managed nodes) as well. Thus, and MDB (EG) on each node
    will receive a message replica delivered to the local DT member and will
    start a JPD.
    In order to solve the issue you may use non-distributed topics instead: you
    may specify topics with the same Name and JNDIName on both your JMS servers
    but its JNDI anme must be not replicated through the cluster:
    JNDINameReplicated="false". Your JMS servers must also not use migratable
    targets in this case.
    Another possible solution (that I use for some reason): to add into the
    message a JMS property identifying the source of the message, i.e. the
    server (managed node) name. EG on each node has a JMS selector which
    specifies that it'll filter out messages produced on other members of the
    DT. (jms_Source = '<your node name here>').
    HTH, Denis.
    <Elango SV> wrote in message news:[email protected]..
    I have a JMS distributed topic created on a cluster (WLI sp4). When a
    message is published to the topic, the subscriber (JPD) is triggered twice.
    Two instances of the same JPD are triggered and they run parallely. I have
    two managed servers associated with the cluster.
    Can any of you help me know why this is happening? Is this a known issue in
    sp4?
    Will really appreciate if you help me out of this.
    Edited by elangosv at 12/11/2006 1:07 PM

Maybe you are looking for