Draft Handling
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
When you fill in a long form in a web app, you do not want to lose your work because the browser tab closed, the network dropped or you needed to go to a meeting. A draft is the answer that a RAP application gives: every change you make is stored in a separate "drawer" (the draft table) while the real data stays untouched, and only when you choose Save does the draft replace or become the real data. After this page you can say why drafts exist, enable them in a behavior definition, create the draft table and the total ETag field they need, name the draft actions the framework adds and what each one does, work with drafts from EML, and explain what a Fiori elements app does when its user chooses Edit, Save or Cancel. The page is written against Standard ABAP release 8.16 and ABAP for Cloud Development release 9.20 (2608). It applies to RAP business objects in ABAP Cloud (SAP BTP ABAP environment, SAP S/4HANA Cloud Public Edition) and in SAP S/4HANA on premise. Every listing needs RAP and a behavior definition in an SAP system, so each one is labelled as requiring an SAP system and was not run here.
Before you read
-
RAP Overview: the business object, the interaction phase and the save sequence that drafts extend.
-
RAP Behavior Definitions: the claim
ZI_ExpClaimwith its itemsZI_ExpItemand the behavior definition that this page adds draft lines to. -
Managed, Unmanaged and Unmanaged Save: the two implementation types, because draft works with both.
-
Entity Manipulation Language (EML): the
MODIFY ENTITIESandCOMMIT ENTITIESstatements used in the draft listings.
Key terms
-
Draft handling: the RAP concept that stores the content of the transactional buffer in draft tables, so that one transaction can span several ABAP sessions.
-
Draft table: the database table that holds the draft instances of one entity.
-
Draft indicator: the component
%is_draftthat tells a request whether it is meant for the draft or for the active instance. -
New draft: a draft that has no active instance yet, because the claim is being created.
-
Edit draft: a draft that is a copy of an existing active instance, made so that the claim can be changed.
-
Total ETag: a field of the business object that is changed whenever active data changes, so that a draft can detect that the active data moved on.
-
Draft action: an action that the framework provides for draft business objects, such as Edit, Activate, Discard, Resume and Prepare.
-
Exclusive draft: a draft that only the user who created it may change, activate or discard.
-
Collaborative draft: a draft that several invited users edit together.
The problem that drafts solve
A RAP business object keeps the changes of a conversation in the transactional buffer, a memory area, until the save sequence writes them to the database. That works as long as the same ABAP session sees the whole conversation. Modern cloud apps cannot rely on this. The RAP guide explains that such apps use stateless communication: no ABAP session is reserved for each user, and two requests from the same user may be served by different backend resources. From the end user’s point of view the app is still stateful, because the data typed in has to be locked, validated and enriched by ABAP business logic on the backend.
The draft concept fills that gap. The guide describes the draft as the state of the conversation, stored on the database in shadow tables: an addressable resource that is the exact copy of the active data being edited. Between two roundtrips no ABAP session waits for the next one. The guide lists three benefits.
-
Save and continue: you can stop at any time and continue later, whether or not the data is consistent yet.
-
Staging: the draft is a staging area. Business data is isolated while it is worked on and is saved to the active database only when it is activated.
-
Device switch: because the draft stores the state of the work, it can be resumed from another device.
Drafts are isolated in their own persistence and do not influence existing business logic until activated. The guide also gives the basic principles: the main business logic is written for the active entity (actions, feature control) and applies to draft entities in the same way; there is at most one draft instance for each active instance at a time; and the primary key of a draft and of the corresponding active instance is the same.
Source: RAP: Draft
Active data, new drafts and edit drafts
An instance of a draft business object is always in one of three states, and it helps to learn them with the claim in mind.
-
A claim that is being typed in for the first time exists only as a new draft. It has no corresponding active instance. You create it with the
CREATEoperation and the draft indicator%is_draftset to true. -
When you activate the new draft, it moves from the draft table to the database table of the active data. From then on it is an active instance.
-
When somebody wants to change an existing active claim, the framework copies the whole active instance into the draft table. That copy is an edit draft. It lives beside the active claim until it is activated or discarded.
Source: RAP: Draft Runtime and RAP: Creating Draft Data
Because draft and active data share one key, every request must say which of the two it means. The runtime reads the draft
indicator %is_draft for that. In an OData service the same piece of information is the key component isActiveEntity. The
CREATE that a Fiori elements app sends carries no IsActiveEntity value, which is read as false, so the Create button of
such an app always produces a new draft and never an active instance directly. Through EML you can choose either way, as the
section on EML below shows.
Enabling draft in the behavior definition
Draft handling is switched on once for the whole business object, in the header of the behavior definition. The Keyword
Documentation names two forms: with draft for an exclusive draft, and with collaborative draft, covered at the end of the
page. Draft capabilities cannot be given to a single entity of the object, and both implementation types, managed and unmanaged,
can be draft-enabled. In every case the framework manages the draft for you: the developer does not write the code that stores
draft data in the draft table.
The next behavior definition adds draft handling to the claim of the earlier pages. It is built from the draft-enabled
definitions of the SAP flight reference scenario and of the Keyword Documentation. The names ZI_ExpClaim, ZI_ExpItem,
zbp_i_expclaim, the two draft tables and the field LastChangedAt belong to this example; the claim and item entities are
those of RAP Behavior Definitions, to which the draft lines are added.
managed implementation in class zbp_i_expclaim unique;
strict ( 2 );
with draft;
define behavior for ZI_ExpClaim alias Claim
persistent table zexp_claim
draft table zexp_claim_d
lock master
total etag LastChangedAt
authorization master ( global )
{
create;
update;
delete;
association _Items { create; with draft; }
field ( readonly : update ) ClaimId;
field ( mandatory ) EmployeeId, CurrencyCode, TotalAmount;
field ( readonly ) Status, LastChangedAt;
determination setStatusNew on modify { create; }
validation validateAmount on save { create; update; field TotalAmount; }
action submit result [1] $self;
draft action Edit;
draft action Activate optimized;
draft action Discard;
draft action Resume;
draft determine action Prepare
{
validation validateAmount;
}
mapping for zexp_claim
{
ClaimId = claim_id;
EmployeeId = employee_id;
Status = status;
CurrencyCode = currency_code;
TotalAmount = total_amount;
LastChangedAt = last_changed_at;
}
}
define behavior for ZI_ExpItem alias Item
persistent table zexp_item
draft table zexp_item_d
lock dependent by _Claim
authorization dependent by _Claim
{
update;
delete;
field ( readonly ) ClaimId;
field ( readonly : update ) ItemNo;
association _Claim { with draft; }
mapping for zexp_item
{
ClaimId = claim_id;
ItemNo = item_no;
Category = category;
Amount = amount;
CurrencyCode = currency_code;
}
}
Requires an SAP system; not run here. The behavior pool zbp_i_expclaim and the logic behind setStatusNew, validateAmount and
submit are the ones of the earlier page and are not repeated.
Source: RAP: Adding Draft Capabilities to the Managed Business Object, Keyword Documentation: RAP - with draft and Keyword Documentation: RAP - DraftHandling
What the draft lines mean, in the order they appear.
-
with draft;in the header makes the whole business object draft-enabled. It is the only line that decides between draft and no draft; everything below supports it. -
draft table zexp_claim_dnames the database table that stores the draft instances of the claim. A draft table is mandatory, and every entity has its own, which is why the item entity nameszexp_item_d. -
total etag LastChangedAtnames the total ETag field, explained below. The definition is allowed only directly after thelock masterline. -
association _Items { create; with draft; }andassociation _Claim { with draft; }draft-enable the compositions and the association to the parent. The guide says that as soon as the business object is draft-enabled, all associations inside it are automatically draft-enabled, but the behavior definition asks you to writewith drafton them to make this explicit, and the Keyword Documentation makes it mandatory for a draft business object. The reason is easy to see: a child created below a draft claim must itself be a draft, because an active child below a draft root would break the object. -
The five
draft actionlines declare the draft actions. In strict mode the framework requires them to be declared. They are explained in their own section below. -
draft determine action Prepare { validation validateAmount; }lists the checks that run before a draft becomes active. Only determinations and validations that areon savecan be assigned, and you have to name them explicitly.
The guide adds two things about the logic written for a draft object. If you address the key of an instance with the transactional
key %tky, which includes the draft indicator, your code needs no change when the object becomes draft-enabled. If you use
%key instead, which holds only the application key, the runtime cannot tell draft from active instances and the whole
implementation has to be revised, so the guide recommends using only %tky. And a draft-enabled object needs a method for feature
control in the behavior pool, because feature control is called for every request to find out whether draft or active instances
are requested; if you use no dynamic feature control, the guide asks for the method declaration and an empty implementation.
The draft table
A draft business object needs two database tables for each entity: the active table, here zexp_claim, and the draft table, here
zexp_claim_d. The guide gives the reason as different access patterns: the active table stores many instances that are rarely
touched, the draft table is the other way round, so two tables can each be tuned for their own use. It also guarantees that the
active table stays untouched and consistent for existing database functionality.
The Keyword Documentation lists the rules for a draft table.
-
It has a field for each field of the CDS entity it belongs to, in any order, and the names are those of the CDS entity, which means the alias names if the entity gives aliases. That is why the table below says
claimidwhere the active table saysclaim_id. -
The first field is the client field of type
CLNT. -
Data types and lengths match exactly.
-
A technical include structure, the draft admin include, adds the information the transactional engine needs. It is the predefined structure
SYCH_BDL_DRAFT_ADMIN_INC.
@EndUserText.label : 'Draft table for entity ZI_ExpClaim'
@AbapCatalog.enhancement.category : #EXTENSIBLE_ANY
@AbapCatalog.tableCategory : #TRANSPARENT
@AbapCatalog.deliveryClass : #A
@AbapCatalog.dataMaintenance : #RESTRICTED
define table zexp_claim_d {
key client : abap.clnt not null;
key claimid : abap.char(10) not null;
employeeid : abap.numc(8);
status : abap.char(1);
currencycode : abap.cuky;
@Semantics.amount.currencyCode : 'zexp_claim_d.currencycode'
totalamount : abap.curr(15,2);
lastchangedat : abp_lastchange_tstmpl;
"%admin" : include sych_bdl_draft_admin_inc;
}
Requires an SAP system; not run here. The fields mirror the elements of the view entity ZI_ExpClaim (the claim, the employee,
the status, the currency and the amount) plus the total ETag field added below. The table zexp_item_d for the items is built the
same way from ZI_ExpItem; its field types must equal those of the item table.
Source: Keyword Documentation: RAP - draft table, RAP: Draft Database Table and RAP: Adding Draft Capabilities to the Managed Business Object
You rarely type this table by hand. As soon as the object is draft-enabled, the behavior definition offers a quick fix that
generates the draft table, and the ADT wizard fills in the fields and the admin include. If the table already exists, the quick fix
overwrites it completely. The same quick fix regenerates the table, and the guide makes this your responsibility: whenever you
change the active data model, you must regenerate the draft table to keep the two aligned. With late numbering, the Keyword
Documentation adds a mandatory extra key field DRAFTUUID of type raw(16) to the draft table.
The guide says you must not read or write the draft table with SQL, and the Keyword Documentation words it more softly: technically
possible, not recommended. Its own example shows why. After a DELETE FROM on the draft table with ABAP SQL, creating a draft with
the same key through EML fails, because the draft table also holds metadata that SQL does not remove, so the key still counts
as a duplicate. Clearing a draft table through the framework, with the EML DELETE or with the Discard action, removes the metadata too.
So treat the draft table as private to RAP and reach it through EML only.
The total ETag
Think of an edit draft as a photocopy of an official paper that you took home to mark up. Before you hand your marked-up copy back, someone must check that the original has not been changed in the meantime. In RAP that check is the total ETag.
The guide defines the total ETag as a designated field of a draft business object that enables optimistic concurrency checks during the transition from draft to active data. Optimistic means that nobody is blocked in advance, and the conflict is detected afterwards. The field sits on the database table of the root entity (the lock master) and refers to the complete object: as soon as an instance of any entity of the object changes, the total ETag is updated. When a draft is resumed after its exclusive lock has expired, the total ETag of the draft is compared with that of the active instance, and only if they match can the draft be resumed. Every draft business object must have a total ETag.
For a managed object the framework can update the field itself when two conditions hold: the field is annotated in CDS with
@Semantics.systemDateTime.lastChangedAt: true (the guide adds that the field must have a date-compatible type), and, if the field names differ,
the field is in the mapping of the behavior definition. Otherwise the business logic must set it. For the example, the root table
gets one new field and the root view entity exposes it. This is the one place where this page extends the table of the running
example: the claim table and the view receive a field last_changed_at, LastChangedAt in the view.
define root view entity ZI_ExpClaim
as select from zexp_claim
composition of exact one to many ZI_ExpItem as _Items
{
key claim_id as ClaimId,
employee_id as EmployeeId,
status as Status,
currency_code as CurrencyCode,
@Semantics.amount.currencyCode: 'CurrencyCode'
total_amount as TotalAmount,
@Semantics.systemDateTime.lastChangedAt: true
last_changed_at as LastChangedAt,
_Items
}
Requires an SAP system; not run here. The view is the root view of the CDS pages with the new element, and the association
_Employee is left out to keep the listing short. In the active table zexp_claim the new field is declared as
last_changed_at : abp_lastchange_tstmpl;, the type that the flight reference scenario uses for its total ETag field.
The total ETag is not the same thing as the ETag of etag master, and the guide calls them two sides of the same medal. The
total ETag protects the transition from draft to active data and is compared for all entities of the object. The etag master field
protects an OData consumer: it makes sure that a change request is based on the state the user saw on the screen, and each entity can
be checked on its own. A smoothly running draft application needs both, and the guide recommends separate fields for them, because with
one shared field a change to any child changes the ETag of the whole object. The Keyword Documentation notes that it is recommended to declare
the fields read-only when the managed provider updates them, which is why LastChangedAt is readonly above. The later page on
authorization, locking and concurrency covers etag master itself.
The guide also says that the total ETag field does not have to be included in the projection view, because it is used only for internal processing of draft data.
Source: RAP: Total ETag and Keyword Documentation: RAP - etag
The draft actions
A draft action is an action that the framework provides for a draft business object. You do not write its core; the RAP draft
runtime does. Draft actions are specified only on the lock master entity, because they act on the whole lockable tree of the
object, claim and items together. In strict mode you declare them explicitly, as in the behavior definition above, and the
names are reserved: once the object is draft-enabled, you cannot use Edit, Activate and the other names for your own actions.
| Draft action | What it does | Control |
|---|---|---|
|
Copies an active instance to the draft table, creating an edit draft, and sets an exclusive lock on the active instance. |
Feature control and authorization control can restrict it. |
|
Inverse of Edit. Runs Prepare, then changes the active instance to the state of the draft (an edit draft) or creates it (a new draft), and discards the draft. It does not save to the database: the save comes after it. |
No feature or authorization control: authorization is checked when the active instance is saved. |
|
Deletes the draft instance from the draft table and releases its locks. It works for new drafts and edit drafts and leaves the active instance alone. |
No feature or authorization control: a user can always undo a draft. |
|
Runs when a user continues to work on a draft whose exclusive lock has expired. It recreates the lock on the active instance. |
The checks of Create for a new draft, of Edit for an edit draft. |
|
Runs the determinations and validations that the behavior definition assigns to it, so that draft data can be checked before it becomes active. |
The list of checks is yours. |
|
Used for collaborative drafts: checks whether users may join the draft’s user list, and turns an exclusive draft into a collaborative one. |
See the section on collaborative drafts. |
|
An optional draft action for extra functionality during the save sequence of draft instances. |
Usually declared internal. |
Several details decide how these actions behave in practice.
-
Optimized Activate.
draft action Activate optimized;reduces the number of determination and validation executions in a RAP transaction and can improve performance. The Keyword Documentation recommends always usingoptimized. The prerequisite is that your determinations and validations follow the modelling guidelines of the guide, in particular that they handle draft and active instances identically, because the optimized variant otherwise can impair the runtime behavior. -
Prepare is executed more than once. The guide says Prepare runs at least once before activation, and that a Fiori elements Save runs it at least twice: the app requests Prepare directly, and Activate runs it again. For performance, checks that already ran in the same transaction are not repeated, unless a later change triggers them again, a validation reported a failed key, or the check was assigned with the addition
always. -
Prepare reports, it does not fail. The action fails only if the instance is not found. If a validation inside it finds a problem, the message goes to
REPORTED, andFAILEDstays empty. Only transition messages of validations are passed on toREPORTED; state messages are not. -
Additional implementation.
Edit,Activate,DiscardandResumeaccept the additionwith additional implementation. Your handler method then runs on the same version of the instance as the framework’s own action: the additional implementation of Edit, for example, receives the key with the draft indicator off, because Edit runs on the active instance. -
Internal and feature control. Any draft action can be
internal. Dynamic feature control( features : instance )andauthorization : noneare available for Edit only.
Working with drafts in EML
A draft is addressed in EML like an active instance, with one difference: you say which of the two you mean through the draft
indicator. The statements below follow the examples of the RAP guide, adapted to the claim ZI_ExpClaim with the alias Claim. The
listing creates a new draft, saves it as a draft, prepares and activates it, and finally saves the active claim. All requests
here run in one program for teaching; in a real app each step is usually a separate request from the UI.
" requires an SAP system; not run here
" 1. create a new draft: the draft indicator is on
MODIFY ENTITIES OF ZI_ExpClaim
ENTITY Claim
CREATE FROM
VALUE #( ( %cid = 'claim1'
%is_draft = if_abap_behv=>mk-on
%control-ClaimId = if_abap_behv=>mk-on
%control-EmployeeId = if_abap_behv=>mk-on
%data-ClaimId = 'C-1001'
%data-EmployeeId = '00000042' ) )
REPORTED DATA(create_reported)
FAILED DATA(create_failed)
MAPPED DATA(create_mapped).
" saves the draft instance to the draft table: no validations run
COMMIT ENTITIES.
" 2. check it, then turn it into active data: the draft indicator cannot be set for Prepare
MODIFY ENTITIES OF ZI_ExpClaim
ENTITY Claim
EXECUTE Prepare FROM
VALUE #( ( %key-ClaimId = 'C-1001' ) )
REPORTED DATA(prepare_reported)
FAILED DATA(prepare_failed)
MAPPED DATA(prepare_mapped).
MODIFY ENTITIES OF ZI_ExpClaim
ENTITY Claim
EXECUTE Activate FROM
VALUE #( ( %key-ClaimId = 'C-1001' ) )
REPORTED DATA(activate_reported)
FAILED DATA(activate_failed)
MAPPED DATA(activate_mapped).
" the save sequence writes the active claim to the database
COMMIT ENTITIES.
The listing is derived from the statements of the guide and has not been run. The values 'C-1001' and '00000042' are made up for the example.
Source: RAP: Creating Draft Data, RAP: Creating Active Data and RAP: Preparing Draft Instances for Activation
The other draft actions use the same pattern. Edit creates an edit draft of an active claim and takes a parameter, preserve_changes,
that decides what happens if a draft already exists: set to true, the request is rejected, because the existing draft would otherwise
be overwritten with the active data and the changes in it lost. The default is false, so the guide recommends always passing the
parameter. Fiori elements always passes it as true. Resume and Discard take only the key.
" requires an SAP system; not run here
MODIFY ENTITIES OF ZI_ExpClaim
ENTITY Claim
EXECUTE Edit FROM
VALUE #( ( %key-ClaimId = 'C-1001'
%param-preserve_changes = 'X' ) )
REPORTED DATA(edit_reported)
FAILED DATA(edit_failed)
MAPPED DATA(edit_mapped).
The statements for Resume and Discard have the same shape, with EXECUTE Resume FROM or EXECUTE Discard FROM and only the key in the value.
Source: RAP: Creating Draft Data, RAP: Resuming Locks for Draft Instances and RAP: Deleting Instances of a Draft BO
To address the draft or the active instance of an operation that exists in both versions, put the draft indicator in the request,
as the guide’s delete example does with %is_draft = if_abap_behv=>mk-on|off. A DELETE request on a draft instance fails: you remove
a draft with Discard. (In a Fiori elements app, choosing Delete on a claim that has both an active and a draft version sends a DELETE
for each, and the draft one is treated as a Discard inside the object.)
The last rule concerns saving. After COMMIT ENTITIES the buffer is written: draft instances to the draft table, active instances to the
active table. For active instances the save sequence runs. For draft instances only the actual write happens, with no validations or
determinations on save, and no FINALIZE or CHECK_BEFORE_SAVE. That is why a draft may be inconsistent. Consistency is demanded
when it is activated.
What a Fiori elements app does
The pages on projections and services come later in this section; here the guide’s description of how a Fiori elements app maps its buttons to draft actions is enough.
Source: RAP: Draft Runtime, RAP: Runtime Activate Action, RAP: Saving Data to the Database and RAP: Preparing Draft Instances for Activation
-
The Create button sends a
CREATEwith the draft indicator on, producing a new draft. The Edit button exists only on the object page of an active instance and triggers the Edit action withpreserve_changestrue. -
While the user types, the state of the application buffer goes to the draft table each time an input field is left, field by field, and the app shows the message "Draft saved" after each roundtrip. No validation runs at that point.
-
The Save button sends Prepare, then Activate, and then the save sequence starts automatically. The Activate action alone does not save to the database; the save is a separate step.
-
The Cancel button invokes Discard. The guide states that Discard is always enabled, because a user can always undo a draft.
-
If the user returns to an own draft whose exclusive lock has expired and continues typing, the update on the draft invokes Resume. If the user opens a draft of somebody else and chooses Edit, the only option is to discard that draft and start a new one from the current active data, after a warning that the other user’s changes are lost.
Locks, drafts and the total ETag
Drafts are tied to locking, which the locks page covers from the lock side. In the draft view, the guide says that working with a draft always sets an exclusive lock. For an edit draft, nobody else can change the corresponding active instance; for a new draft, the key is locked so that no duplicate key can be created. During this exclusive phase no active or draft instance with the same key can be created. After the lock has expired, the draft is in an optimistic lock mode. If the user starts again, the Resume action locks the active instance again and compares the total ETag. If it matches, the draft continues in exclusive mode. The same key-uniqueness issue applies when resuming, because another user may have created an instance with the same key meanwhile.
Exclusive and collaborative. In an exclusive draft, the creator is the only owner: only that user may modify, activate, resume or
discard the draft. With with collaborative draft, several users work in parallel on the same draft instance, see each other’s updates and do not lock each other out. You must also declare the
draft action Share, which is called when a user is invited to the draft’s user list or joins it, checks whether that user is allowed,
and grants read-only access to users who may not edit. The Keyword Documentation says collaborative drafts also work in cross-BO
scenarios if both business objects are collaborative and fully draft-scope enabled. For data protection, the guide asks you to
protect active data with read restrictions in the root entity’s data control language (DCL), and, where a draft query view is used,
to add a DCL to it too, and to check create, update and delete operations so that users who may not edit cannot be added.
Limits and things to watch
| Situation | What to know |
|---|---|
Draft logic written with |
The runtime cannot tell draft from active instances. Use |
Draft table out of step |
After every change to the active table or the view entity, regenerate the draft table with the quick fix, or the object fails. |
Unmanaged object, child deleted and re-created |
Activation sends one modify request to the unmanaged provider. If a draft child is deleted and a new child with the same key is created in the same logical unit of work, the order is not defined, and a short dump can result. The guide says to combine the delete and the create-by-association in one handler method and to run the delete first. |
Unmanaged object, unsupported draft features |
On draft instances, create by association over associations that are not compositions, direct creates on child instances, client-independent CDS views and associations with |
A child entity with its own draft capability |
Not possible: draft is defined for the whole business object. |
Projection and interface behavior definitions |
Draft handling of the base object is reused with |
What older books show, and what has changed
Draft handling grew over several releases. Older RAP texts, among them the 2019 book on the RAP model that the bibliography of this
section lists, were written for early releases and describe the model of that time. The optimized variant of Activate, the collaborative
draft and the Prepare action as described here come from the current guide and Keyword Documentation, so for those follow the current
official pages. The Keyword Documentation glossary also lists a draft provider for objects built on the older BOPF framework, in addition to the
managed draft provider of RAP; see the page on BOPF and the Fiori programming model for the old world.
Summary
-
A draft stores the work in progress of an edit in a draft table, so that stateless backends, closed browsers and device changes do not lose it.
-
with draft;in the header of the behavior definition draft-enables the whole object, managed or unmanaged; each entity needs a draft table, and the total ETag and the draft actions are declared on the root. -
A draft is a new draft (no active twin) or an edit draft (a copy of an active instance); draft and active instance share the key and are told apart by
%is_draft, which is why code should use%tky. -
The total ETag field lets the framework detect, when a draft is resumed, that the active data changed in the meantime.
-
The draft actions Edit, Activate, Discard, Resume and Prepare move data between draft and active; saving a draft runs no validations, and Prepare runs the checks before activation.
-
Treat the draft table as private to RAP and reach it only through EML.