Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Zapisz rekord

Podsumowanie:

Akcja zapisuje w bazie danych wartości z pól aktywnego formularza. W definicji akcji można używać przełączników umożliwiających sterowanie odświeżaniem formularza po akcji zapisu. Szczegółowe zachowanie nAxiom dla różnych konfiguracji zapisu rekordu przedstawiono na diagramach sekwencji w tym temacie.

Domyślnie wraz z zapisem wykonywane jest odświeżenie formularza. Obejmuje ono odświeżenie wartości wyliczanych, zależności oraz odświeżenie sekcji innych niż pola formularza, w tym nagłówka (sekcja toolbar). W niektórych przypadkach może to być niepożądane. Dlatego akcja zapisz rekord ma dodatkowe przełączniki:

  • Odśwież widok po akcji zapisu: jeśli zostanie wyłączony, dane z formularza zostaną zapisane, ale widok formularza nie zostanie odświeżony.
  • Odśwież nagłówek podczas tworzenia nowego rekordu: pozwala włączyć odświeżanie sekcji toolbar po zapisie nowego dokumentu, kiedy wyłączono odświeżanie formularza.

    Edycja akcji zapisu rekordu
    Edycja akcji zapisu rekordu

Akcję można przypisać do przycisku na formularzu i do przejścia na diagramie procesu.

Odświeżanie formularza podczas zapisu rekordu

W tej sekcji zamieszczono diagramy sekwencji ilustrujące czynności wykonywane podczas operacji zapisu, zależnie od stanu przełączników dotyczących odświeżania. Diagramy dotyczą czterech przypadków: utworzenie i aktualizacja rekordu w modelu uproszczonym (bez zmiany statusu) oraz utworzenie i aktualizacja rekordu w modelu podstawowym (ze zmianą statusu).

W każdym diagramie na początku wymieniono operacje wykonywane zawsze podczas zapisu rekordu, a następnie dodatkowe czynności w przypadku, gdy odświeżany jest tylko nagłówek (dotyczy tylko zapisu nowego rekordu) oraz gdy odświeżany jest formularz.

