Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 1.0-RC
-
Component/s: None
-
Labels:None
Description
Currently, running a dynamic job, e.g. with
MyJob.triggerNow([foo: 'fooValue'])
requires the job's class to have:
def execute(context) {
def foo = context.mergedJobDataMap.get('foo')
// code that uses foo
}
It would be more Grails-like to make the job data map set properties on the job bean automatically. In this case, the Job class would have a foo setter, and calling triggerNow([foo: 'fooValue']) would automatically call jobInstance.foo = fooValue.
This would be a very cool feature. Agreed?