Skip to Content

How to set up Generic Workflow Handling in Alloy

Alloy allows you to flexibly expose Decision Workflows onto your Lotus Notes client. Each Decision Workflow step can have its individual Notes Form on the client side to visualize the related information and to offer the available decision options to the end-user. Such a Form could e.g. show a Purchase Order with some header attributes and an item grid with the products submitted for approval.  This gives you a good flexibility to meet individual business needs by creating specific Notes Forms for each Decision Workflow step. Depending on how generic the Notes Form is, you can also re-use it in different Workflow Applications. A good example for this is the default approval Form “(ERPApprovalWorkflow)” which shows some attributes of the Workflow Step as well as the Task description long-text..   An even more generic approach is shown in this blog (see picture above). The assumption is that you want to expose Decision Workflows to Lotus Notes that consist of Header attributes and optionally a grid with Line Items. An example for this could be the above mentioned Purchase Order, a Sales Order, an incoming Invoice, or any other business object that falls into this structure.   The trick is that the Notes Form only has place holders for the mentioned attributes. Via an easy protocol we pack all attributes we want to send to the client with the help of an ABAP outbound handler into a generic Header and Item field. These attributes are unpacked during runtime by the Notes Form and displayed accordingly. There is no need to change the Notes Form if you want to add or remove fields from/to the header or item grid. The only development work you need to do is to create an outbound handler (function module) that reads the business object(s) from the workflow and packs it into the generic fields. The generic Notes Form remains the same and does not need to be changed.  Let’s take the already mentioned Purchase Order example and show how this generic approach works. The current blog explains what you need to do on the SAP side. Please see _[Dirk Lehmann’s blog | The one with the generic Workflow UI]_ for handling the Notes/Domino side. If you need general information on how to expose a Decision Workflow to Alloy, please read _[this blog | How to expose a Decision Workflow to Alloy]_ first. Starting point is an existing workflow template with a decision step that gets triggered when a new Purchase Order is being created (or released). Via the regular “Workflow Pattern Customizing” in the “Information Worker Implementation Guide” you subscribe yourself to this decision step of your workflow template.  In the “Workflow” node of the Workflow Pattern Customizing you also add a custom outbound handler (in this example *Z_S_OSP_WF_PO1_CH_OB*) that is being called prior to the default outbound handler *S_OSP_WF_PAT_DEFAULT_CH_OB* (the order is important!). The custom outbound handler has to have the same interface as the default outbound handler. A good suggestion is to copy the default handler and to remove the copied coding (instead of creating the interface from scratch).  .
Be the first to leave a comment
You must be Logged on to comment or reply to a post.