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

Similar Messages

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

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

  • 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

  • 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

  • BSP Terminating event not triggering

    Hello Friends,
    We have a scenario, where a BSP application is triggered from a Workflow, for a certain approval, and after the user clicks on Approve button on the BSP Page, the BSP would write to the workflow container using SAP_WAPI_WRITE_CONTAINER and then we call SWF_WSC_CALLBACK_LAUNCH.
    This used to work, but after an almost Fatal incident with our system, we are not able to get this to work.
    We can see in the workflow log that the container is written, but the terminating event is not triggered, and the workflow doesn't move forward
    Is there a setting that we're missing..??
    Thanks,
    Tat.

    Have you tried:
    call function 'SAP_WAPI_DECISION_COMPLETE'

  • 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

  • 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

  • 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 Terminating all work items

    System : Solution Manager
    Business object : BUS2000116
    1. I have multiline container element for Agent.Agents are Dynamic not static.Approval from all agents is required.
    2. Work flow desing
    a.Defination of Agent : ABAP Dictionary type SWP_AGENT with Multiline
    b. FORK with two steps , One step Required
    c. One part of FORK has WAIT FOR EVENT "REJECTED" Event and other has Activity with Agent "_underline []Agent()Index of: Agent _underline"
    d. Under the Miscellaneous tab Multiline line element Agent.
    e. Terminating event for this activitiy is APPROVED Event, which I have defined in business object.
    Let say in Program [Custom tab for standard transaction CRMD_ORDER] I have three agents I am getting Three work item in the workflow log with different Agent.
    PROBLEM:
    When any user open the workitem from SAP Inbox and APPROVE it[ Custom button on standard screen CRMD_ORDER], Program raises Event APPROVED by using Function Module "SWE_EVENT_CREATE". But it set other two work items also in Completed status.
    concatenate 'US' sy-uname into v_creator.
            call function 'SWE_EVENT_CREATE'
              exporting
                objtype                       = c_objtype    "BUS2000116
                objkey                        = objectkey    "Key field Which is GUID from CRMD_ORDERADM_H  table
                event                         = gs_event      "APPROVE"
               creator                       = v_creator
                take_workitem_requester       = 'X'
              START_WITH_DELAY              = ' '
              START_RECFB_SYNCHRON          = ' '
              NO_COMMIT_FOR_QUEUE           = ' '
              DEBUG_FLAG                    = ' '
              NO_LOGGING                    = ' '
              IDENT                         =
             importing
               event_id                      = v_eventid
               receiver_count                = v_count
            TABLES
              EVENT_CONTAINER               =
             exceptions
               objtype_not_found             = 1
               others                        = 2
            if sy-subrc <> 0.
              message id sy-msgid type sy-msgty number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            endif.
    Please let me know what could be the reason?
    Thanks in Advance.

    I think instead of using a event you can use a container element. You want to make sure that the users performs the approving action properly. If the user does that inside your code you set this container element as X. You pu the approval step inside a loop that checks whether the container element is X. Also another important thing you need to put the parallel approval step along with the loop inside a subworkflow.
    Thanks
    Arghadip

  • Terminating Event with Decision Step

    Hi,
    In our purchase requisition approval workflow, I need to have a decision step in which to prompt approver to either approve the req. or reject the requisition.  In this decision step, I need for it to have terminating events for "SIGNIFICANTLYCHANGED", "RELEASE", "REJECT" and "RESET".
    First, I copy the generic decision task 8267 to my my own custom decision task.  Then I added a BUS2009 in the container, releasecode and other needed elements.  In this custom decision task, I was able to add these terminating events that has been defined in the BUS2009.  I was able to setup binding, except the one binding
    Terminating Event  ->   Task
    &_EVT_OBJECT&      ->   &_WI_OBJECT_ID&
    Since the &_EVT_OBJECT& for the terminating event is BUS2009.  And the custom decision task &_WI_OBJECT_ID& is DECISION business object. They're incompatable business object.  So I replaced that binding with
    Terminating Event     ->  Task
    &_EVT_OBJECT&    ->   &PURCHASE_REQ&
    After all the configuration has been setup.  I created a new purchase requisition.  Upon the RELEASESTEPCREATED event, it create a custom decision workitem in my agent's inbox.  When I triggered the "RELEASE" event, it is however not terminating my custom decision workitem.  The workitem still sits in the agent's inbox waiting to be execute.
    Is it possible to setup terminating events for decision step?  Any kind of suggestions or inputs would be greatly appreciated.
    Thank you.
    Jennifer Tran
    System Analyst

    I will suggest you to create a fork with 2 parallel branch and 1 necessary branch. Put the approval step in 1 branch and the wait for Release step event in another branch in this way you can suffice your requirment.
    Thanks
    Arghadip

  • Terminating Event Generate an Error

    Hi All.
    My custom workflow has asynchronous task where the terminating events trigger from ABAP program and passed some data.
    This task will completed upon custom event "ACCEPTED" raised in the system based on certain keyfield and continue next steps.
    Terminating events tab contains element WIOBJECT_ID and my custom event "ACCEPTED".
    Binding is use standard element Binding details as per standards, &_EVT_CREATOR& --> &INITIATOR and &_EVT_OBJECT& --> &_WI_OBJECT_ID&
    I though this is the only step that I need to do and of course wait step.
    However when I test this terminating event via SWUE with proper object key, event trace transaction reported event "ACCEPTED" for task TS95000052 not defined as start/end event.
    I check in instance linkage transaction, linkage is activated for my object type, "ACCEPTED" and receiver type "WORK ITEM".
    Event type linkages between event and my asynchronous task also active.
    Will someone give me a clue, what should I do to resolve this issue?
    Many Thanks

    You cannot exit from a for loop until it is done. Use a while loop instead. Also, using the event structure in this case causes all kinds of exit problems. Try it and you will see what I mean. Instead, use the abort button itself. Put a case statement at the end to give the error output if the abort button was pressed. See attached vi.
    - tbob
    Inventor of the WORM Global
    Attachments:
    abortTesting.vi ‏45 KB

Maybe you are looking for