Skip to Content
With SAP NetWeaver 04 you can use a new feature in workflow called local workflows.    Here’s what you need to know about local workflows: 1. They are control flow snippets, not part of the main process. 2. They are special blocks, represented by block work items. 3. They are started via local events.  4. They have full access to process data. 5. They can be instantiated an arbitrary number of times. 6. They are cancelled if still active when the main process completes.  The following graphic depicts how local workflows work.  image In your workflows you can define local events.  These are events that are only known to your workflow.  They are defined in the basic data section of the workflow.   To define them select Workflow – Basic Data.  Then select Version -dependent and events.  You will see a drop down for local events, and the event name can be freely defined.  Then in your workflow, you can use a block to catch exceptions.  Once the exception is caught, raise your local event.  This will start your local workflow.    In your SAP NetWeaver ’04 Application Server,  go to transaction code SWDD and look at the SAP provided workflow, WF_Verify042.  This workflow is an example of how to use a local workflow.    It is easy to insert blocks and local workflows, they are just another step type in the 6.40 application server.    Local workflows can only be started by local events (data binding can be defined). Local events are triggered either directly via an ‘Event Trigger’ step, or indirectly by connecting a global event to a local event in the basic data of the workflow.    This is great because you can either trigger the local workflow yourself by raising your local event, or you can tie a global event to your local event.    Since the local workflow is tied to the main workflow, it is automatically completed and or cancelled when the status of the main process changes to completed or cancelled.  Also, a local workflow can execute as many times as required, there is no restriction on the number of instances.  So, if you have been dealing with cumbersome loops, capturing data to do an exception process, then local workflows might be just what you need!  To see more about local workflows and other new features in workflow, get the TechED collection of presentations and check out presentation BPI201.  
To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Alon Raskin
    Hi Ginger,

    This is an interesting feature. I look forward to playing around with this at some point.

    I guess in essence this feature just gives me a way of triggering sub-flows from anywhere in my WF. I understand that these subflows are ‘local’. I worry about this as it may make it difficult to track the flow of a workflow with these local events and workflows.

    Still I can see that used in the right way this is a nice feature.

    (0) 
    1. Ginger Gatling Post author
      Hello Alon,
      Yes, I see what you mean.  If they were overused I guess they could make it more difficult to track.  However, in the log you will see an indication that this is coming from a block – it’s indented in the log.  So, it is pretty clear.  Have you got a WAS 6.40 onsite?  If so, please let me know if/how you give them a try – and don’t forget to check out the example workflow!
      (0) 
    2. Alan Rickayzen
      Hi Alon,
      You’re right that you can to this with subflows and APIs and,and,and… but it is much easier doing some things with local workflows.

      E.g. They access the same container as the main workflow.
      So they are ideal for compensation or escalation procedures without disrupting the main flow. Used in this way, they won’t make tracking complicated.

      Best regards,
      Alan

      (0) 
  2. Bob Tan
    I picked this up during SAP TechEd 05, Boston in one of the sessions by Ginger. I have started using it in my developments since. It’s a nice feature and I have no trouble reading the log details. I used it to send mail notification and manage external review process.
    (0) 

Leave a Reply