Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
MattHarding
Active Contributor

Warning

This is written for those who live and breathe Workflow & Inboxes plus are implementing Fiori My Inbox. It's a quick post just to put my thoughts on a solution when moving from POWL based Inbox to Fiori My Inbox; very open to debate!

From Inbox to Fiori My Inbox - The hurdle

As part of an implementation of My Inbox at a customer who already has the POWL based Universal Inbox (Let's Crowd Source a POWL Based Universal Worklist Design for ERP) I quickly discovered how many out-of-the-box task approvals were based on an out-of-the-box visualisation that for unknown reasons, relied on more than just the Work Item and Task Id's (I'm looking at you EH&S & T&M). Now this was fine in the POWL based Inbox as it allowed additional work item container parameters to be dynamically inserted via the Action configuration, but Fiori My Inbox moves back to transaction SWFVISU for visualisation, but without the XML config that the Portal supported which allowed you to map these parameters. This is problem #1.

Problem #2, which is more annoying than a problem, is that the use of Object Based Navigation is not an option. e.g. Since the Fiori Launchpad moves to Intents as opposed to Portal/NWBC OBN's; I'm assuming a decision was made to not allow OBN's to be processed in the Fiori Launchpad for older transactions (very non S/4 requirement I know).

So with that knowledge, I've been toying with the approach today, and just wanted to run it by the community (mainly because it works, but I really wish SAP had done this, so I didn't have to request an implicit enhancement).

Solving Problem #2 is easy, as all we need to do is remove the OBN layer and point directly at the Web Dynpro application (or similar). Of course, this is not simple to do since the OBN is hidden in menu roles (ignoring Portals and focusing on NWBC). Luckily, there is a simple program to find navigation targets (OBN.02 Failed to Resolve Object-Based Navigation - SAP NetWeaver Business Client - SAP Library) but you still need to search around a little to find the menu item in question.

So with that, we just move the underlying menu item and the configuration from the POWL Actions configuration into transaction SWFVISU for the task in question. Now we are just left with Problem #1 in cases where additional workflow container data is required to launch the visualisation.

So my main issue is to do with Web Dynpro ABAP visualisations.  I looked into the code which does the visualisation, and it's quite clear that it will only convert across 2 hard-coded dynamic parameters. Looking through SCN, SMP, Google and talking to others; it was clear that for Fiori My Inbox - There is no hidden functionality to address this, so I then resorted to....A post-method implicit enhancement!

Post Method Implicit Enhancement

Now anyone who knows me, knows that I think this is the same as a modification, and you really need a strong business case if you are doing to do an implicit enhancement, but I have a sexy new Inbox with 50+ tasks to get up and running; and just no way to achieve all of these as UI5 based approvals in the near future; so I think I have a temporary business case if there is no other way.

Anyway, the code is pretty straightforward (and below is my first cut at just seeing this will work for first level Work Item Container data) In short, it's just quickly scanning the returned parameters, and if it detects a ${ITEM.SOMETHING}; then it will get all work item container variables then replace them in the returning parameters table:


METHOD IPO_ZENH_BADI_MYINBOX_EXECPAR~GET_WD_PARAMETERS.
*"------------------------------------------------------------------------*
*" Declaration of POST-method, do not insert any comments here please!
*"
*"methods GET_WD_PARAMETERS
*"  changing
*"    value(RE_PARAMETERS) type TIHTTPNVP . "#EC CI_VALPAR
*"------------------------------------------------------------------------*
  data:
    lt_parameters type IBO_T_WF_CFG_INBOX_TS_ATTR.
  loop at re_parameters ASSIGNING FIELD-SYMBOL(<ls_parameter>).
    IF <ls_parameter>-value cs '${'.
      " Get parameter to replace
      append <ls_parameter>-value to lt_parameters.
    endif.
  endloop.
  if lines( lt_parameters ) > 0.
    try.
    data(lt_dynamic_task_attributes) = cl_ibo_wf_inbox_facade=>get_task_container_params(
      iv_workitem_id     = me->core_object->m_wiid->*
      it_attribute_names = lt_parameters
      ).
      LOOP AT lt_dynamic_task_attributes ASSIGNING FIELD-SYMBOL(<lv_attribute>).
        CONCATENATE '${ITEM.' <lv_attribute>-name '}' INTO DATA(lv_name).
          LOOP AT re_parameters ASSIGNING <ls_parameter>.
            IF <ls_parameter>-VALUE = lv_name.
              REPLACE ALL OCCURRENCES OF lv_name IN <ls_parameter>-value with <lv_attribute>-value.
            ENDIF.
          ENDLOOP.
      ENDLOOP.
    catch cx_ibo_wf_error cx_ibo_wf_abort.
    endtry.
  endif.
ENDMETHOD.

Is there a better way?

So that's it - But is there a less drastic way to do this? Will SAP release a backwards compatible note with better code than above to help us out (or have they already)? Whatever the outcome, I hope this helps you if you also go down this path in the near future! Thanks for reading.

9 Comments
ChrisSolomon
Active Contributor
0 Kudos

Wow! Great work in sleuthing out a "workaround". I am sure you aren't the first to hit this. Thanks for sharing! I have had my share of headaches with SWFVISU......sometimes it is used....sometimes it is ignored....sometimes you think it is being looked at when in fact it's not. I got tired of trying to figure it out and just put my config in there" just in case". haha Guess like many things with SAP, when it is used simply "depends". haha

keohanster
Active Contributor
0 Kudos

Thanks for the great blog, Matt.  As someone who does, in fact, live and breathe Workflow inboxes, I hope SAP *does* come up with a better way to do this - in the next few years it will take me to get to Fiori (so there's lots of time!).

Cheers,
Sue

MattHarding
Active Contributor
0 Kudos

Hi Chris,

The fun of multiple clients is everyone does things differently, but sort of the same - meaning you always need to keep on your toes! But sometimes it's just nice when everything just works so I wish you had been around to set-up the SWFVISU config before I implemented My Inbox!

Cheers,

Matt

MattHarding
Active Contributor
0 Kudos

Of course, when I wrote "live and breath(e) workflow" you came to mind immediately! (and thanks for the correction)

former_member181875
Contributor
0 Kudos

Hi Matt,

Glad you spotted the fun that can be had with multiple clients :wink: But I agree there might be some rough corners that SAP could smooth over.

I'll get back to you once I've had a chance to dig deeper,

Alan

MattHarding
Active Contributor
0 Kudos

Thanks Alan! Hopefully we can settle on 1 functional swfvisu equivalent solution going forward for ABAP workflow...

Cheers,

Matt

jmoors
Active Contributor
0 Kudos
I have a similar problem, I need to determine the intent based on items contained in the workflow container, I know this post is a year old, has anyone found a better way to dynamically determine the intent?

 

Many thanks,

Jason

 
MattHarding
Active Contributor
0 Kudos
Hi Jason,

Intent handling in My Inbox is pretty useful if you can rewrite the target applications for use in openMode = external. For example,in the component.js file of a UI5 app, you just infiltrate the parameters passed in.  That plus the intent handler is the best swfvisu configuration of them all so if you use Class based workflow, you have the ability to get at any container variable, including methods on your work item "object".

Anyway, not quite sure of your specific problem, but feel free to post a new question in answers.sap.com and add a link to it here and maybe someone will have a better answer.

Cheers,
Matt
PaulBuettner
Participant
Even in 2018 still an issue in the ABAP stack.

 

Thanks for your intentions I really thought I do something wrong because I found no other solution besides enhancing standard classes.

We sovled it more or less different: We created new subclass of the URL Generator and then modified the factory to create this new class in case of WebDynpro generation.
Labels in this area