Wait step event

Hi,
i am new to the workflows.i worked in support project and i am looking for development.
could any one can explain:
what is wait step event,
when it should be used and
while creating the wait step event do we use any tcodes to assign the events(swetypv,sweinst etc)
generally when we use starting events we will write start conditions based up on that event will be triggered so in the same way how waitstep event will be triggered?
Regards,
Mudhiraj

Use
A wait step can wait for:
u2022  An event
u2022A condition
u2022A local event
u2022An event that is initially received by the workflow.
At runtime, a wait step is represented by a wait step work item. Wait step work items are not displayed in the Business Workplace. You can, however, locate these using work item selection.
Correlations
You can use a correlation when waiting for an event and when waiting for an event by using workflow.
A correlation enables you to identify objects that belong together, for example, a quotation and the relevant sales order.
Features
Wait for Event
When waiting for an event, the wait step is terminated when the event specifies occurs. This event
terminates all wait steps waiting for this event.
You can use this type of wait step for the following purposes:
u2022To suspend the workflow until a defined event has occurred.
           A workflow is to wait until documents requested have been provided for an applicant activity. Once the
requested documents are received, the transaction used for inbound processing and archiving creates an
event which the wait step waits as a receiver.
u2022To wait for an event in a parallel processing branch, which renders processing in the other
branches unnecessary.
The event for which the wait step waits should not be created in the other branches of the fork.
u2022Wait for the result or a message from another workflow that was started in another system by the
WebFlow function.
u2022Wait for a message of the process that the workflow started using a Wf-XML message.
Wait for Condition
When waiting for an event, the wait step is terminated when the corresponding condition returns the
value true.
Wait for Local Event
When waiting for a local event, the wait step is terminated when this event occurs.
Wait for Event Via Workflow
When waiting for an event via the workflow, the event is initially received and temporarily saved by
the workflow. Once the wait step has been activated, the event is forwarded to the wait step. During
waiting via the workflow, the event can terminate a maximum of one wait step. If several wait steps are
active, the event terminates the oldest wait step.

