-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved: Manage itemStatusId and oldItemStatusId on entity-auto engine
(OFBIZ-11183) Currently the entity auto engine manage the status change operation on an Entity during an update, with analyse the field statusId as new status and compare with current value through StatusValidChange system. If the change is validated, the previous status is returned in oldStatusId service parameter. Service definition example : <service name=updateRequirement default-entity-name=Requirement engine=entity-auto invoke=update auth=true> <description>Update an existing requirement</description> <auto-attributes include=pk mode=IN optional=false/> <auto-attributes include=nonpk mode=IN optional=true/> <attribute name=oldStatusId type=String mode=OUT optional=true/> </service> I extend this process to an other standard status field: itemStatusId and oldItemStatusId, often present on item element <service name=updatePicklistItem default-entity-name=PicklistItem engine=entity-auto invoke=update auth=true> <description>Update PicklistItem</description> <auto-attributes include=pk mode=IN optional=false/> <auto-attributes include=nonpk mode=IN optional=true/> <attribute name=oldItemStatusId type=String mode=OUT optional=true/> </service> To realize this, I convert all call on statusId and oldStatusId raw naming by a dynamic resolution field name resolution. Like this the logical for statusId or itemStatusId are exactly the same git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866559 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
1 changed file
with
47 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters