Hi Shikha,

As I can remember correctly(did not look at the code), you are right, the
current user is not passed to the action service. The reason is we don't
have a user login in the Delegator method(create/store).

If you did some workaround, please let us know.
-- 
Thanks & Regards
Pawan Verma
Technical Consultant
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com


On Tue, Mar 2, 2021 at 4:56 PM Shikha Jaiswal <
shikha.jais...@hotwaxsystems.com> wrote:

> Hello Team,
>
> We are facing an issue with EECA rule - The action service (entity-auto)
> has changeByUserLoginId field which is always set as 'system' userLogin.
>
> <eca entity="OrderItem" operation="create-store" event="return">
>     <condition field-name="estimatedShipDate" operator="is-not-empty"/>
>     <set field-name="changeDateTime" value="${groovy:
> org.apache.ofbiz.base.util.UtilDateTime.nowTimestamp()}"/>
>     <action service="createEstDateHistory" mode="sync"/>
> </eca>
>
> When explored it, we found that in EECA, userLogin passed to action service
> is always 'system'. Current userLogin is not passed in context and when
> userLogin is empty, the run-as-user field is set to system userLogin by
> default, as mentioned in entity-eca.xsd.
>
> What could be the use case for this implementation? Shouldn't userLogin
> should pass to action service from context, if not found then default to
> system userLogin.
>
> Please let me know your thoughts on this.
>
> Thanks and Regards,
> --
> Shikha Jaiswal
> Senior Enterprise Software Engineer
>

Reply via email to