My Inbox: Custom workflow with “Advancing with Immediate Dialog”
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.
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
Fior SAPGUI users:
Implement the program exit at the user decision task.
Reference: User Decision + Program Exit
Regards,
Masa / SAP Technology RIG
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 ? π
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.
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
Hi Masa,
Thank you for your blog. For meΒ "Advancing with Immediate Dialog" implies that the next dialog task is executed immediately if the selected agent is the same. I have a fully custom workflow, which I want to start using in Fiori (SAP S/4 Hana 1608). I want a dialog task to be executed immediately (in webgui for instance) when the user has chosen an action in the user decision. The result now is the creation of a new task in the inbox. I have tried several things, I have searched the internet and I can not find a solution anywhere. The above is not working, because that give the solution for execution a background task.
Can you help me?
regs
Petra
Β
How about re-design the custom workflow without immediate dialog with Fiori?