ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taher Alkhateeb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-7957) RateAmount is not found when the level is 'WorkEffort'
Date Mon, 29 Aug 2016 12:25:20 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-7957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15445712#comment-15445712
] 

Taher Alkhateeb commented on OFBIZ-7957:
----------------------------------------

In my opinion we should minimize the use of services in other services. Having the services
being independent of one another means that you can combine them in new and novel ways. But
composeability requires First Independence.

This is where in my opinion SECAs play an important role. Because here you are combining the
services exactly how you need them in that specific certain context while maintaining the
purity Independence and modularity of your services. This is sort of where all the hype of
microservices is coming from.

However if the SECAs become too complex or unrealistic to implement then at that point you
might call services from other services.

The code examples that you want are plentiful and you can find them in multiple components
check for example the accounting component you'll probably find some good examples there.

> RateAmount is not found when the level is 'WorkEffort'
> ------------------------------------------------------
>
>                 Key: OFBIZ-7957
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7957
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Montalbano Florian
>              Labels: accounting, level, rate, rateAmount, workeffort
>
> When you create a RateAmount, you can determine for which WorkEffort it should apply.
But when this RateAmount is retrieved for a specific WorkEffort, it fails to find the good
RateAmount.
> The problem comes from the check done to retrieve the RateAmount at a WorkEffort level.
This is the used check : 
> {code}
> <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
>                 <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
>                 <field-map field-name="partyId" from-field="parameters.partyId"/>
>                 <field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
>                 <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
>                 <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
>             </entity-and>
>             <if-empty field="amounts"> 
> {code}
> In this 'entity-and', the partyId is set as a constraint. But it is possible to enable
a special RateAmount only for a WorkEffort without regarding the partyId.
> I think we have 2 options here :
> - Remove the partyId constraint but then the retrieving may be less accurate
> - Make the retrieving more accurate by checking first the WorkEffort, then from the retrieved
list, check if the partyId matches and finally from this second retrieval, check if the emplPositionTypeId
match. At the end, we would have the most accurate RateAmount.
> What do you think of it ?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message