cancel
Showing results for 
Search instead for 
Did you mean: 

Attributes, events, methods of enhanced class are not visible in workflow container / environment

JensSB
Participant
0 Kudos

Hi all,
I have to adapt an SAP standard workflow which bases on a workflow class. It is the second time and always the SAP class is set to final. So I thought I'm clever, I'll use the possibilities of the standard enhancements like defining new attributes, etc.. After a short while, I came to the result that these objects are not available for selection in the workflow environment.
At least at the point in the screenshot, it seems to be intended by SAP NOT to provide enhancements in the workflow environment. But why? Are there too many difficulties to have an eye on?? I made my experiences below on a SCORE 102 0002 / SAP_BASIS 752 0002. In the other case, I worked on a SRM 7.1 (?).

The problem is that the classic BO is on its way into retirement and is no more state of the art. Thus workflow classes must be extendable using inheritance AND enhancements if they should be a worthy replacement for the classic BOs.

Hope you share my opinion.

Best regards,
Jens

Accepted Solutions (1)

Accepted Solutions (1)

pokrakam
Active Contributor
0 Kudos

I can't remember where the info from SAP came from, it may have been a note I raised with them. But it has been discussed here and on SAP-WUG before. It's a case of sorry but that's the way it is we can't change it.

Thanks for confirming my suspicions on the table level info, so enhancements purely live at the code level. The enhancement concept is owned by the ABAP part of SAP, and is outside the control of WF. If the WF folks build their data model on the class descriptor tables and enhancements bypass those, I can only imagine it would be a major effort to incorporate those and there are higher priorities in the WF teams.

I know customers can be a bit paranoid about repairs, I've had these discussions before. To use your own description: Compare one low-risk repair which does not influence the functionality or break any upgrades vs. "a mix of the offered BAdI, implicit enhancements at several points and additionally an own WF class as shadow to the standard WF class". I've always found enhancements a bit iffy to follow and debug. Think about the average (outsourced?) support developer who has to fix or do minor changes. The repair route is lower risk, lower cost, easier to implement, easier to understand.

A possible risk argument is that if the SAP class is changed in a significant way during an upgrade your subclass may be affected. But since you're just moving your enhancement functionality into a subclass, an enhancement would be similarly affected. net effect is the same whether you subclass or enhance, so no difference in risk.

JensSB
Participant
0 Kudos

The enhancements are stored in the tables ENH*. Here the class CL_OO_CLASS_COMPONENTS_FLAT is called by CL_SWF_EXP_SERVICE, which is a deeper part of the WF runtime. But you are right, this must not be the same anywhere else in the WF runtime.

I'm not that well informed but maybe the BPM orchestration considers this and replaces somewhen the WF runtime.

Anyhow, thanks a lot for this discussion.

Answers (2)

Answers (2)

JensSB
Participant
0 Kudos

Hello Mike,

thanks for the quick response. I wouldn't write here if I could find something to this topic. Is there somewhere a hint and recommendation how handle these cases?

May my words are a little too harsh, but I would assume that those things are on the agenda when introducing enhancements and the end of the BOs are visible. And also that the developers are aware that a well-intentioned and prepared BAdI (like in my case) could be not enough. But this is another issue.

I repeat some of my planned enhancements. And you are right, I don't find these objects in the tables SEOCOMPO/SEOCOMPODF. But the mentioned class would resolve them if the corresponding parameter would be provided. I tested it (again).

And yes, it is a low risk removing the flag, but some customers are very sensitive regarding any kind of repairs/modifications.

My solution is now a mix of the offered BAdI, implicit enhancements at several points and additionally an own WF class as shadow to the standard WF class to do the work I liked to implement in the standard class.

Best regards,

Jens

pokrakam
Active Contributor
0 Kudos

This is a known limitation, SAP have confirmed this. To be fair, I don’t think this is the fault of the workflow guys & gals, but I suspect it has more to do with the way enhancements work.

I haven’t had the chance to verify this, but I would guess that enhancements probably are not visible in the class definitions - have a look at SEOCOMPO/COMPDF tables (names might vary slightly, not in front of system) to see if your enhancements are visible.

My solution is a simple repair to remove the final flag from the class and subclass it. This is about as low risk a repair as you can do, so sensible basis folks should be OK with that. Then try to keep your enhancements in the subclass - e.g. a wrapper method to call the one you want to enhance.