Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,356 changes: 2,356 additions & 0 deletions handoff/18-1721/18-1721.plan.json

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions handoff/18-1721/CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Form: 18-1721 plan sha256: 4e852e2b13b2b8828481fafc7f2855d17e477267a338d3866b0e54d93a24f50c session: https://partner-workshops.devinenterprise.com/sessions/060b9626e9ad430186f22f341a34278b
Migration-stack version used: v17.0.30 (commit 5a710c0) is the reference documented in knowledge/quadient-designer.md; the partner's actual release is unknown - record it Designer version: Quadient Inspire Designer 17.0.436.3 (WorkFlow export version of Forms_18-1721 (AEM to Quad).xml)

Importer: none named. designer_importer is `none` for this session; G5 stays `external` until a person with
Designer access runs this checklist and the import log is recorded under src/fixtures/import_logs/<sha256>.json.

Package contents:
- 18-1721.plan.json build plan emitted by tools.pipeline (G1 pass, G2 pass); do not edit by hand
- CimBuildPlanImport.groovy migration-stack importer (draft, untested against a live Designer)
- decisions.manual.yaml defer records filtered from src/decisions/18-1721.yaml
- CHECKLIST.md this file

Plan facts the importer should expect: 77 variables (all unresolved pending pairing confirmation),
109 decisions_required (77 target-variable decisions and 32 checkbox/radio rendering decisions), and 2 skipped controls (both DateField1 image controls per UNS-09).
G0 static-text coverage is 0.8776 (< GOV-01 0.95), so target names remain deferred pending pairing confirmation. No composed PDF or fixed input data was supplied; the G6 comparison step cannot be performed.

