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

Similar Messages

  • 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

  • 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 not being picked up by workflow

    Hi,
    We have a purchase order workflow that has a parallel branch with a wait for event of 'Released' on it. The theory is that if a PO is released the workflow will finish. We have a situation where POs are created then released straight away by an idoc. In the event log we can see the release step created event and it correctly starts the workflow however the released event follows at exactly the same time and the workflow does not seem to notice this so it sends a released PO to a user to be released. I hope this makes sense. Can anyone think of a reason why this might be happening? Does it need a slight delay between the two events?  In SWEINST the linkage is active and when I look at the entry for one of these POs it tales me to the correct workflow.
    Thanks
    Rob

    Hi,
    You could possibly create a check function module for the event. In the check function module you check some specific variable (if there is something you can use) - for example if the event was created by a certain user or if the PO is a certain type(?). Then if your condition is fulfilled, you raise an exception and no event will be triggered => no workflow.
    This is just one possible solution.
    Regards,
    Karri

  • Wait for event by using workflow

    Hi Experts,
    Can someone explain with example the purpose or functionality of 'Wait for event by using workflow' of Wait step-type.
    Regards
    Balu

    I suggest first you go throughly through the SAP help
    [Wait|http://help.sap.com/saphelp_nw70/helpdata/en/8d/25f07b454311d189430000e829fbbd/content.htm]
    [Event Creator|http://help.sap.com/saphelp_nw70/helpdata/en/c5/e4b9e6453d11d189430000e829fbbd/content.htm]
    and then reffer to the wiki that is given in the above post

  • 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

  • Workflow -  Wait for event

    I have a requirement like this:
    In the workflow, judge an object is released or not. If not release. the workflow will stop.
    Now we need to write a program to check the status of the object every 15 mins, if the object is released, then an event will be raised to allow the pending workflow to continue.
    How do I achieve this?

    No Problem Yu,
    See below. Rough steps but I think you can fill in the meat on bones.
    Creating event.
      Step 1. Execute SWO1  it is O not zero.
      Step 2. Create business object. If you do not have one already. I assume you do not have one. Make sure you define key fields which uniquely identifies your object.
      Step 3. Create one event under events node. Make sure key fields are part of event parameters. Save and activate object.
      Step 4. Now triggering the event. In your besopke program which will run as background job. Once you decide object is released. The call function module SWE_EVENT_CREATE to trigger workflow. example given below. Check where used list of this FM you will find many examples. Use any example where EVENT_CONTAINER parameter under tables is being used you'll need this to pass data to event parameters.
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        OBJTYPE                       =  T_OBJTYPE
        OBJKEY                        =  T_OBJKEY
        EVENT                         =  T_EVENT
            CREATOR                       = ' '
            TAKE_WORKITEM_REQUESTER       = ' '
            START_WITH_DELAY              = ' '
            START_RECFB_SYNCHRON          = ' '
            NO_COMMIT_FOR_QUEUE           = ' '
            DEBUG_FLAG                    = ' '
            NO_LOGGING                    = ' '
            IDENT                         =
    IMPORTING
       EVENT_ID                      = T_EVENT_ID
    TABLES
       EVENT_CONTAINER               = T_EVENT_CONTAINER
    EXCEPTIONS
       OBJTYPE_NOT_FOUND             = 1
       OTHERS                        = 2
    Creating wait step.
        When you insert a new step in workflow it will ask you the kind of step you want to insert. Choose wait for event and after that it is not very tough all you have to give is give business object and event name. Do binding, this is important as this will make sure your workflow is reacting to correct instance of object.
    Warm Regads,
    Anuj Nagpal.
    Edited by: Anuj Nagpal on Sep 17, 2009 5:32 PM
    Edited by: Anuj Nagpal on Sep 17, 2009 5:33 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

  • Bpm:message being sent and wait for event

    Hi,gurus:
    My scenario is about BPM.In the integration process I used a loop and correlation.The scenario worked successfully yesterday,but after I changed some thing,it did not work.The outbound status of the message in sxi_monitor said "message being sent".And when I clicked PE to see the workflow log, it said " wait for event".
    Thanks in advance.

    Could you tell me how to reimport the integration progress in ID?
    reimport means...delete the already imported BPM from ID.....this would affect the corresponding ID objects....save and activate....and then again run the import Integration Process wizard....create the objects once again.....seems time consuming.....hence mentioned it as the last option in the list:(
    Also from SWWL delete only the instance with status as ERROR.
    Edited by: abhishek salvi on May 20, 2009 9:30 AM

  • 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

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

  • 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

  • Wait for Event FIPP - Completed Logically Deleted

    Hi WF Experts,
    We have a WF for Release of payments.
    It has 1 Fork with 2 parallel branches (both necessary).
    1 Branch has the approval process for Amount release and the other branch calling the Account assignment approval Subworkflow.
    The approval process branch has the until loop with increment counter and it picks the agents within the loop until a loop condition is reached and thereby till no more approvals required.
    The other branch, before calling the subworkflow, it checks a WAIT FOR EVENT FIPP->COMPLETED with container element FIPPID.
    Both these branches needs to be completed so that the forks gets ended and the wf comes out of the fork.
    The approval process branch is working perfectly. But in the other branch the WAIT FOR EVENT FIPP->COMPLETED  gets logically deleted and thereby, this branch does not go firther to start the Account assignment approval Subworkflow. This way the Fork with the 2 necessary branches does not end, and thereby, the WF stops here and could not go further to set release indicators (Which is a backgorund task).This will confirm the end of WF process.
    When I pass the WI ID for this Wait event in the SWIA, it shows the status as CANCELLED.
    The WF User log as a whole shows the status as COMPLETED as all the approvers has approved the release.
    Why is the Wait for Event gets logically deleted ?Please advice.
    Edited by: Sameer Anwar on Jun 12, 2011 9:17 AM
    Edited by: Sameer Anwar on Jun 12, 2011 9:21 AM

    Dear Experts,
    Any update on this . I am unable to sort this out why the Workflow is getting stopped.
    -Anwar

  • 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

Maybe you are looking for

  • Pass single entry for GRIR clearing

    Dear Expert, I want single entry for GRIR clearing by F.13 in spite of multiple Clearing entries, can anyone tell me how to configure this? Regards, Saurabh Chaplot

  • Global Variable in Runtime Prompt

    Hi All, I have a Global Varialbe with limits @Level_0_Descendants("YearTotal"), but When I launch this Business Rule in the prompts I am able to see all the Period dimension members. I have used the same varialbe in other Busine Rule, it is giving pe

  • Java Error for slideshow

    Hello; I wrote a small slide show app using dhtml and ajax. (java) I have everything working accept the pop up window, I get a java error when I try and click on the link for the larger image. Can anyone help me figure out how to fix this error? This

  • Tune up, clean

    How can I do a tune up, clean temp files, recover space, etc in macosx 10.3? thanks

  • Ipad mini international warranty??

    Do ipad mini has international warranty??will it work if i buy from usa and take it to india