Hi Justin, It's probably a newly introduced issue with how timestamps are being rendered in the input field or possibly some bug specific to the project manager app. This is definitely not a common problem or if it is then it's recently introduced.
By the way, the simple method is pretty straightforward, entity-one is analogous to findByPrimaryKey except that minilang automatically maps the variables in the context to the primary key of the entity being searched for. So it's just a lookup then delete, the error is complaining that the call to remove-value is providing a null value for removal. The easiest way to debug minilang is to use <log> statements to inspect variables and throw in a <transaction-rollback/> afterwards, rolling back the transaction means you can keep hitting refresh on the browser while debugging and nothing gets saved, nice for easy repeatability. Regards Scott HotWax Media http://www.hotwaxmedia.com On 13/06/2011, at 9:25 PM, Justin Robinson wrote: > I'm debugging the projectmgr for our use & came accross this situation. > > <service name="removeWorkEffortAssoc" engine="simple" > default-entity-name="WorkEffortAssoc" > > location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" > invoke="removeWorkEffortAssoc"> > > <simple-method method-name="removeWorkEffortAssoc" > short-description="Remove a WorkEffort association"> > <entity-one entity-name="WorkEffortAssoc" value-field="lookedUpValue"/> > <remove-value value-field="lookedUpValue"/> > </simple-method> > > On trying to delete a WorkEffortAssoc it throws an exception > lookedUpValue missing or some such, not wanting to spend to much time > trying to figure out the how and why of the ever cryptic > 'simple-method' involved, I wrote a replacement service to do the same > thing & found I couldn't findByPrimaryKey as WorkEffortAssoc pk > includes fromDate and the hidden field in the form doesn't have > millisecs for the fromDate: > > uneq: db fromDate: 2011-06-09 15:45:55.873. form fromDate2: > 2011-06-09 15:45:55.0 > > I got around the problem with some verbosity in my replacement service > implementation, but writing replacement services instead of fixing > existing is kinda bad form. > I assume projectmgr works or has worked & am really curious how this > sort of problem is over come by the simple method above that I don't > understand. > > Can anyone who works with minilang explain this one to me? > > -- > Regards, > Justin > Venture-Net Research & Development
smime.p7s
Description: S/MIME cryptographic signature
