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

Similar Messages

  • Wait step taking longer time than the defined wait time

    Hi,
    We have very simple BPM with 3 steps: Receive, Wait and Send.
    Wait step has following parameters:
    Type: Wait Specified Time Period
    Duration: 1
    Unit: Minutes
    From the above parameters idelly it should wait only for 60 sec and start the next step which is send step. But Wait step is taking following times: 1m 09s,1m 40s, 3m 40s, 1m 41s, 2m 10s, 2m 16s, 2m 46s, 1m 09s, 1m 40s, 3m 39s
    Does anyone know what could be the reason for above longer wait time??
    Thx
    N@v!n

    Hi Naveen,
    How did you measure these times? Tha additional time might be because of the message processing time included or size of the message is bigger to process.. or may be because of the network traffic..!!
    Check the each time stamp from message monitoring tool in RWB and verify for accuracy.
    VJ

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

  • Wait step in quality is waiting for long time

    hi friends
      I have transported the workflow to quality. Am using a wait step in my workflow. Its waiting in that step for long time nearly 1 hour still its not cross the step. The workflow works fine in my developement. But in quality its not moving to the next step. i comparted the wait step in quality and developement. In developement wait step in outcomes tab green light is glowing in Actvie mode. but in quality green light is visible but in blured vision. even i have checked the configuration in swu3 in development and quality. Both have same configuration. What could be the problem that its not crossing the wait step. Plz help me
    Regards
    vijay

    hi Pavan
      I havn't used any deadline. Its working fine in development. y in quality its not working. That is my question. Even i have checked in the development wait step from the log i have these 3 steps for histroy
    Wait step created                                No errors
    Condition for wait step fulfilled               No errors
    Result Processing                               No errors
    But in quality
    Wait step created                                No errors
    Only these step is alone there. its has not yet come to other step. But my condition is fullfilling has i checked from the container elements. Am waiting for more than 3 hours. Still its not come to next step. y what could be the reason.
    Regards
    vijay

  • Process Chains Always Hangs at the second step waiting for an event

    Gents;
    all BI process chains created in Production system are always hanging in the second step waiting for an event RSPROCESS with a certain parameter. This issue is happening for all process chains in Production system and it is not happening for the same in other systems in the landscape (development, Copy of porudction, quality and so on). I tried to trigger the event manually using SM62 but the job is always stick to status " released". the same thing was replicated in other systems and the job status has changed and the process was completed.
    Any idea what might cause this issue??
    Thanks.

    Hi,
    You said that this thing is happening only in production system.Try doing the following checks :
    1.Check SM21to see if there are any red entries.It can be possible that there is some data base RFC connection failure.While checking SM21, make sure you give proper selection condition.If there are any red entries, you may take the help of basis guys to understand the type of failure.May be file system has got some problems.
    2.Check St22 and try to analyse if any short dumps.
    3.Try to check Connection with the source system ( Goto RSA1->source system tab->right click on the source system and select check option to find if any errors in the connection.
    4.If possible, try to load manually in some other info provider.
    Thanks,
    Tarun Brijwani.

  • 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

  • Create BPM only for WAIT step..

    HI All,
    I am working on a IDOC-XI-File interface. Its working perfectly fine.
    Due to excellent processing times in SAP, our system ends up sending many files almost at same time( diff in milliseconds I guess) to the legacy system. However Legacy system doesnt like it and wants us to send a file every 1 second apart.
    I tried using the '
    WAIT UP TO 1 SECONDS'
    statement in R/3 ssytem but somehow system does not wait for 1 second( I guess that why they call it UP TO and not WAIT TILL ) ).
    Instead of relying on R/3 I thought of creating a BPM witha WAIT step. However have never done BPM before, so wanted your opinion before venturing into it for the following:
    1. Can I create a BPM just to introduce 1 sec delay.
    2. Since my interface is working currently, If I need to use BPM, will I have to redo the mapping etc.
    3. How much time effort do you guys think will be needed to convert an existing(working interface) to BPM interface with WAIT step. (Its an Z-IDOC with 3 segments and no-hierarchy)
    4. Any blogs, threads to do it would be highly appreciated.
    Many thanks
    Shirin

    u can use BPM to wait for other message.
    you have to create abstract message interface for BPM.
    but no need to change anything in mapping.
    use abstract message interface in interface mapping.
    use blog:
    Using a BPM to collect messages for a set interval of time
    Delivery Modes in BPM.

  • ERROR in the wait step

    Hi all,
    I have a requirement, where automatic payment proposal goes for an approval process. When the proposal has created in the tcode F110 based upon user who has loged in a push button "Trigger Workflow" will appear once proposal is made (enchansment), When the user press this button workflow will be triggered using the function module. After that i am finding the approver details. After this step type, i am checking for the condition (payment or proposal) if it is proposal flow will proceed futher. After this i have used a fork step - two branches 1. for the workflow proceed further 2. cancle the workflow when and event "ZSAVE_ON_CLICK" (custome defined event) is triggered.
    I am getting the error at this wait step. The error is ""Workflow 000000703573 wait step 0000000248: No valid object ID in container element 'ZbusF110'""
    Thing i have done.
    1. I check the binding, here i am passing two key values of the bo to my workflow container from the event container.
    2. When i tried to bind the EVTOBJECT to zbusf110 - it is giving me an warining "'_EVT_OBJECT' is not an export element and hence sometimes has no defined value"
    Kindly help me in solving this issue.
    Thanks and Regards
    Balaji K.

    It is working fine

  • Wait step until approved

    Hi,
    I have a requirement like this.
    There are 3 positions to approve the material.
    A and B position need to approve the material(A and B positions can open  workitem and again keep workitem back to inbox with out approval) and then only the workitem need to go to C position..
    For this how can i use wait step(what event i need to keep).To create event do i need write any code.
    Pls Advise.
    Thanks
    Ashok

    Ashu,
    You can use a Loop control with all the User Decision Workitems & Agent Reterival methods in the same loop and set a condition at final release for completing the workflow.
    I will try to explain the Purchase Requisition Approval with 3 level and you can replicate.
    We are maintaining a custom table to maintain the Approvers (User names) with Release codes & Plant as Key fields and if the PR is in blocked status, it has 'B' value & if it is released changes to 'S'. So, i am using to validate the release code equal to 'B' until loop true.In the loop by passing the release code at that stage retrieving the approvers and passing them the workitem.
    Hope this helps.
    Thanks,
    Sudhir.

  • WS12300111 - stuck at wait step

    Hi All,
    We have cloned WS12300111 and have configured our bespoke W/F against a specific absence type.
    This is triggering correctly, the approval task is working fine, but then the workflow seems to be stopping at the wait stage for the status change.
    We have ran RPTARQPOST which has created the infotype 2001 records as well as updating the status in the workflow container to POSTED (from APPROVED) .... but this hasn't triggered the restart of the workflow at the WAIT step (even though one of the conditions of this wait is REQ.STATUS = POSTED).
    Any ideas??
    Many Thanks

    .... Sorry everyone. All sorted. Should have checked that SWWCOND was actually running!!

  • 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

  • Wait step in fork

    hi all,
    i have one problem in workflow  i am using wait for event step  in fork but the event is not coming....
    i tried to create the event using function module but its not coming
    i think it is taking null object so i tried using create event step in workflow but it didnt work....
    i am creating the event through function module (activity)  but  it is not processing after that step..
    i tried to search in forum but i didnt find the solution...
    please help
    Piyush jain

    yeah i traced the event it is coming in event trace
    actually i have three events in zbo created ,approved ,rejected and accordingly i defined the activity
    for three events but the wait step is not processed yeah it is showing in event trace but the event is not coming in
    workflow step .....i am not using correlation step in that
    thanks for reply
    piyush

  • Does CAF have the possibility to implement wait steps?

    I'm wondering if CAF has functionality to allocate a wait time to an action, in the same way that it is possible to put a wait step in ABAP workflow tasks.
    I can see one tab on the Action definition in design time GP that has a fixed date and allows a callable object to be invoked, but the kind of logic I am looking for is to allow a separate block to be invoked if a certain time limit has been reached.
    Is this possible to do in CAF?
    - Tony.

    Hi Tony,
    I cannot completely understand your requirement- invoke a block when a certain amount of time has elapsed?
    Well you cannot branch to a particular block, but in terms of callable object to implement wait feature maybe an idea is to create a exclusive one through a background callable object where you are free to code. You could implement a wait in here through java code. You could take in the wait duration as an input through the callable object interface. I have not tried it, but it should work.
    -Sijesh

  • Wait event "virtual circuit wait" in wait class "Network" was consuming sig

    Hello,
    We are facing this problem when there are 2 queries try to run at the same time.
    The first query takes longer to finish so 2nd has to wait for 1st to be finished and then only 2nd starts. It seems the jam is at netowork instead of server.
    I want to make sure before I start testing on network.
    I get following :
    Wait event "virtual circuit wait" in wait class "Network" was consuming significant database time. 98.4
    Wait class "Network" was consuming significant database time.
    and recommendations is stated as :
    Investigate the cause for high "virtual circuit wait" waits with P1 ("circuit#") value "21" and P2 ("type") value "2".
    I am checking OEM.
    Thanks,
    Shashi.

    Hello Sybrand,
    Can you suggest some changes to be done to test ?
    Here is my shared server config :
    SQL> show parameter SHARED
    NAME TYPE VALUE
    hi_shared_memory_address integer 0
    max_shared_servers integer
    shared_memory_address integer 0
    shared_pool_reserved_size big integer 135895449
    shared_pool_size big integer 0
    shared_server_sessions integer
    shared_servers integer 1
    Thanks,
    Shashi.

Maybe you are looking for