35
Views
1
Comments
Question about Get[Entity]ForUpdate behaviour and lock status between ServerAction
Question

We are currently running Entity in OutSystems with the following configuration and have a question about whether Get[Entity]ForUpdate can update via ServerAction with a lock on the Entity.


Current configuration:.

Core Module

 Entity

  Entity1

   GetEntity1ForUpdate

   UpdateEntity1

 Server Action

  Entity1toEntity1StrRecord

  Entity1StrRecordtoEntity1

  GetEntity1ForUpdateServerAction

   GetEntity1ForUpdate

   Output the return value (Entity1 type) of GetForUpdate as it is

  UpdateWithLockEntity1ServerAction

   GetEntity1ForUpdateServerAction

   UpdateEntity1

 Service Action

  UpdateWithLockEntity1ServiceAction


Application module

 XXServerAction

  UpdateWithLockEntity1ServiceAction


Question:.

In this configuration, is it possible for GetEntity1ForUpdate to update via ServerAction with a lock on the entity?


Specifically, the value passed is as follows


XXServerAction → ServiceAction → Entity1StrRecordtoEntity1, passing the structure (Entity1 Str Record type) of the entity that contains the post-update information.

In GetEntity1ForUpdateServerAction, the return value (Entity1 type) of GetForUpdate is passed as is.

In the UpdateWithLockEntity1ServerAction, the output parameter of GetEntity1ForUpdateServerAction is the same as the one inherited from the ServiceAction (actually Entity1 StrRecordtoEntity1) to the output parameter of GetEntity1ForUpdateServerAction, which is then used as the argument for UpdateEntity1.

Could you please advise if GetEntity1ForUpdate works as expected in this way (i.e. while keeping the entity locked)?

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi,

The way you try to explain your logic by writing it out makes it hard to follow. It would be easier for People to help you if.you share screen shots or even better an OML file.

-- Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.