Wait for event step without callback

Hi All,
In 4.6C I have the following problem:
We have a workflow that has a fork with 2 branches, with 1 necessary for continuing the fork.
One of the branches has a dynamic parallel processing step on a multiline container element, where each parallel process is a wait for event step. For example if the multiline element has 5 records, than there will be 5 parallel wait for event steps on this branch, and if all 5 are completed, then the workflow continues after the fork and the other branch should be logically deleted (normal behaviour).
The other branch has a single wait for event step, if this event is received, the other branch's parallel wait for event steps should be deleted to continue.
The problem is that when the event for the latter single wait step is received, the step gets completed, but sometimes the parallel wait for event steps on the other branch are not deleted and the wokflow does not continue. The completed wait for event step shows that the callback is not completed yet.
I tried to fix these steps in SWPC, but in 4.6C it does not work for wait for event steps w/o callback. There's an OSS note for higher releases where this is fixed to enable SWPC for wait for events, so I copied it to a custom program and use that right now.
First question is why does the system not continue these workflow's when the event is received? My guess is that the tRFC calls get stuck and when the tRFC job reprocesses the entries, it does not do it correctly. For example lately we had a tablespace problem that caused some tRFC calls to go into error. The waiting steps in the instances were completed w/o callback. I reprocessed the tRFC entries, which created new entries in the Workflow logs showing that the events are received, but the workflows still hang.
Second question, it takes a lot of time to logically delete those parallel wait for event steps. When the event for the single wait for event is received and the workflow continues w/o problem, it may take tens of minutes from the receipt of the event until the parallel wait for event steps get deleted and the WF continues. Why does it take so long?
Thanks,
KK

Hi,
Regarding the delay and the hundreds of thousand SWW_CONT updates... the main workflow on one branch does a dynamic parallel processing of a subworkflow using a multiline container element that can have 50 or even 100 elements. So we can have 50 or even 100 subworkflows waiting for their event to be triggered.
The main workflow container contains many elements, some multiline with long structures, so in one instance the main flow had 8000 entries in SWW_CONT (each field of a structure is a separate record in SWW_CONT).
Now if I do the math, when this workflow loads all the container elements of the main flow into the 100 waiting subflows before deleting them and continuing along the other branch, it creates 100 times 8000 entries in SWW_CONT, that is 800.000 inserts!
And this was ONE single workflow.. Imagine when we have just a few hundred and they all want to continue at the same time...
Anyway, the beauty comes now....
I created a simple main flow with a single multiline import parameter USERS of object USER. It has a fork with 2 branches, 1 enough to continue. One branch is a user decision with 1 option: Continue. The other branch has a subworkflow and it does dynamic parallel processing with the multiline element USERS.
The subworkflow has one single import element USER of object USER. It has only one step, a wait for event, waiting for the DELETED event of the USER object.
That's the scenario.
When I start the main flow, filling the USERS parameter with two user objects, on the first branch it starts the two parallel waiting subflows with one user each, and I get the decision step on the other branch. If I check the subflow containers this time, they only have one USER object each.
Now if I complete the user decision, the workflow continues, logically deletes the subflows and completes. If I check the subflow containers after this, they all include the USERS multile container element with all the USERS I started the main flow with!
So this time it was a different main flow, different subflow, different events. I guess there can't be any custom code doing this, unless there's some generic workflow user exit somewhere.
Feel free to test this yourselves if you have 4.6C, quite easy scenario. Guess I'll try in ECC 6.0 too just to see...
And I'll report to SAP for sure.
Regards,
Krisztian Klausz

