cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PRE_DISP Activity Hook and Scrap of SFC

Former Member
0 Kudos

We have a scenario where we want to check the max loop count against the times processed counter of a SFC on this routing step after a NC incident (with disposition configured) happened

So we wrote an activity hook for NC disposition and attached it

I have different problems with this scenario

When I use a PRE_DISP activitiy hook I will get the current router/step of the SFC before the disposition happened. So I can get the counters I need

But when I try to do a scrap of the SFC via API I get the error (after the hook completed):

Caused by: java.lang.IllegalArgumentException: QTY cannot be <=0

at com.sap.me.demand.SFCRoutingReleaseWorker.addRouter(SFCRoutingReleaseWorker.java:188)

at com.sap.me.demand.SFCRoutingBOBean.addRouter(SFCRoutingBOBean.java:131)

....

I guess this is because the system tries to do the disposition after the hook and will get an error since it has been scrapped already

When I use a POST_DISP hook I can do the scrap without errors. But I didn't find any method to get the router/step from where the disposition was started. In the DTO object of the hook I get the old operation but the router is already the new one

So what is the best solution to the scenario? Is there a possibility to cancel the disposition in the PRE_DISP hook? Or are there methods for getting the router/steps for the SFC before the route was changed to a new one?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Gentlemen,

Please do not forget to share a solution with the community.

Thank you,

Alex.

RajeevKansal
Advisor
Advisor
0 Kudos

Hi Anton,

Can you please send me the activity hook code through e-mail?

thanks

Rajeev