yawlfoundation / yawl

Yet Another Workflow Language
http://www.yawlfoundation.org
GNU Lesser General Public License v3.0
90 stars 35 forks source link

Implement a YParameter.getValue(Element inData) #627

Closed Marco-Sulla closed 4 years ago

Marco-Sulla commented 5 years ago

I think it will be really more simple if YParameter will have a method getValue(Element inData). Now you have to get the YParameter name and invoke AbstractCodelet.getParameterValue(String paramName). This is a bit strange for me.

Furthermore AbstractCodelet.getParameterValue() is protected and can't be used in utility classes, for example. I had to create an utility that extends from a FakeAbstractCodelet, which execute() method throws a NotImplementedException.

adamsmj commented 4 years ago

A YParameter is a template for a data variable. Due to a separation of concerns, it would be inappropriate for a YParameter to deal with runtime data values. Codelets only exist at runtime, so that's the appropriate place for any methods that handle runtime data. Closed without change.