Similar Messages

  • 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 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

  • Abap-Class-Event in Wait Step

    Hi guys,
    in my workflow i have an activity with an abap method. This method works like a dialog. This means, i get a workitem in the business-workplace which shows a webdynpro where a pdf is displayed and where i can choose whether i click on button1 or button2.
    When i click on one button, an abap-class event will be created. This event has a container. My target is, to bring the user desicion back to the workflow via event.
    When i start a new workflow with this event then it works fine. But i dont want 2 workflows. I need a solution with one workflow. So i use a fork in my workflow. In branch 1 i have the activity which displays the pdf and create the event. In the other branch i have a waiting step, which waits for the event and bring the user-desision from the event-container to my workflow-container.
    That was my plan, but it dont works this way. I checked the event-trace and theres no receaiver entered for my event. So my workflow stoped at the wait-step (wait step is ready).
    I read, the the workflow system is automatikly doing the type-linkage and the instance-linkage, but i found only the instance-linkage filled. Can it be, that the wait step is only working with BOR-Events?
    Any ideas?

    Hi swangir,
    i tryed this FW SAP_WAPI_WRITE_CONTAINER some days ago. I can use SAP_WAPI_READ_CONTAINER easylie but when i try to modify the container then i get an enqeue exception in the SAP_WAPI_WRITE_CONTAINER FM. I guess this came up, because i call the webdynpro from an activie-step in the workflow and not a dialog-step. So i guess the container is locked and i cant write. I also tried to unlock it with dequee_e_ .. FM i forgot the name. But it also didnt work.
    Thats why i tryed to bring the user desision via event back to the workflow. And it works, as long i use 2 workflows, like i explained in my first post.
    What do u mean with...
    "Alternatively, you can bind back the class event container to workflow container by binding back from the dialogue step."
    Andre

  • 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

  • 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

  • Event triggerred before Wait step

    What can we do when the event is triggerred before the wait step? Does anyone know about the concept of parked events?
    Iam using f.m swe_event_create, can we use the start_with_delay option or some other option..
    I would like to have some delay before the second event is raised. but at the same time as this would be a online program, the user should not feel the delay..
    or the Wait step should be modified to pick up already created events..(i think this is called parked events).
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    *objtype =
    *objkey =
    *event =
    CREATOR = ' '
    TAKE_WORKITEM_REQUESTER = ' '
    START_WITH_DELAY = ' '
    START_RECFB_SYNCHRON = ' '
    NO_COMMIT_FOR_QUEUE = ' '
    DEBUG_FLAG = ' '
    NO_LOGGING = ' '
    IDENT =
    IMPORTING

    Hi Karri, thanks for the reply ..There is a presentation on parked events if you search the wiki and blogs on this site, you will find it but thats the only thing i have seen about it and its not really helpful.
    the problem is.. 2 Inbound idocs are created both at the same time one raises a event for workflow.. one raises a event for Wait step in the same workflow ..
    The 2 inbound F.Ms which raise the events, can error sometimes or the workflow can create a workitem before the Wait step and hang in there till its processed..(its unpredictable which one will trigger first)
    If the second event(for Wait step) is raised first and the workflow processing has not yet reached the Wait step, the workflow waits for the event to be raised(although the event is already there)
    Do you know of some way we can keep reprocessing until the Event receiver is found? (may be in a Raise event workflow step or in a Function Module)
    Edited by: sk123456 on Jun 5, 2010 11:47 AM

  • 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>

  • Waiting step wait longer though event has created

    HI Experts,
    I have a WF which has a waiting step in one of two parallel branches of a Fork. I use below FM to create an event which is successfully created but my workflow sometimes takes longer to continue. It shows the status READY longer. BUT sometimes it works fine but sometimes more than 20, 30 minutes. I want to know why??? has any one an idea why??
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                                    = c_object
          objkey                                      = lv_key
          event                                       = c_event
          START_RECFB_SYNCHRON  = 'X'
          NO_COMMIT_FOR_QUEUE      = 'X'
        IMPORTING
          event_id                                   = lv_envt_id
          receiver_count                        = lv_rcvr_cnt
        EXCEPTIONS
          objtype_not_found                   = 1
          OTHERS                                   = 2.

    Hi,
    Definately check SWEL. It will probably give you more information what happened to the event or what it is waiting for.
    There is not really that much difference between the functions. Both will create the event. But in general you should always chekc SAP_WAPI* functions before using some SWW* function when you are doing workflow development. They are newer versions and the support API for workflow development.
    Regards,
    Karri
    EDIT: And perhaps with the SAP_WAPI_CREATE_EVENT the events would work better - which I actually doubt in your case, because I think that there is something wrong in the system of some general configurations (events go into queue or whatever).
    Edited by: Karri Kemppi on Aug 24, 2011 1:14 PM

  • Query on Using fork with wait for event

    Hi All,
    I have a scenario in which a fork has two branches and one branch has the multiple steps along the line and also calls a subworkflow in one of the steps.
    The second branch has a single wait for event to complete the workflow in case of a cancel event.
    My understanding is that when the branch one executes and is on a single step decision or have gone inside a subworkflow and wating for user decision on the workitem created
    Whenever the wait event is triggered on the main workflow the second branch gets executed completing the workflow and all the branch one steps and the subworkflow gets logically deleted removing all the workitem from the inbox.
    Do I have to do any specific process control in main workflow to make sure that the subworkflow is deleted .
    Please clarify on this.
    Thanks,
    Charan.

    It should be taken care by itself. No additional steps required.
    Regards, IA

  • 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

  • ABAP OO class-based workflow, wait step

    Hello,
    I'm hoping someone is able to help me.  I've implemented a class which triggers a custom workflow through a custom event of the class.  At one point during the workflow I want to use a wait step that waits for another custom event to occur.  I've created my second event which I want to trigger from an ABAP ALV Grid report for users, that will allow them to select the specific workflows to trigger this event for.  My problem is, I am having trouble figuring out how to find the correct object instance of my class from within the ABAP program and trigger the event specifically for that instance, so that the workflow can continue and eventually complete.  I have implemented the IF_WORKFLOW interface and up to this point the workflow is functioning correctly.
    Thanks,
    Leslie

    Hello,
    Sorry, not sure where my brain was. Actually I do know: at two clients with projects going live this month, so apologies for a rushed and inaccurate response. It's CL_SWF_EVT_EVENT.
    Jocelyn's blog I referred to includes a code sample using the same class on how to raise an event with an object key.
    Regarding your second question: No you don't need to do any binding. Just use an instance of your object and it will wait for an event with the same key. The WF part is very straightforward and works exactly like BOR, it's just raising event that can't be done with the WAPI.
    Cheers,
    Mike

Maybe you are looking for

  • Customer wise revenue report

    Hi Guru's Is there any standard report for "customer wise revenue report"  in sap please given the t-code for dat. Thanks in advance

  • SAP SD job opportunity

    Hi friends, I am a sales professional with more than 13 yrs experience. I've 10 yrs experience in insurance sector. Now I thought of doing SAP SD programme. what are the job opportunities? Kindly help me

  • 3 relatively identical queries.  Can we reuse the intial result set.

    I have a report... It has 3 queries.. These queries are basically the same except the group by differ in columns. Each query basically rolls up data into higher level aggragates. The underlying returned record set is the same, just a different group

  • SAP Jam Integration With SAP Cloud For Customer

    Hi Experts, Can anyone have idea about how we can integrate the SAP JAM with SAP Cloud For Customer . Any document or any guide please share with me. Appreciate your help. Many Thanks, Mithun

  • Kamerapresets von ACR 5.3 in Bridge CS4 verwenden?

    Hallo Zusammen! In Adobe Camera RAW 5.3 habe ich mir Kamerapresets zu meiner Nikon D700 erstellt. Diese habe ich so eingestellt das die Anzeige der Bilder vergleichbar zu der Nikonsoftware sind. Jetzt zu meiner Frage: Wie bekomme ich Adobe Bridge CS4