Regarding terminating events in workflows

Hi,
I know that terminating events are used with asynchronous methods. Can anyone tell me, why do we need to do so????
Thanks and Regards,
Ravi Varma

Hi
Check the links below
Workflow automates the steps and activities in a business process according to predefined procedures and rules.
Workflow presents information and documents to the appropriate knowledge worker or agent (another entity such as a program) to make a decision or perform an activity.
Workflow tracks each and every step in the process flow and maintains an ongoing status.
Workflow also collects and reports all of the metrics associated with the execution and completion of the process.
Check the below links u will get lot of info..
http://www.sap-press.com/product.cfm?account=&product=H950
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Go through the following links on FORK :
http://help.sap.com/saphelp_nw04/helpdata/en/24/e2283f2bbad036e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/8d/25f1e7454311d189430000e829fbbd/frameset.htm
http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htm
http://www.insightcp.com/res_23.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
For more reference on workflow: http://****************/Tutorials/Workflow/Workflow.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/04/9277a346f311d189470000e829fbbd/frameset.htm
Check these links.
http://www.sapgenie.com/workflow/index.htm
/people/ginger.gatling/blog/2005/12/01/link-workflow-business-objects-to-your-collaboration-tasks
http://help.sap.com/saphelp_nw04/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw33/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/content.htm
http://help.sap.com/saphelp_bw31/helpdata/en/8d/25f94b454311d189430000e829fbbd/content.htm
http://www.sap-press.com/product.cfm?account=&product=H950
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
Workflow
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/a5/172437130e0d09e10000009b38f839/frameset.htm
For examples on WorkFlow...check the below link..
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
Workflow tutorials with step-by-step and with screenshots are available at http://www.****************/Tutorials/Workflow/Workflow.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/c14a9b55103116e10000000a1553f7/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4a930453d11d189430000e829fbbd/frameset.htm
http://www.sapgenie.com/workflow/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSTART/BCBMTWFMSTART.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMDEMO/BCBMTWFMDEMO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPM/BCBMTWFMPM.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
Debug a workflow.
This has a step by step procedure :
http://fuller.mit.edu/workflow/debugging.pdf
www.erpgenie.com/sap/workflow/debugging.htm
http://www.erpgenie.com/workflow/debugging.htm?2b5de440
Workflow tutorials with step-by-step and with screenshots are available at
http://www.****************/Tutorials/Workflow/Workflow.htm
http://www.sapgenie.com/workflow/
http://www.sap-img.com/workflow/sap-workflow.htm
http://help.sap.com/saphelp_47x200/helpdata/en/3d/6a9b3c874da309e10000000a114027/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSWFL/PSWFL.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/4a/dac507002f11d295340000e82dec10/frameset.htm
http://www.workflowing.com/id18.htm
http://www.e-workflow.org/
http://web.mit.edu/sapr3/dev/newdevstand.html
http://www.sap-basis-abap.com/wf/sap-business-workflow.htm
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2857887
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2855919
https://forums.sdn.sap.com/click.jspa?searchID=791580&messageID=2735228
http://www.sapbrain.com/TUTORIALS/TECHNICAL/WORKFLOW_tutorial.html
Reward points for useful Answers
Regards
Anji

