Previous Topic

Book Contents

Book Index

Next Topic

Reuse Transaction and Committable

Reuse Transaction

The 'Reuse Transaction' property of action mapping (tab 'Assign Actions to GUI') is related to the following question: When an action is called from an open editor (i.e. during the process of editing of a business object), should the action run in synchronization with the "main" editing process (the edit performed in the editor from which the action was called) or should it be processed independently?

The answer to this question depends on the actual situation. For example:

  1. The 'Ticket' object has a relation attribute 'Reported / Requested by'. To assist in person assignment, the 'New: Incident' editor provides action 'Search and assign existing resource'. The result of this action modifies the ticket itself and the action should be run within the same database transaction.
  2. The 'Edit: Incident' editor provides action 'Edit Person' for the 'Reported by' reference view. The result of this action does not modify the ticket itself but rather the referenced person. (The action is merely provided as a shortcut for fast access to the related person object.) Editing the person is an action independent from editing the ticket and it should run in a separate database transaction.

The 'Reuse Transaction' property of the mapped action has the following meaning:

  • Reuse Transaction = True

    The mapped action shares the database transaction of the editor from which it has been called. From the user's point of view, edits made in both the primary and secondary editor are saved by action 'Save' called in the primary editor.

  • Reuse Transaction = False

    A new database transaction is started for the mapped action. Edits made in the primary and secondary editor are saved independently. Change of data made in the secondary editor is propagated to the corresponding reference view in the primary editor.

    Example: The 'Location - Room' editor contains a section 'Address' which displays a reference view of the linked 'Location - Address' object. With 'Reuse Transaction' = False, when 'Location - Address' is opened for editing by clicking the 'Edit' button in the referenced view, the changed data is saved by calling the 'Save' action in the 'Location - Address' editor. This change is the propagated to the reference view in the 'Location - Room' editor.

Note that possible choices for 'Reuse Transaction' may be limited by options applied at the start node level of the workflow underlying the mapped action. See topic 'Reuse Transaction and Committable for actions and workflows' for more information.

Committable

The 'Committable' property of action mapping (tab 'Assign Actions to GUI') determines if running the action should result in the database transaction being committed. Typically, running action 'Save' in an editor results in the database transaction being committed and kept open for further processing. The 'Save' action will thus be mapped to the editor with 'Reuse Transaction = True' and 'Committable = True'.

On the other hand, linking a person to a ticket (which modifies the ticket itself and thus should be run within the same transaction) should not result in the transaction being immediately committed. The ''Search and assign' action will be mapped to the editor with 'Reuse Transaction = True' and 'Committable = False'.

See Also

Selected Actions

Common Properties

Catalog Properties

Editor Properties

Relation Properties

Reuse Transaction and Committable for actions and workflows