Let me share how to integrate a custom workflow template which uses the “Advancing with Immediate Dialog” function.

My Inbox is a central inbox which can handle multiple workflow engines. It can work with SAP Business Suite (SAP Business Workflow , ABAP) and BPM Workflow (Java) and 3rd party workflow (by developing provider interfaces)

Challenges:

If the custom workflow template uses the “Advanced with Immediate Dialog” which only works for SAPGUI, user should execute similar workitem again in the My Inbox. It is not a good usability.

If the workitem is executed in SAPGUI, users don’t feel executing similar workitem again because SAP Buisness Workflow brings the next workitem automatically.

/wp-content/uploads/2015/06/wf1_719651.png /wp-content/uploads/2015/06/wf2_719652.png

This is a challenge when you execute a workitem in non SAPGUI like Fiori My Inbox or Portal UWL.

Solution:

A solution is removing the sequential dialog chain from the custom workflow template. Make those 2 steps to 1 step.

To do make it to 1 step, first remove the second step in the custom workflow template and implement the second step method in the first step.

For SAP Fiori users:

Implement the BADI. App Extensibility: My Inbox – SAP Fiori Apps – SAP Library

/wp-content/uploads/2015/06/wf3_719667.png

Fior SAPGUI users:

Implement the program exit at the user decision task.

Reference: User Decision + Program Exit

/wp-content/uploads/2015/06/wf4_719666.png

Regards,

Masa / SAP Technology RIG

To report this post you need to login first.

3 Comments

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

  1. Martin Svik

    Thank you for this blog ! i am facing this problem right now ! i have to implement custom workflow where after a decision step a popup comes up where i have to choose a user, etc…. this is z-coding in a method of the workflow-step in backend.

    Now you mean that backend logic should be implemented in BADI.

    thats very bad -> when you have huge logic in custom workflow (and there are a lot of them) you have to “move” all the logic into this BADI instead of being able to use the existing one ? 🙂

    (0) 
  2. Jeline Alexandra T. Co

    Hi Masa! Thanks for this blog and your posts! We were able to get many things working based on your replies in the forum 🙂

    We did implementation similar to here and just wanted to share our experience:

    (1) During testing, the exit for MyInbox was executing the posting even if work item was locked elsewhere (e.g. in SAPGUI). Initially, we had thought to just double check if the work item is already locked.

    (2) It also seems the work item exit IF_SWF_IFS_WORKITEM_EXIT was being called for both MyInbox and SAP GUI. This meant if action was to delete document, when done over MyInbox, you have to implement additional logic in the SAP GUI to check if document has already been deleted.

    Given the 2, we decided to remove implementation of /IWWRK/BADI_WF_BEFORE_UPD_IB and just retain the one for SAP GUI (IF_SWF_IFS_WORKITEM_EXIT), thereby minimizing maintenance and redundancy of code as well. 🙂

    The downside to this was that we had trouble returning error/sucessful message back to MyInbox. What we initially did was to raise an exception in the exit — this gets returned to MyInbox. Then to keep the item alive, we implemented logic for AFTER STATUS CHANGE event to do ‘SWL_WI_REPLACE’ for work items if status is error.

    I am still on the look out of what would be a better way to return the message to MyInbox. But for now we getting by with the exception throwing.

    (0) 
    1. Masayuki Sekihara Post author

      Hi Jeline,

      It is a valuable feedback. The scenario I supported was opening transaction. So I did not realized (1) and (2).

      Could you write a blog and share more details including business scenarios, challenges and a solution?

      Regards,

      Masa / SAP Technology RIG

      (0) 

Leave a Reply