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

Similar Messages

  • 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

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

  • Wait for Event in Fork - How to terminate the wortkflow in leg 2

    Hi Experts,
    My scenario is that there is a fork with 2 branches. 1 has a change Doc method. In this I have raised an enent when a action is performed which in turn calls a wait for event in other leg. The problem is that the other loop is executing but the workflow is not coming out of leg 1. The work item remains in the agents workplace.
    How to correct this?
    Thanks,
    Dinesh

    in the FORK step you have an option of mentioning the "necessary steps".
    it defines the minimum number of legs of the FORK step that must be completed before proceeding to the next step in the WF.
    mention the necessary step as 1 for your case.

  • 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

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

  • 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

  • Wait for event - contradiction between SAP help and SDN?

    Hello,
    I try to employ an advice from SDN for "How can I 'advance in dialog' with asynchronous tasks?", which says "use a synchronous task instead e.g. by using a wait for event in a separate branch". But when I define step Wait for event, I can read on the control tab "You should not use this step type in a fork to wait for an event that is triggered in another branch of the same fork."
    In my understanding these two advices are in contradiction - am I right? Why we "should not use this step type in a fork to wait for an event that is triggered in another branch of the same fork"?
    Thanks for explanation.
    Miroslav

    Hi..
    Wait for Event you can use in the Fork, but each branch should triggered separately.
    E.g. If I Claim a Travel Expense a workflow will trigger from the Event  "RequestCreated", then after few hours i want to change the Travel expense and re-submit again, now "Changed" event and "RequestCreated" event will Occur. At this time the Old Workflow has to stop and new workflow has to trigger.
    So, here a fork has to be place, in one branch the normal approval steps and in another branch wait for "Changed" event has to be place.
    So now the previous workflow will closed and new workflow will trigger using the new values.
    Regards,
    Surjith

  • 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

  • Message being sent and wait for event - BPM help.

    Hi Experts,
    I am doing BPM interface, in that i am receiving two files. Between these two files, i have set the coorelation in the BPM and included in the BPM's receive step1 and receive step2. After execution, when i look into the sxmb_moni, message status shows processed successfully, but when i look the Process engine status, it shows Message Being Sent and when i look into the BPM monitoring it shows message wait for event in the coorelation object.
    I have gone through the following forum :
    Link:[https://forums.sdn.sap.com/click.jspa?searchID=27600139&messageID=7561954]
    but everything is green and messages are set to Message being sent status.
    Experts kindly advise me.
    Regards
    Mani.

    Hi Abhishek,
    Here i have given my BPM design,
    Start
    Fork - two branches
    Branch1 - Receive File1
    Branch2 - Receive File2
    Transformation
    Send
    End.
    In coorelatin editor, i have specified container,involved messages and properties clearly.
    I have gone through the SAP basis contents as per your previous reply.
    One thing is, i have used the same design for my other interface, it is going through, but specifically for this interface i am getting error. If you could send me your mail, i will send you the exact screen shots, so that you can advise me.
    Pls i need to complete this in a short period, kindly help me to come out.
    Regards
    Mani..
    Edited by: mani_sg on Jun 18, 2009 10:21 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

  • NiDCPower Wait For Event

    Hello,
    I am using the PXIe-4139 SMU to source a current sequence that starts when a trigger is received and takes about 40 seconds to complete.
    After the niDCPower Initiate VI I have inserted the niDCPower Wait For Event VI with a timeout set to 300 seconds to allow for enough time to receive the trigger and complete the sequence. This VI waits for the Sequence Engine Done Event.
    Now this works fine, however, when the user wishes to stop the programm for whatever reasons, they have to wait the full 300 seconds until the Wait For Event VI produces a timeout error and stops the programm. This is rather inconvenient. How can I change the programm so that the user can stop it even when the Wait For Event VI hasn't reached its timeout?
    I tried this:
    But this doesn't work. For some reason, I get a timeout error with code -200474 but the boolean operator returns FALSE.
    Any other ideas?

    If there an output on the wait for event VI that flags a timeout? If so, set the timeout short (like 100 msec) and wait for 3000 timeouts before continuing on.
    Oh, and use an event structure. Timeout event (timeout=0) checks the wait for event, value change event for button breaks out of loop.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • 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

Maybe you are looking for

  • Stop depreciation for an Asset

    Hi, I understand when we create a asset master, the number of life years and the depreciation key are copied from the asset class it belongs to. However, the finance side requires to pause depreciation for a asset, or they could want to stop deprecia

  • What kind of enhancements does a Svet custom bios offer?

    I am thinking of contracting your services Mr.Svet, but I am having a hard time finding a list of enhancements a custom bios from you is able to provide. Could you please point me in the right direction, let me know via PM or post here. Thank You

  • 0ORGUNIT Hierarchy load failure in BW, Source system : CRM

    Hi Experts, From last 3 days 0ORGUNIT hierarchy load was failing.Iam getting below messages. Node 25047465 already exists Node 25034957 already exists Node ID 00006105,Char.Value 25081567,exists several times under node id 00003508 Node ID 00005752,

  • CS3 crashes after windows XP update

    Hello Running or should say was running PS CS3 with the 10.0.1 update. Things have been great for long time. THen the other day my XP updated a bunch of security updates and  Netf framework updates. Afterwards I had to reinstall my Nvidia drivers als

  • Ichat 5.0.3 wont let me video chat or share screen

    I have read most of the posts and tried everyting from simple: -Checking that video, screen and mic is enabled -connection doctor , video and mic is on -no restrictions for other users (there are no other users) To more complex: chekced the router, P