Form refresh case: A1. create new record without workflow transitionEndUserEndUserFormButtonActionSaveRecordFormButtonActionSaveRecordBrowserBrowserFormContextFormContextBackendAPIBackendAPI[01]click[02]saveRecord[03]saveRecordcommon behaviorsave record[04]create instance data[05]create additional record data (Audit, ...)[06]create ACL permissionsACL Read permission control[07]check current ACLReadpermissionsalt[no permission][08]update record's Id + RowVersion, end sequence without erroralt[permission found][09]updatefull context datawithout running JS script on FormContext change[10]update record Id in URL only,without GUI refresh,keep form state (chosen tabs, etc.)refresh Form OFF, refresh Header for new record OFF no actionsrefresh Form OFF, refresh Header for new record ON refresh form header[11]GetFormHeaderACL Read permission control[12]check current ACLReadpermissionsalt[no permission][13]HTTP error 401: access unauthorizedalt[permission found][14]continue[15]returnform header data and system data into form context[16]set system data in form context[17]GetTaskOwnership[18]GetLastTransitionDetailsrefresh Form ON refresh form[19]GetFormByRowGuid[20]run action set on form openACL Read permission control[21]check current ACLReadpermissionsalt[no permission][22]HTTP error 401: access unauthorizedalt[permission found][23]continue[24]returnall form GUI elements and full context data[25]set all form context data[26]GetAuditDocument[27]GetComments[28]GetValuesForControls[29]GetValuesForSections[30]GetTaskOwnership[31]GetLookupData[32]GetFieldAccessModel[33]GetAttachmentList[34]GetLastTransitionDetails Form refresh case: A2: create new record with workflow transition via GUIEndUserEndUserFormButtonActionSaveRecordFormButtonActionSaveRecordBrowserBrowserFormContextFormContextBackendAPIBackendAPIcommon behavior[01]click[02]saveRecord[03]saveRecordworkflow transition sequence to first status[04]run non status transitions and connected actionsrun gateways, service tasks, subprocess async.,(support for backend actions only),skip saveRecord action in this action setrun change status[05]calculate new Business Status[06]insert new record[07]insert additional record data (Audit, ...)[08]create ACL PermissionsACL Read permission control[09]check current ACLReadpermissionsalt[no permission][10]update record's Id + RowVersion, break sequence without erroralt[permission found][11]updatefull context datawithout running JS script on FormContext changeaction set after[12]run action set after(support for backend actions only)[13]update record Id in URL only,without GUI refresh,keep form state (chosen tabs, etc.)refresh Form OFF, refresh Header for new record OFF no actionsrefresh Form OFF, refresh Header for new record ON refresh form header[14]GetFormHeaderACL Read permission control[15]check current ACLReadpermissionsalt[no permission][16]HTTP error 401: access unauthorizedalt[permission found][17]continue[18]returnform header data and system data into form context[19]set system data in form context[20]GetTaskOwnership[21]GetLastTransitionDetailsrefresh Form ON refresh form[22]GetFormByRowGuid[23]run action set on form openACL Read permission control[24]check current ACLReadpermissionsalt[no permission][25]HTTP error 401: access unauthorizedalt[permission found][26]continue[27]returnall form GUI elements and full context data[28]set all form context data[29]GetAuditDocument[30]GetComments[31]GetValuesForControls[32]GetValuesForSections[33]GetTaskOwnership[34]GetLookupData[35]GetFieldAccessModel[36]GetAttachmentList[37]GetLastTransitionDetails Form refresh case: B1: update record without workflow transitionEndUserEndUserFormButtonActionSaveRecordFormButtonActionSaveRecordBrowserBrowserFormContextFormContextBackendAPIBackendAPI[01]clickcommon behavior[02]saveRecord[03]saveRecordsave recordRowVersion validationalt[RowVersion_BackendAPI == RowVersion_FormContext][04]continuealt[RowVersion_BackendAPI != RowVersion_FormContext][05]return error: other user modified this documentACL Update permission control[06]check current ACLUpdatepermissionsalt[no permission][07]HTTP error 401: access unauthorizedalt[permission found][08]update record data[09]update additional record data (Audit, ...)ACL Read permission control[10]check current ACLReadpermissionsalt[no permission][11]return record's Id,update record's RowVersion,break sequence without erroralt[permission found][12]updatefull context datawithout running JS script on FormContext change[13]update record Id in URL only,without GUI refresh,keep form state (chosen tabs, etc.)refresh Form OFF no actionsrefresh Form ON refresh form[14]GetFormByRowGuid[15]run action set on form openACL Read permission control[16]check current ACLReadpermissionsalt[no permission][17]HTTP error 401: access unauthorizedalt[permission found][18]continue[19]returnall form GUI elements and full context data[20]set all form context data[21]GetAuditDocument[22]GetComments[23]GetValuesForControls[24]GetValuesForSections[25]GetTaskOwnership[26]GetLookupData[27]GetFieldAccessModel[28]GetAttachmentList[29]GetLastTransitionDetails Form refresh case: B2: call workflow transition via GUI(existing records)EndUserEndUserWorkflowStepButtonWorkflowStepButtonBrowserBrowserFormContextFormContextBackendAPIBackendAPI[01]click[02]call workflow transitionaction set before[03]run action set before(front & backend actions)It is recommended to use the saveRecordAction() actionwith the refreshForm OFF and refreshHeader OFF parametersas the first action in the action set.[04]run non status transitions and connected actionsrun gateways, service tasks, subprocess async.,(support for backend actions only)run target workflow step change status logicACL Update permission control[05]check current ACLUpdatepermissionsalt[no permission][06]HTTP error 401: access unauthorizedalt[permission found][07]continueChange status condition controlalt[condition failed][08]break transition, return condition erroralt[condition passed][09]continueUpdate record[10]calculate new Business Status[11]update record's Business StatusUpdate record's ACL permisssion[12]calculate new set of ACL Permissions[13]overwrite record's ACL Permissionsaction set after[14]run action set after(front & backend actions)It is recommended to use the refreshFormAction() actionas the last action in the action set.
|← Zamknij formularz |↑ Do góry |→ Usuń rekord |

Copyright © 2025 OPTEAM SA. Theme Copyright © 2017-2020 Patrick Marsceill. Distributed by an MIT license.