Similar Messages

  • Error while completing Wait for event step

    Hi Gurus,
    I have a Workflow developed which has a "Wait for Event" step.
    In that step,I am facing a problem .It seems the step is not getting completed properly.
    When I check in SWEL it shows the Event is triggered.But the next which is a 'Send Mail' step is not getting executed.
    The Event shows action status as "Receiver started correctly".
    When i executed "Complete Manually " in SWIA,it executed correctly and also the further steps got executed.
    What could be the issue ?
    Many Thanks in advance !
    Regards,
    Ameya Kulkarni

    Hello Ameya !
                     To one of my replies to this thread you have stated that no container elements are configured to wait for event step.
                     Without business object,event and container element with object reference, wait for event will not fire.
                     When the user changes the status in KO02, event fires and is seen in SWEL.But, if it should reflect in workflow, afore- mentioned details needs to be configured in wait for event step.
                    Have you configured this wait for event step with event 2 ?
    Regards,
    S.Suresh

  • Error in "Wait for event" step

    Hi,
    I try to use a wait for an event (CREATED) on a delegated subtype to business object KNB1.
    Container element in the wait step is empty at the time of creation of the runtime wait item but I know what the key of the container element has to be so my idea was to set in a check funktion module in trx. SWEINST and filter out irrelevant events.
    But when the waitstep is to be created, the workflow goes into error: WL 442 No valid object for the container element.
    Should this not be possible?
    Any suggestions for another solution?
    I have also tried to instantiate the object before the wait for event step - but since the object does not exist in the database yet - method GENERIC.INSTANTIATE goes in error, too.
    WAS 700 sp 11 with ERP 6.0 but also tried on a 620 with 4.7
    Thanks,
    Regards,
    Claus Lücking

    Hi Mark,
    Yes, you are right - I am waiting for an event on a object not yet created:
    I am waiting for a customer to be created in FI via change documents (table KNB1). Since the customer is going to be created in a company code that has a one-to-one reference to the sales organization where it is created first, I know the key of FI customer to be created.
    Example: A Customer 23 is created in sales area 1000-01-01 and the workflow is triggered via an event KNVV.CREATED. Then I would like to wait for event KNB1.CREATED for customer 23 in company code 1000.
    Thanks,
    Claus.

  • Workflow WAIT FOR EVENT STEP deadline not working

    Hi,
    Need some inputs for the experienced people;
    I have a wait for event step in a workflow with deadline monitoring (Latest End) but it doesn't seem to work.
    Ofcourse, all the required setting are in place and deadline works fine for other Activity steps.
    The problem is specific to Wait for event step.
    The alternative is having a fork but I just want to know why the wait step with deadline doesn't work.
    Thanks,
    Roopesh

    Hello Ajay,
    Can you share with us what did you do to solve your problem?
    I'm facing the same thing in my project now, I'm wandering if you could help me with this one.
    I have this wait for an event step wich is configured to wait 4 minutes since the work item creation. I've also selected 'Modeled' on the Action field, and a display text for the outcome.
    But in one of my tests, the event hasn't occurred and the workflow stuck in this task forever.
    Thanks in advance.
    Regards.
    Actually, I think I got this handled. This thread was really helpful to me: http://scn.sap.com/thread/47482
    Message was edited by: Leandro Farias dos Santos Abreu

  • Wait for event step..

    hi all,
    I have a wait for event step in my owrkflow and it is working fine. My problem us i am not able to trigger this event using program can anyone please let me know what i am doing wrong. following is the code i am using to trigger the event
    DATA: key TYPE SWEINSTCOU-OBJKEY,
            object  TYPE  SWETYPECOU-OBJTYPE,
            event TYPE SWETYPECOU-EVENT.
      DATA: event_id LIKE swr_struct-event_id,
            return_code LIKE sy-subrc,
            input_container TYPE swr_cont OCCURS 0 WITH HEADER LINE,
            message_lines TYPE swr_messag OCCURS 0 WITH HEADER LINE,
            message_struct TYPE swr_mstruc OCCURS 0 WITH HEADER LINE.
    *  CONCATENATE pernr reinr INTO key.
    key = reinr.
      object = 'BUS2089'.
      IF action = 'APPROVED'.
        event = 'APPROVED'.
      ELSEIF action = 'REJECTED'.
        event = 'CANCELLED'.
      ENDIF.
    *  swc_create_object object 'BUS2089' key.
      CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          object_type             = 'BUS2089'
          object_key              =  key
          event                   = event
         commit_work             = 'X'
         event_language          = sy-langu
         language                = sy-langu
         user                    = sy-uname
    *    IFS_XML_CONTAINER       =
       IMPORTING
         return_code             = return_code
         event_id                = event_id
       TABLES
         input_container         = input_container
         message_lines           = message_lines
         message_struct          = message_struct
    commit WORK.
    however if i execute the FM SAP_WAPI_CREATE_EVENT by passing the values it works fine.
    Thanks
    Saurabh

    Hi
    however if i execute the
    FM SAP_WAPI_CREATE_EVENT by passing
    the values it works fine.
    It will trigger only when you execute the above function module or
    SWE_EVENT_CREATE because 
    You have a BO and an event associated with it now when you want to trigger this this event through program then you have to make a kind of mapping between BO and your program so thta's what this Fm does, when ever you execute the program as you are passing all the values to the Function the Evnt associated with the BO is triggered.
    In order to trigger use SWE_EVENT_CREATE aand after calling this fucntion use COMMIT WORK statement
    Could you let  me know what condidtion did you write for the WAIT step to continue.
    Regards
    Pavan

  • Wait for Event Step (Urgent).

    Hi, all!
    I m unable to successfully execute my WAIT FOR EVENT step in my Workflow.
    Scenario:
    Have my own customised screen for HR approval process. In the second step after displaying to the approver when he actually presses on the <b>APPROVE</b> button my <b>APPROVED</b> event for the <b>same object</b> is triggered. Now I m waiting for this event im my workflow. Done the <b>WAIT FOR EVENT</b> in the WF .ie. from WF container selected the BOR and assigned the <b>APPROVED</b> event in the <b>WAIT FOR EVENT</b> step.
    Problem:
    My WF is unable to catch the event .ie. even in SWEL, "<b>NO RECEIVER FOUND</b>".
    Thanks and Regards,
    Sudipto

    Hi!
    Thanks.
    Actually I m facing a peculiar porblem...
    Scenario: My WF has  3 steps.
    1)The user fills in the initial screen.
    2)Then it goes to the second person who adds comments    and approves it.
    3)This triggers the <b>APPROVE</b> event for the same OBJECT.
    For which my WF has the <b>WAIT FOR EVENT</b>. After which there is just this SEND MAIL task
    Problem:
    My WF when executed by itself actually performs perfectly and the SEND MAIL is actually executed.
    But when it is initiated from my ABAP prog...It goes to the next level user in line, where he adds his comments n then it goes to my <b>WAIT FOR EVENT</b> but my SEND MAIL is not executed.
    As the 2nd step of display is done with the object key hence there shud not be any value passing prob from my prog.
    I cannot understand the prob.....
    Regards,
    Sudipto
    Message was edited by: Sudipto Barman

  • 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

  • How to use wait for event step

    Hi,
    I need to trigger wait for event step for my workflow but I am not able to trigger that .
    Can anyany one of you tell me in detail what are the necessary config.and bindings i need to do for that .
    Also i need to pass data from my report program(where i am triggering the event for the wait activity) to the workflow through event triggering for the wait step.
    Please tell me how can I do that .
    Thanks in advance.
    Anand

    Hi,
    I think you can use the function module "SAP_WAPI_CREATE_EVENT" to trigger an event. Make sure that the instance data is same in both ends. To send data from your report, you can populate the event container using the container related macros.
    Check this link for more information
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af4a453d11d189430000e829fbbd/frameset.htm
    Regards
    <i><b>Raja Sekhar</b></i>

  • Help creating a Wait for event step

    Friends,
    I'm working in the following way:
    1-My workflow to create a vendor is triggered.
    2-Fork with 2 flows (1 to terminate):
    2.1- if user executed XK01 by wi and created the vendor;
    OR
    2.2- if the user executed xk01 directly and created the vendor, by exit, I call an event... that is in a Wait for step task. But it is not working. in swel it is givin me the message: 'Linkage deactivated'.
    please help me!

    Steady on there Amandeep...
    1. Don't change the error feedback settings on the event linkage directly.  Leave it on "system setting".
    2. Go to transaction SWEQADM and select the "Basic Data" tab.
    3. On the basic data tab set the "behaviour on error feedback" to:
    a) "Mark linkage as having errors" - if this is a QAS or PROD system - that will let you redeliver the event from SWEQADM once you have fixed the problem.
    b) ""Do not change linkage" - BUT ONLY!!!!!!!!! if this is a development system where no-one cares where dead workflow instances go.  And usually I would recommend making the development system "Mark linkage as having errors" too - gets you used to the event problem diagnosis/redelivery process for when you get to QAS/PRD.
    The most common problems I see for deactivated event linkages is workflow definition not activated, or mandatory import container elements not provided in the workflow/event binding.
    Regards,
    Jocelyn

  • Error in "Wait for event" step in a WF

    Hi,
    I try to use a wait for an event on a Z object
    When i test the workflow i get the error: "WL 442 No valid object for the container element".
    Can someone please help me with this error?
    So far, i have only created the event in the object zaccount. This event has to be trigger everyday at 12:00AM so taht every workflow in wait restarts, i also do not know how to do this, because using the function SWE_EVENT_CREATE or SAP_WAPI_CREATE_EVENT i ahve to pass the objectkey, how do i obtain the workflow keys? can't i just trigger this event for everyworkflow waiting for it, no matter what the key is?
    Thanks in advance for any help given
    Regards,

    Hello,
    I haven't created any binding, i jsut assigned it in the vent, as i tried with another event from another object and it needed no binding.
    What i do is I assign the container element and the BOR type, and then assign the event. I haven't defined any binding because it shouldnt be needed i believe.
    BTW, i am new to WFs, so again, thanks for eveyr answer.
    Thanks
    Hello,
    "WL 442 No valid object for the container element".
    How is the binding between the event and the workflow, are you passing the object? Are you using a key?
    regards
    Rick Bakker
    Hanabi Technology

  • Problem with wait for event

    Hi everyone,
    I'm using wait for event step in my workflow of a custom event called zevent2.
    I'm not using the event as a start event of the workflow.The event is getting triggered at a certain point of the workflow programmatically.
    So for that what should be the entry in SWE2? I've maintained the following entry for zevent2 at swe2 tcode.
    Object type: BUS2000126
    Event: ZEVENT2
    Receiver type:
    Receiver function module: SWW_WI_CREATE_VIA_EVENT_IBF
    In swel I'm finding out that event got triggerd but it is giving error "No Receiver Entered".
    And the workflow is getting stuck at 'wait for step event'.
    So can anybody please tell me what is the step am I missing? is the swe2 correct?
    Thanks & Regards,
    Anirban

    HI....
    you have to specify RECIEVER TYPE without which you will be getting this error
    goto SWE2 and give the value and your problem will be done
    regards
    Edited by: Mohit Kumar on Feb 20, 2009 10:50 AM

  • Wait for event - workflow 4.7

    Hi, not sure if this is the correct forum for workflow or not but here is the problem.  I have a custom BOR with 2 key fields, both character.  The BOR has some some events one of these events is 'submitforapproval' and another is 'reviewed'.  The 'submitforapproval' event is raised by an external R/3 program and is used to trigger the workflow in question.  This works well.  The 'reviewed' event is also raised by an external program and is used in a 'wait for event' step inside the same workflow. Once this event is raised the workflow continues. This happens sometimes without error and other times it can't find a receiver.  I have looked at the event linkage through SWEINST when there is an error and while the receiver key is correct the object key holds incorrect information causing the 'receiver not entered' error.  Why is this happening?  When the workflow is triggered the event manager should set up the linkage for waiting event from the BOR key in question, why is this not happening?  What can I do?
    Any help will be appreciated,
    Kevin

    Thanks for the reply Gareth.
    My WF C has a normal step in it that calls the A workflow.
    I've tried numerous combinations, but as it is now, I have the WFINITIATOR, WFPRIORITY, ATTACHOBJECTS, and an object reference parameter being passed into workflow A.
    Basically, that task just references the WS workflow object to kick it off.
    WF A doesn't have any triggering events.  It was previously manually initiated through the SWW_WI_START function in a custom transaction.
    After the process has trickled through C->A->B and is at the wait step, I'm using another external custom transaction that initiates an event (for the wait step in WF B) using the SWE_EVENT_CREATE function.  I'll be doing some more testing here today...  but I have a feeling there's something wrong with the object key I'm passing through.
    I'm not new to WF...  but I've only really ever maintained existing workflows.  We'll say I'm still learning the complexities.  There is a pretty good chance that I'm just missing something really obvious or stupid.
    Thanks for your help so far...

  • Error in Workflow wait for event node

    Hello Experts,
    I am working on one QM notification. I shall explain the scenario first:
    1) User will take the usage decision on inspection lot in QA11. When user will take decision and save inspection lot BUS2045 event USAGEDECISIONMADE will be triggered and initiate my workflow here.
    2) After workflow initiation system will create notification and send to approver, but here i have wait step in my workflow for BUS2078 - Created (Notification).
    wait for Event step
    BO: BUS2078
    EV: CREATED
    I am posting error below:
    Error when starting work item 000000294361
    Error when processing node '0000000060' (ParForEach index 000000)
    Error when creating a component of type 'Wait Step'
    Error when creating an event item
    Error within method CL_SWF_RUN_WIM_EVENT->_CREATE_WORKITEM_CONTAINER
    Error within method CL_SWF_RUN_WIM_EVENT->_GET_INIT_WORKITEM_CONTAINER
    Workflow 000000294361 wait step 0000000060: No valid object ID in container element 'Notification
    Node 60 - wait for event step.
    Re.,
    Guri

    Hi,
    Based on your description what I felt is you are making use  of a wait step in which you have choose to wait till BUS2078 event CREATED is occured ... right.. Now can you please clear me that where and how this event will triggered.
    or is it some thign like you are making use of event creator step and in this case, When ever you are making use of the eventcreator  step and a BOR object inside it make sure that specific BOR object is already instatitaed in the workflow container , if it is instantiated then only it will try to identify the instance  or the BOR and it will try to rasie the event.
    Regards
    Pavan

  • Error in wait for event activity

    hi all,
    i am gettin gfollowing error when i am using wait for event activity in my WF.
    wait step 0000000088: No valid object ID in container element 'EVENT_BOR'
    'EVENT_BOR' is my container element of type BOR object which contain event.
    please tell me correct way to use wait for event step.
    i am using this on one parallel branch of Fork.
    thanks.

    Hi,
    check the event in SWO1 if there is an import parameter defined. If there is one you have to define the binding in the task waiting for event. You have to bind the relevant object type from workflow to containerelement &_WI_OBJECT_ID& of the event container.
    reagrds,
    Steffen

  • Need help on Wait for Event.

    Hello all.
    I faced an issue with wait for event step,Which goes like this.
    For a workflow one of the fork branches there is a wait for event step(wait for manual release) . On development server when ever that event is fired (manual release) , the wait for event is capturing and completing the workflow ( This is the correct process).(PO release procedure)
    On production system, this event is not been caught(after manual release is done) and and the workflow is not  complete and still in progress. (even po is released manually) Which should not happen.
    So what all the things i need to verify in the production to fix this. I cannot simulate any kind of event on production ryt. so please suggest.
    please suggest.
    Cheers
    PRASAD.

    Hi Prasad
    i doubt that in Production the event trace would be on. Check SWELS to see if you see the "OFF" button (this means the trace is on). If it is On, check SWEL to see if any event is there for rejection. You will have to ask example of the PO and search using the Key (PO number).
    Also, check the workflow instance which is supposed to complete when the rejection happens (which did not complete). Check the technical WF log. Look for the Business Object container element which should hold the runtime instance. Check if it has a value and the same is bound from the event to the workflow in the wait for event step's binding. (_EVT_OBJECT to Workflow Container element of same type). This WF container element should have an instance and should not be empty for the wait step to work.
    Regards,
    Modak

Maybe you are looking for

  • Connect macBook to HDMI TV

    Starburst background displays on HDMI TV but not any applications (Safari, files, other programs)

  • HT1454 Ipod touch video to TV

    I have made a video on ipod touch but cannot view it on my tv 

  • E71-Memory Card in use ERROR!

    hi, After transfering data to memory card through data cable from my pc and disconnecting it in the way it has to be done, the following error occurs:- *When tried to access memory card it shows an error msg saying memory card in use. The only way is

  • Re-Installing iPhoto on 10.6.8

    Hi ! - Bought iPhoto on the Mac App Store a few months ago - Did a clean install of 10.6.8 today. - Tried to install newest iPhoto version. --> This failed, because the latest iPhoto needs at least 10.7.4 How do I get a working version of iPhoto for

  • Logo Printing Problem

    Hi All ! In my smartform, I am using 2 logos for 2 different compnay codes. For only 1 company code the logo is not getting displayed, But for the other company code it is working perfectly fine. Please advice.