Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2720

Re: Doubt on instantiation of method

$
0
0

Hi Mike,

 

it's a good point, adressing a testing framework. I've played around with a local test-class ... (with some limited fun only) ... but for workflow it might makes some sense to create some decicated report for a repeated solution.

 

In that particular class, the constructor can do both: Either you feed it with a document number OR you feed it with all database tables, if the caller had already read them completly. The last one is used during ME21N, when the document is not yet written, and you still want to create an object instance :-) ... There's also a factory-method for that, which then in turns calls the constructor...

 

The "bad" design here, is that there's a public constructor, as the mentioned factory method is the if_workflow~find_by_lpor( ) . But the Workflow Builder requires a public constructor, otherwise it crashes badly with a short dump ... and that's ... design :-)  (because an empty constructor call is executed, instead of an empty find_by_lpor() call)

 

Best wishes

Florin


Viewing all articles
Browse latest Browse all 2720

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>