Similar Messages

  • Trigerring and Terminating Events in Task

    Hi Friends,
    Acutallly i need to know whats the use of triggering and terminating events in Tasks and in what kind of scenerios they are required..
    THanks

    Hi Munish,
    Please check this thread
    Triggering Events and Terminating Event
    Please check this thread exclusively for Terminating events. Lots of information in this thread..
    Regarding terminating events in workflows
    Hope this would help you.
    Good luck
    Narin

  • Terminating event and abap oo class

    Hi, gurus,
    I 'd like to know how the terminating event works.
    for example,  i define a custom abap oo class (which has been implemented the interface of IF_WORKFLOW), and i want to use it as the terminating event of a standard task.
    could you please tell me how does it works?
    1. there must be an instance defined in the container of the task?
       which must be instanciated in the run time?
    2. then in another abap report, i simply raise the event defined as the terminating event, using the same key, then the pending task will be terminated?
    could you pls provide more information on this ?
    thanks and best regards.
    Jun

    Hi Jun Zhang,
    An event that is used to stop a workflow or task, or change the behavior of an already started workflow is called Terminating Event.
    If the event linkage is active and the linkage rules are satisfied, the status of the work item is set to COMPLETED.
    Defining Event Linkage  Terminating event linkage consists of 2 parts.
    Type linkage which specifies business object type, event name, generic name for event receiver (WORKITEM for terminating events of tasks or EVENTITEM for wait for event steps)
    Instance linkage which identifies the particular receivers (I.e. work item Ids) per object instance.
    Terminating event linkages can be seen in SWE3.
    For terminating events, along with Business object and Event a Container Element should be specified that holds the Object Instance.
    Terminating Event for Workflow is available from Release 6.10 only. This is defined in Basic Data of Workflow Builder.
    Binding Definition is optional for Terminating Events. Binding can be defined b/n event container and workflow container to pass event information to the workflow if required. That is the only way of passing information from an asynchronous method to the task that started it.
    Thanks and Regards,
    Prabhakar Dharmala

  • Terminating Event in PO Release Workflow. Workitem is not terminating

    Hi WF Experts,
                            I have done Purchase Order Release Workflow with 10 level release With 2 days dead line. Since standard release supports only 8 level release i have opted for Role Resolution Via User Exit 9 . and i am picking release codes from ztable.
    I was working fine till now.But suddenly end users are facing problem that workitem is not terminating even after they have released the PO.
    What could be the issue what is the terminating event for PO Release workitem.
    Please suggest me how to resolve this issue.
    Regards,
    Hari

    Hi Hari,
    Please check if the following links helps:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sap%252bworkflow%252bevents
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4b590453d11d189430000e829fbbd/frameset.htm
    Hope this helps!
    Regards,
    Saumya

  • Purchase Order Workflow - dialog step not receiving terminating event

    Hi,
    We have a scenario wherein based on the release groups and release strategies, different peope need to release the PO's.
    I have been able to develop the workflow for this successfully, but here is where I am facing an issue.
    After the PO has been created, based on the release group and strategy, it gets routed to the appropriate 1st approver. On their approval, the PO gets routed to the 2nd approver. Once the 2nd approver approves, the dialog step doesnt get completed and is still waiting for the terminating event. Event trace shows that the event is getting published, but there is no workitem to receive the terminating event. I am not sure why this is occuring for only 2nd approver onwards whereas for the 1st approver, the terminating event is received by the workitem.
    I am using start conditions for my workflow to ensure only 1 instance of the workflow is triggered for a rel groups and rel strategy and release code, else I am multiple instances each time an approver approves the PO. I am not sure if the start conditions are causing this issue with the terminating events not being received with the workitems.
    Any assistance is welcome.
    Thank you,
    Satish

    From the information provoided it seems you are using PO that is subjected to Release of PO for multiple Release Code and each Release Code Release is being done by one approver. If that is the case then I think the Terminating event should get caught. Please check whether the Terminating event that is getting triggered is specific to the Release Code or not.
    Thanks
    Arghadip

  • Workflow- Adding Terminating event into a Decision Step

    Hi
    I have a requirement like, in the decision step for example 'Approve' or 'Reject' has to be executed from the web application by triggering a terminating event for this decision step. I have copied the decision BO DECISION to ZDECISION and created two terminating events and make it ashynchrounous. But this step is not getting executed in the workflow showing error as 'no terminating event is attached to the task'.
    Any input on this is welcome. If you could reply bit early as I need the information ASAP.
    Thanks in advance.
    Padman

    Hi Padman,
    Weclome to the SDN forums. We don't have a specific Workflow forum yet. Please post your questions in the General SDN Forum until we do.
    I moved your questions there.
    Thanks, Mark.

  • Workflow runtime error because of terminating event

    Hi all,
    In one of the workflow template, in one step, the Standard Task is having Terminating Event.
    At the runtime, at the particular step, when it was in process, the terminating event is triggered. The step got completed,
    But the workflow is not proceeding.
    When I viewed the workflow log, In the perticular step after receiving the terminating event, the follwoing error is shown
    " Workitem XXXXXX is locked by the user YYY(Enqueue error)".
    The workitem number mentioned in the error is parent workitem number, not one of the particular step.
    I know that there is a setting in SWU3 to schedule a job for errored out workitems. That job is already scheduled and it has tried two times and it stopped.
    Now do I have to restart the workflow again or the issue can be resolved in the workitem in progress.
    Thanks,
    Sarayoodharan.K

    the terminating event is triggered. The step got completed,
    But the workflow is not proceeding.
    When I viewed the workflow log, In the perticular step after receiving the terminating event, the follwoing error is shown
    " Workitem XXXXXX is locked by the user YYY(Enqueue error)".
    Can you please let us know how you are trying to trigger the terminating event,I mean are you trying to trigger the terminating Programatically, then you might be using a FM to rasie the terminating event, by looking at the error it is clear that the event is triggered and the workitem got completed but the lock on the workitem is not released , you can release it by using the COMMIT WORK statement
    You have to write the commit work statement after raising the even or make sure that someor the other way the commit work is executed, this is beacuse once the commit work statement is executed all Locks are released..

  • Repeat workflow by termination event

    Hi
    I’m developing a workflow to assign a SAP position for a New Hire employee.
    The sceniro is “ If an employee is hired with default position, then WF have to be triggered to HR Administrator.So far the workflow is working fine.
    But there is a new requirement, if a HR Administrator cancel one of the task meaning confirmation message, then the same workflow have to be re-triggered from beginning. As we know we can write in termination event.
    But I don’t know where to write this logic in task definitation. I’m working in ECC 6.0
    Pls help me to sort out this issue
    Thanks
    Kamalbabu

    Hi Mike
    Thanks for your immediate response. Defining repeat workflow in workflow header is not working for this scenario.
    There is  a requirement, if a HR Admin cancel any task in workflow builder, then the workflow have to restart from beginning. Let say, I have include one task which will take the HR admin to PA40 to assign valid SAP Position for a new hire employee.. After he complete & before closing the WF, a confirmation message is displayed where HR admin have to select whether he want to <b>close or cancel</b> the WF. If he cancel the workflow then same workflow have to restart/re-trigger again
    Please help me to fulfill this requirement
    Thanks
    Kamal Babu

  • Copy of task TS50000075 and  EXTSRV - termination event not working

    Hi,
    We have done copy of TS50000075 and extended business object EXTSRV to ZEXTSRV
    this was done to call function module ISR_CALL_FOR_CHANGE to open up adobe form in edit mode
    it works well but the task is not terminated
    if termination event is put just like TS50000075 like WIOBJECT, ZEXTSRV COMPLETED then workitem never ends and always stays in inbox
    ZEXTSRV COMPLETED event is not triggered when the workitem is completed in the UWL
    even if we trigger this event programatically , it does not find receiver and the task stays in-process
    if termination event is put as _WORKITEM PROCESSED then it bahves like synchronous task ie even if the workitem is clicked and form is not completed, the workitem ends. so the user can click it only once
    also i've tried following
    1 - used the function module to complete the workitem in QISR BADI. but the workitem ID is not available inthe BADI. If I try to export it from business object method and import in BADI, it doesnt work
    2 - find active workflows and derive workitem id and complete workitem using FM SAP_WAPI_WORKITEM_COMPLETE
         this FM doesnt work , step becomes logically deleted which is not desirable
    3 - find active workflows and derive workitem id and complete workitem using other FM SAP_WAPI_SET_WORKITEM_COMPLETD
         work item is complete but there is workflow error - cannot determine succesor node
    4 - find active workflows and derive workitem id and change a particular container element
        check this container element in complete workitem condition in activity step of dialog step of workflow of this task-
         workitem stays inprocess
        check this container element in parellel wait step to complete the workitem-
         parellel step executes but fork is not complete, workflow doesnt proceed
    kindly help in this matter. the workitem does not get completed at all even if we force complete, workflow goes in error of - cannot determine succesor node.
    is there anything specific to the EXTSRV-PROCESS method which makes the TS50000075 task to trigger EXTSRV-COMPLETED and end the workitem ?
    help is much needed in this case
    thank you,
    b

    Hi,
    You need to see the event in SWEL, otherwise it will never work with workflow. Make sure that the event monitor is on (in transaction SWELS).
    I cant see the event in SWEL. The vent monitor is on because if I create event in SWUE, it shows up.
    How you actually create the event now?
    There is BADI QISR which is always called to handle user action of PDF form. I have written the function modue to create event in the user action
    >If i trigger it using funciton module -- then it doesnt find any receivere so it doesnt terminate the task. it is seen in SWEL with no receiver found. do i still need to do commit work ?
    You need the COMMIT WORK always if you trigger the event in any program&function or whatever.
    ok ill try doing commit work after the create event function module
    Test your event with transaction SWUE. Make a test case first in a way that the task is waiting in the inbox/UWL. Then create the event in SWUE. Now, if the task gets completed, you will know that that event itself is working and your terminating event configuration is done properly. If this works, your only problem is in the event creation itself. And for that you need to tell exactly how you create the event. If you do it with your own custom code, use SAP_WAPI_CREATE_EVENT and don't forget to have COMMIT WORK after the function call.
    I am doing exactly like you said. but it doesnt work ie even if I create the event in SWUE, the workitem doesnt get completed.
    This event is seen in SWEL with no receivere found
    I am able to infact set the workitem to complete using WAPI funciton module to complete teh task in the BADI.
    but the workflow goes in to error saying , next node cannot be determined
    Regards,
    Karri

  • Use abap class event as terminating event

    Hi,
       The class is say ZCL_WF_CLASS and the event  END_WF.
    What needs to be done to have this event used correctly as a terminating event of a workflow? Does this event require a parameter to hold the workitem id (or workflow id), as currently this event has no parameters?
    Previous developer has developed the class and event and installed as a terminating event but the workflow is going into error not terminating correctly. I believe the incorrect development of the event and/or its use in the workflow is the issue. Note that nowhere is this event currently raised in any code of the workflow.
    Cheers,
    Ross

    Hello,
    Unless I'm mistaken, a terminating event for a workflow is just like any wait-for event in a workflow.
    It can be based on any object or class and it can be used in various ways - to terminate a branch or terminate the workflow, for example.
    The workflow listens out for the event and checks if there is a matching key. You could base it on the key of a workflow object but it makes more sense to base it on an object or class that's used in the workflow - e.g. the POSTED event of an object would be used to terminate a workflow seeking approval for the posting of an object.
    It definitely won't work if the event has no parameters. I guess if you do base it on the workflow object then you would use the top-level workitem id. Try it with a test workflow and SWUE to generate the event.
    regards
    Rick Bakker
    hanabi technology

  • ECC6.0 WebDynpro(ABAP) - raising terminating event

    Hi, in ECC6.0 I have a custom WDA application with a custom workflow.  The workflow is launched via an event that is raised in the WDA application.  However, at one point workflow sends a link to one of the WDA pages, whereby the user clicks a button which raises what should be a terminating event for the workflow task.  However, while this event is raised, as confirmed in SWEL, it doesn't terminate the task.  The event is raised through a WDA assistance class.  The object type, event and object key are all being set properly during the raising of the event.  Viewing the event in SWEL confirms the proper setting of the key fields.  So why isn't the step terminating?
    Thanks in advance,
    Kevin

    Hi,
    If the object that is waiting for event has no instance, the task will not be terminated when the event is created in the system (As I said). So now the reason is clear for you.
    >The event is raised through a WDA assistance class
    I am not sure what you mean by this. You raise the event from the WDA assistance class? Or you raise an event for the assistance class? (Or perhaps both?).
    If you raise the event for the assistance class, you should have an instance of that class in the workflow container (which you would then bind from workflow container to the task container). So, now the question is: do you have an instance of the assistance class in the WF container (when you look it from log)? Or is it initial also?
    Actually I don't really even understand how you have managed to combine the WDA assistance class and WF class? How do you actually start the workflow (with which kind of event)? Whatever event it is, it should most likely instantiate some class/object in the workflow. Then in your problematic task you should most likely use this same class in the terminating event (unless there is something really fancy in your workflow).
    Regards,
    Karri

  • Terminating event -- No active receiver found

    Hi -- on an Integration project I just need a workitem that stays active until explicitly closed via an event..
    It's easy enough to create a triggering event which starts a process.
    I've followed all the rules (as far as I can see) to create a terminating event but it doesn't work.
    I've created a test Bus Obj ZZJIMBO which simply has a key of the SAP user ID.
    I've defined 3 events
    STARTSYN  ====> Synchronous
    STARTASY  =====> Asynchronous
    FINISHED ======>  terminating
    Using SAP_WAPI_CREATE_EVENT the STARTSYN and STARTASY  are triggered and the relevant processes start - both for the synchronous and asynchronous tasks.
    However on raising the FINISHED event the system just errors with NO Active receiver found.
    All the binding etc is fine and SWU0 doesn't find any problems.
    Looking at the instance table (transaction SWE3)
    I see that the eventid is the same as the current workitem but the object key is empty
    object key  <empty> 
    eventid    000000250100
    The only possibility I can see is that my Business object doesn't really have "instances" like say a sales order as it only exists at run time.
    Would I have to say trigger the event finished using something like the Work item itself which does have a valid individual instance -- I can extend the WORKITEM bus obj and add an event FINISHED to it instead.
    I can get the workitem id via the container so that shouldn't in theory be a problem to "instantiate"  the Workitem (or ZWORKITEM) business object.
    I really hoped to have all the events in the SAME business object however.
    Any ideas
    Cheers
    jimbo

    Hi James.
    1. Yes, I think the workitem in runtime would expect the triggering event should be from the instance of the object either from
            a. standard workitem relevant obejct instances like _WORKITEM, ATTACHOBJECTS, RULERESULT
           b. or the associated BO in the task i.e WIOBJECT_ID
    2. However as you say >>I really hoped to have all the events in the SAME business object however>>. I can suggest the following
           a. create a parallel fork to the step which is creating your workitem
           b. In this parallel branch create step 'Wait for Event; and refer it to your ZZJIMBO.FINISHED.
          c. define necessary branches required to complete the fork as 1. meaning, if any one of the branch ends flow will continue to next step in main workflow.
    So, when the event ZZJIMBO.FINISHED is raised with the correct instance which was used in workflow. 'Wait for event' will receive it and this branch will end and eventually other branch will get logically deleted. You can put some flag in the 'Wait for event' branch using which u can understand whether the workitem is completed in normal way or through exeption.
    Hope this helps !!
    Regards
    Krishna Mohan

  • Terminating Event for BUS2017 Custom Method

    Dear Experts,
    I have an issue with the Terminating Event of the Workflow for BO : BUS2017. The event is getting triggered but receiver is not being picked.
    I have created two events GR_103 and POST_105 in the Custom BO ZBUS2017 by delegating it to BUS2017. GR_103 is the triggering event for my workflow which I have triggered in the POST_DOCUMENT Method of the Implmentation for BADI : MB_MIGO_BADI.
    GR_103 is triggered while doing MIGO (Goods Receipt) for Movement Type 103. My Workflow is triggered perfectly and then I have used a Dialog Asynchronous Task in which I have called the MIGO Transaction for Releasing the GR Blokced Stock using the Movement Type 105. I have created a Custom Method POST in the BO ZBUS2017 and I have used the FM: MIGO_DIALOG to call the MIGO. I am trying to raise the POST_105 event in the Method MB_DOCUMENT_BEFORE_UPDATE of the Interface IF_EX_MB_DOCUMENT_BADI.  I have defined the Terminating Event for the asynchronous Task as POST_105.
    Now the event POST_105 is triggered, but SWEL says 'No receiver entered'. Even the SWEINST shows the object data as the current Work Item along with Object Key, but still receiver not picked. When I try to trigger the same event in a test report by using call transaction, then the event triggers and work item gets completed without any issues.
    Please advise.
    Below is my terminating event code.
      READ TABLE xmseg INTO wa_mseg INDEX 1.
      CONCATENATE wa_mseg-mblnr wa_mseg-mjahr INTO l_objkey.
      IF wa_mseg-bwart = '105' .
        CALL FUNCTION 'SWE_EVENT_CREATE'
          EXPORTING
            objtype           = 'BUS2017'
            objkey            = l_objkey
            event             = 'POST_105'
          EXCEPTIONS
            objtype_not_found = 1
            OTHERS            = 2.
      ENDIF.
    Regards,
    Raju.

    Have a COMMIT WORK after the function call. (At least test it - I am not sure if it will have some effects in your BADI - at least you will know whether the issue is about missing commit).
    And please use SAP_WAPI_CREATE_EVENT instead of the old function you are using.
    Also, make sure that the events will look exactly the same in event monitor SWEL when triggered from your code and when using test tool. Maybe there is some minor difference/mistake (object key, etc.) that you haven't noticed.
    Regards,
    Karri
    Edited by: Karri Kemppi on Feb 7, 2012 8:14 AM

  • Warning: "No terminating events defined for the task used"

    Dear all,
    I created a task with ABAP class and method as its object method. This task is a background task. The ABAP class inherits the IF_WORKFLOW interface but doesn't implement any method of the interface.
    When I try to confirm the task settings in transaction SWDD, a message shows up "No terminating events defined for the task used" and I cannot continue the work. Does anybody have any idea what I should do?
    Thanks + Best Regards
    Jerome

    Hi Jerome,
    If you set a background task in your workflow, and if it is asynchronous, then you need some way to tell the template if it is finished and what happened.  In this case you set terminating events - that is events which are published in the system as a result of your method (ie document.posted etc).
    Either use a synchronous method for your task or set appropriate terminating events in your task setup.
    Regards
    Gareth

  • Terminating Events PR Release

    Hi,
    I have used two terminating events 'Released' & 'Rejected' for Overall release of purchase requisition.
    I have 5 levels of approvals, after each appoval buyer will be notified that Requisiion is released. So finally buyer have 5 messages in his inbox stating release effected by 5 levels.
    These 5 messages are waiting in buyer's inbox, unless until buyer executes this workitems eventhough the pr release process is completed.
    Is there any way to clear these 5 messages after i have compelted my PR release process.
    Type linkage is active only for event 'Releasestepcreated'.
    Any inputs on this.
    Thanks,
    Indira.

    First thing is that, whenever a person initiates a PR, he can see in his outbox about the current status of the PR he created. Sending 5 times executable workitem is an unnecessary workload on the system.
    Jus refine, what steps to appear in the workflow log ... so that the process flow in outbox becomes readable and understandable to the end user.
    I have done the same thing with my client.
    Another way to delete the workitems in inbox other than the standard transactions is to complete them or terminate them. A round about way for your scenario is as follows.
    1. Create a custom event that triggers only when completely released.
    2. Put this as terminating event in the workitems.
    3. In the workflow, when the PR is completely released, raise this event thru event creation step type.
    4. Your problem is solved.
    regards,
    Sandeep Josyula
    *Mark helpful answers

Maybe you are looking for