Skip to Content
Author's profile photo Ginger Gatling

New workflow features in NetWeaver ’04 – local workflows!

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.  

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      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.

      Author's profile photo Ginger Gatling
      Ginger Gatling
      Blog 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!
      Author's profile photo Alan Rickayzen
      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,

      Author's profile photo Former Member
      Former Member
      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.