Fork : triggering and terminating event ?

Hi Experts,
I am a begginer in  Workflow ..
I just want to know how Fork can be used for paralled processing with triggering and  terminating event.
It would be appreciated if provided with some scenarion in detailed steps.
Thanks in advance.
Ganesh..

Mike,
It would be HELPFUL for me if i get my problem solved as earlier so i can concentrate on other my commited topics..thats why expecting info., from the experts.
Anyway , you  triggered me to read SAP help..thanks for the indirect motivation..
Let me start reading the SAP help information!!!
Thanks .
Ganesh

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

  • Worktiem and Terminating Event with Condition

    System : SAP Solution Manager 4.0
    Business Object : BUS2000116
    Custom Screen
    No.     Text               Position          Status     
    1.     IT manger                           Position1          
    2.     IT Integration manger                     Position2
    3.     Development manager     
    4.     Business process Owner     Position4
    5.     SQA               
    6.     Change management                     Position6
    7.     Basis and Operation     
    8.     -
    9.     -
    While creating CR(Transaction code CRMD_ORDER) user has option to choose any number of approvals from the above mentiond custom screen. Lets say user chooses four approvals.
    Requirement
    Now in workflow I have to send Workitem for Approval in Parallel to all four positions(Position1,Position2,Position4,Position7). When any one from respective positions Approves the workitem , workitem should remove from the inbox of all other users belongs to that position.[Note from other users belong to other positions]
    So at the end workitem should have approval at all 4 levels from the each respective position.
    Can I achieve the above mentioned scenario?
    Background step : to find out number of approvals for CR. [in this example 4.]
    In WF design
         Step "Loop Until" number of approvals
              Find Agent for Approval Number 1
              Send Workitem to Position Belond to item number 1
         Loop End
    But How Can I use terminating Event "APPROVED" ?
    Please suggest.

    Amandeep  Singh wrote:>
    > System : SAP Solution Manager 4.0
    > Business Object : BUS2000116

    > Now in workflow I have to send Workitem for Approval in Parallel to all four positions(Position1,Position2,Position4,Position7). When any one from respective positions Approves the workitem , workitem should remove from the inbox of all other users belongs to that position. (Not from other users belong to other positions)
    > So at the end workitem should have approval at all 4 levels from the each respective position.
    >
    > Can I achieve the above mentioned scenario?
    Yes.
    > Please suggest.
    Try reading some starter material and learn about the concept of work items and agents. That should let you understand why the answer is yes, and how to achieve it. The tutorials on workflow scenarios (help.sap.com or online help in your system) are perhaps a suitable start?

  • Subtype event not triggering and supertype event triggers twice!!!!!!

    Hi,
    We have created a subtype for object bus2030 and also an event created for that. My workflow should trigger whenever an inquiry is created.
    I've maintained this as triggering event in SWDD and done type linkage is SWE2 and everything looks fine.
    When i simulate or create event the WF is triggered but when create inquiry in VA11 WF does not triggers.
    I've checked SWEL for event trace but no event is triggered at all... Am i missing something... I've done almost everything that i used to do...
    Even synchronized buffer!!! nothing paid me a solution...
    Infact the same was working with 3.1i system but after migration to ECC6 we had to create new WF template for the same Process.
    Now I also see that the supertype bus2030-created event is triggered twice but, obviously no receiver type exists. But the zbus2030 event is not being triggered at all!!!!
    Kindly help me understanding my mistake...
    Regards,
    PB

    Hope you have already set the deletegation in SWO6.
    Now, event dont get triggered automatically, jus because they are defined in object. They have to be explicitly published in thesystem.
    Check for a suitable user exit in your transaction, which makes use of function module to create the event, from that you know how to proceed.
    If you dont find user exit, try other triggering techniques such as change documents, logistics, BTEs... etc.
    regards,
    Sandeep Josyula

  • What is Triggering and Handling Events  in ABAP  OOPs

    Gowri

    ) TYPE type ..
    To declare static events, use the following statement:
    CLASS-EVENTS ... ...
    It links a list of handler methods with corresponding trigger methods.  There are four different types of event.
    It can be
    ·        An instance event declared in a class
    ·        An instance event declared in an interface
    ·        A static event declared in a class
    ·        A static event declared in an interface
    The syntax and effect of the SET HANDLER depends on which of the four cases listed above applies. 
    For an instance event, you must use the FOR addition to specify the instance for which you want to register the handler.  You can either specify a single instance as the trigger, using a reference variable
    After the RAISE EVENT statement, all registered handler methods are executed before the next statement is processed (synchronous event handling).  If a handler method itself triggers events, its handler methods are executed before the original handler method continues. To avoid the possibility of endless recursion, events may currently only be nested 64 deep.
    Handler methods are executed in the order in which they were registered.  Since event handlers are registered dynamically, you should not assume that they will be processed in a particular order. Instead, you should program as though all event handlers will be executed simultaneously.
    "Example  :
    REPORT demo_class_counter_event.
    CLASS counter DEFINITION.
      PUBLIC SECTION.
        METHODS increment_counter.
        EVENTS  critical_value EXPORTING value(excess) TYPE i.
      PRIVATE SECTION.
        DATA: count     TYPE i,
              threshold TYPE i VALUE 10.
    ENDCLASS.
    CLASS counter IMPLEMENTATION.
      METHOD increment_counter.
        DATA diff TYPE i.
        ADD 1 TO count.
        IF count > threshold.
          diff = count - threshold.
          RAISE EVENT critical_value EXPORTING excess = diff.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    CLASS handler DEFINITION.
      PUBLIC SECTION.
        METHODS handle_excess
                FOR EVENT critical_value OF counter
                IMPORTING excess.
    ENDCLASS.
    CLASS handler IMPLEMENTATION.
      METHOD handle_excess.
        WRITE: / 'Excess is', excess.
      ENDMETHOD.
    ENDCLASS.
    DATA: r1 TYPE REF TO counter,
          h1 TYPE REF TO handler.
    START-OF-SELECTION.
      CREATE OBJECT: r1, h1.
      SET HANDLER h1->handle_excess FOR ALL INSTANCES.
      DO 20 TIMES.
        CALL METHOD r1->increment_counter.
      ENDDO.
    The class COUNTER implements a counter. It triggers the event CRITICAL_VALUE when a threshold value is exceeded, and displays the difference. HANDLER can handle the exception in COUNTER. At runtime, the handler is registered for all reference variables that point to the object.
    Reward  points if it is usefull ...
    Girish

  • Terminating Event Not Triggering

    HI Guys,
                   I have added a custom task to call MRBR screen and set a Terminating Event for this task. It is a Asynch Method.
    Through SAP_WAPI_CREATE_EVENT i am calling the terminating event but my task is not getting terminated.
    I checked in SWEL i could see evnt log for my terminating event without Receiver type.
    Kindly help me to sort out this issue.
    Regards,
    Dheepak

    Hi
    Where have you written the code for triggering the termination event?
    Also in your task have you created an entry:
    WIOBJECT_ID   FIPP  TerminatingEvent Name.
    When everything is done properly in SWEL you would see the receiver as workitem.
    Thanks and Regards
    Aman

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

  • WebDynpro iViews and Portal Eventing

    Hi All,
    I am planning to prepare a proof of concept with following requirements.Can you please give me hints and resources to prepare this in 2 days?
    1)Interaction between iViews using EP eventing.
    2)Exploring how and what kind of data can be passed from one iView to the another (String , Java Objects etc)
    3)Keeping track of various events of EP especially finding out if we can track when the user session is invalidated by the Portal so that we can free objects from memory.
    4)The sample code should have 2 to 3 iViews interacting with each other and passing data.With detailed description of each steps from coding till deployment to the EP.
    Thanks & Regards,

    Hi Noaman,
    You can use EPCM for eventing between iviews in portal. Also we can use the same for communication between Webdynpro and EP applications.
    You can pass parameters using client data bag. The code for sender ....
    var an='Hello';
    EPCM.storeClientData("urn:namesapce","key",an);
    EPCM.raiseEvent("urn:namesapce","eventname");
    Code at the reciver....
    function fn_selection()
    var info=EPCM.loadClientData("urn:namesapce","key");
    document.myform.name.value=info;
    EPCM.subscribeEvent("urn:namesapce","eventname",fn_selection);
    This is the javascript code for triggering and subscribing  events in between iviews.
    Hope this Helps
    gEorgE

  • 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

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

  • Terminating Event Getting triggered more than once

    Hi All,
    I am facing a very peculiar problem in PR release workflow(item wise release, business object BUS2009).
    One of the requirements of the workflow is to send a mail to PR initiator once it is rejected by any of the approvers(4, in my case). The event associated with the cancellation of the workflow is REJECTION_START.
    The problem is that this event is being triggered more than once. One thing that i have observed is that if eg. second level of approver cancels it, the event is triggered twice. Likewise if third level of approver cancels it, it is being triggered thrice. Which leads to sending of 2 and 3 mails respectively to the PR initiators mailbox.
    Why is this happening? Ideally, only one event should have been triggered, and the triggering of the event should have been independent of PR approver's level. I am at my wits end regarding this.
    Any suggestions in this regard will be highly appreciated
    Regards
    Varsha Agarwal.

    If you check for 2nd level rejjection two release Code is associated so it triggers 2 times and same for 3rd level approval.
    I think you have to put some sort of filter using FM SAP_WAPI_WORKITEM_OBJECT
    in the attribute portion of yopur custom BO.
    The attribjute will check this FM and if it has entries that means already a Workflow has been triggered it should set the flag as X.
    Make use of this attribute in defining the start condition of this task thru
    SWB_COND.
    Thanks
    Arghadip

  • Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY- ERROR EVENT_RAISED - Error updating the process object

    Hi All
    I have set up a simple custom HCM process and Form regarding Infotype TO CREATE AND CHANGE POSITION. I have checked the process and form consistency and it seems fine. Now when I run the process from HRASR_DT it generates a process number but it also gives an error workflow could not start.I get following error (SWIA log - Step history)
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Exception occurred - Error when starting work item 000000007031
    PROCESS_NODE - Error when processing node '0000000014' (ParForEach index 000000)
    CREATE - Error when creating a component of type 'Step'
    CREATE_WIM_HANDLE - Error when creating a work item
    CREATE_VIA_WFM - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event CREATED and (target) status
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY->ERROR
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Executing flow work item - Work item 000000007031: Object FLOWITEM method EXECUTE cannot be executed
    Executing flow work item - Error when processing node '0000000014' (ParForEach index 000000)
    Points to be noted:
    1) I have searched few SAP notes such as 1384961(Notes for 6.0.4) but our system is in higher level patch 6.0.5
    2) WF-BATCH have SAP_NEW and SAP_ALL authorization.
    Appreciate your valuable suggestions.
    Thanks
    Ragav

    Hi Ragav
    did you try to debug this? maybe something is missing in config of P&F?
    Since you are on 605, the following note would be there in your system....use it to debug:
    1422496 - Debugging background workflow tasks in HCM P&F
    This will help you find the root cause.
    regards,
    modak

  • 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

  • Interactions, triggers and events that can work in PDS

    I have been trying to make interactions, triggers and events in Edge animate and then use them in Indesign
    - publish to DPS.
    I don't think I really managed to make any of them work.
    Is there anyone who knows what kind of interactions, triggers or events that are supported
    in both programs and do actually wotk?
    Thanks
    Guy

    I am not sure of the limitations, if any, what version of Indesign are you using? It could be a version conflict.
    I just did a simple test (Edge 2 / In CC) with simple click event triggers and it worked fine.
    Also in open Indesign > Window > Folio Overlays and make sure Allow User Interaction is checked.
    Darrell

  • 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

Maybe you are looking for