1. In migration-examples (migration-config.toml and project-config.toml set, inspireOutput = "Designer"):
BUILD_PLAN=<path to plan> ../gradlew CimBuildPlanImport
../gradlew DeployStyles
../gradlew DeployDocumentObjects
Paste the full console output of all three below, unedited, and attach report/*-deployment-report-*.csv.
Record defaultTargetFolder and the ICM path of the deployed .wfd.
2. Open the deployed .wfd in Designer and export it as XML (Designer's generic XML export). Record its
filename and sha256.
3. For each defer item listed in decisions.manual.yaml, say done / not done / not applicable. Resolve each
checkbox/radio rendering decision listed by the plan as part of Designer review.
4. A composed PDF and fixed input data were not supplied for this form, so the G6 comparison step cannot be done.

Target: icm://<defaultTargetFolder>/18-1721.wfd Deployment report: <csv filename>

Console output:
<paste>

Manual items:
- Review every defer record in decisions.manual.yaml in order and record done / not done / not applicable.
- Resolve the plan's checkbox/radio rendering decisions (glyph and radio grouping) in Designer.

Exported XML: <filename> <sha256> Composed PDF: not supplied; G6 comparison not performed
128 changes: 128 additions & 0 deletions handoff/18-1721/CimBuildPlanImport.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
//! ---
//! displayName: customer CIM build plan
//! category: Parser
//! description: Import a build plan produced by converters/cim_to_inspire/build_plan.py into the Migration Model
//! sourceFormat: AEM Forms XDP (via CIM build plan JSON)
//! ---
//
// STATUS: DRAFT, NOT EXECUTED. This script has never been run against the
// migration-stack because Gradle/Maven Central and Inspire Designer are not
// reachable from the environment it was written in. Treat every builder call
// as a hypothesis until a Quadient practitioner runs it (see gate G5).
//
// Usage (from a migration-examples checkout, after copying this file next to
// the other parsers): set BUILD_PLAN to the path of <form>.plan.json.
package com.quadient.migration.example.customer

import com.quadient.migration.api.Migration
import com.quadient.migration.api.dto.migrationmodel.PageOptions
import com.quadient.migration.api.dto.migrationmodel.builder.DocumentObjectBuilder
import com.quadient.migration.api.dto.migrationmodel.builder.ParagraphStyleBuilder
import com.quadient.migration.api.dto.migrationmodel.builder.TextStyleBuilder
import com.quadient.migration.api.dto.migrationmodel.builder.VariableBuilder
import com.quadient.migration.shared.Alignment
import com.quadient.migration.shared.DataType
import com.quadient.migration.shared.DocumentObjectType
import com.quadient.migration.shared.Size
import groovy.json.JsonSlurper

import static com.quadient.migration.example.common.util.InitMigration.initMigration

Migration migration = initMigration(this.binding)

def planPath = System.getenv("BUILD_PLAN")
assert planPath : "BUILD_PLAN env var must point to a <form>.plan.json"
def plan = new JsonSlurper().parse(new File(planPath))
assert plan.plan_version == "1.0" : "unsupported plan_version ${plan.plan_version}"

for (v in plan.variables) {
migration.variableRepository.upsert(
new VariableBuilder(v.id)
.name(v.name)
.dataType(DataType.valueOf(v.data_type))
.originLocations(v.source_soms)
.addCustomField("resolution", v.resolution)
.build())
}

for (s in plan.text_styles) {
migration.textStyleRepository.upsert(
new TextStyleBuilder(s.id).definition {
it.fontFamily(s.font_family)
it.size(Size.ofPoints(s.size_pt as double))
it.bold(s.bold)
it.italic(s.italic)
it.underline(s.underline)
}.build())
}

for (p in plan.paragraph_styles) {
migration.paragraphStyleRepository.upsert(
new ParagraphStyleBuilder(p.id).definition {
it.alignment(Alignment.valueOf(p.alignment))
}.build())
}

// Children first so every documentObjectRef points at an upserted object.
def blocksById = plan.blocks.collectEntries { [(it.id): it] }
def emitted = [] as Set
def emitBlock
emitBlock = { block ->
if (emitted.contains(block.id)) return
for (childId in block.child_block_ids) emitBlock(blocksById[childId])
def builder = new DocumentObjectBuilder(block.id, DocumentObjectType.Block)
.name(block.name)
.internal(true)
.addCustomField("cim_container", block.container_id)
.addCustomField("role", block.role)
for (para in block.paragraphs) {
builder.paragraph {
it.styleRef("${para.style_id}_para")
if (para.kind == "text") {
it.text { t -> t.styleRef(para.style_id); t.string(para.text) }
} else if (para.kind == "variable") {
it.text { t ->
t.styleRef(para.style_id)
if (para.caption) t.string(para.caption + " ")
t.variableRef(para.variable_id)
}
} else {
throw new IllegalStateException("unknown paragraph kind ${para.kind}")
}
}
}
for (childId in block.child_block_ids) builder.documentObjectRef(childId)
migration.documentObjectRepository.upsert(builder.build())
emitted.add(block.id)
}
for (block in plan.blocks) emitBlock(block)

for (page in plan.pages) {
def builder = new DocumentObjectBuilder(page.id, DocumentObjectType.Page)
.internal(true)
.options(new PageOptions(Size.ofMillimeters(page.width_mm as double), Size.ofMillimeters(page.height_mm as double)))
for (area in page.areas) {
builder.area {
it.position { pos ->
pos.left(Size.ofMillimeters(area.left_mm as double))
pos.top(Size.ofMillimeters(area.top_mm as double))
pos.width(Size.ofMillimeters(area.width_mm as double))
pos.height(Size.ofMillimeters(area.height_mm as double))
}
it.flowToNextPage(area.flow_to_next_page)
it.documentObjectRef(area.block_id)
}
}
migration.documentObjectRepository.upsert(builder.build())
}

def template = new DocumentObjectBuilder(plan.template.id, DocumentObjectType.Template)
.name(plan.form_code)
.addCustomField("source_sha256", plan.source_sha256)
.addCustomField("skipped_nodes", plan.skipped.size().toString())
.addCustomField("decisions_required", plan.decisions_required.size().toString())
for (pageId in plan.template.page_ids) template.documentObjectRef(pageId)
migration.documentObjectRepository.upsert(template.build())

println "upserted ${plan.variables.size()} variables, ${plan.blocks.size()} blocks, ${plan.pages.size()} pages for ${plan.form_code}"
println "skipped ${plan.skipped.size()} nodes; ${plan.decisions_required.size()} human decisions outstanding"
Loading
Loading