The SFM import function of FLEx expects subentries to only be at the end of an entry. For subentries of senses, we have to "masquerade" them as Variants for the import, since Variants are allowed to be inside Senses. After the import, we run a script that "takes off the costume"--that is, it turns them back into subentries (actually Complex Forms, as FLEx calls them).
Below is a big picture outline of the steps for this process. Each is a link to a page with more details.
To download the scripts and find other explanation with examples, visit the DLS GitHub repo SubentryPromotion.
Below is a list of the main steps, to give you the "big picture" of the process. Starting with Step 2, there are links that take you to a more detailed description of those big picture steps. If you prefer to see all of the details in a single document, all of those detailed instructions are included this single document: Review of All Details for Subentry Promotion At one time, the contents of both versions were identical, but over time, edits have happened in one or the other that didn't necessarily get update in both, so there may be slightly different perspectives in each.
Main steps:
Prep work: Please be sure you have an SFM file on which you have worked through all the preceding sections, up through the parts of section 5. Adjustments for Toolbox/FLEx differences about "C. Verify Homograph Numbers" and "D. Check Cross References". It is also helpful to work through as much of E. Normalize POS Values as you can without actually running the Fix-POS-NNN.pl script. That will be applied below.
Modify the empty FLEx database to prepare for the import
Prepare the SFM file:
Use the script se2lx.pl as described in Promote subentries in the SFM file to promote the subentries and add the special tag.
Apply the FixPOS-NNN.pl script, if that hasn't been done already.
Import your SFM file into FLEx and then make a backup. (The import procedure is described in Section A of 7. Import into FLEx, but there will be more steps from that section that you will need to go back to and complete later.)
Run the Var2Comp script over the resulting FLEx project, as follows:
Prepare a folder just for the Var2Comp process
Adjust the settings files for the Var2Compform process
Continue on with the parts of 7. Import into FLEx that you haven't done yet.