Search in sources :

Example 1 with DataObjectFormAdapter

use of org.kie.workbench.common.forms.migration.tool.pipelines.basic.impl.DataObjectFormAdapter in project kie-wb-common by kiegroup.

the class FormDefinitionGenerator method doExecute.

@Override
public void doExecute(MigrationContext migrationContext) {
    migrationContext.getSummaries().removeIf(this::basicSummaryCheck);
    DataObjectFormAdapter dataObjectAdapter = dataObjectFormAdapterFunction.apply(migrationContext);
    List<FormMigrationSummary> possibleDataObjectForms = dataObjectAdapter.migrateSummaries();
    if (!possibleDataObjectForms.isEmpty()) {
        arrangeNestedForms(possibleDataObjectForms, possibleDataObjectForms);
    }
    BPMNFormAdapter bpmFormAdapter = bpmFormAdapterFunction.apply(migrationContext);
    List<FormMigrationSummary> possibleBPMNForms = bpmFormAdapter.migrateSummaries();
    if (!possibleBPMNForms.isEmpty() && !possibleDataObjectForms.isEmpty()) {
        arrangeNestedForms(possibleDataObjectForms, possibleDataObjectForms);
    }
    if (!migrationContext.getExtraSummaries().isEmpty() && !possibleDataObjectForms.isEmpty()) {
        arrangeNestedForms(migrationContext.getExtraSummaries(), possibleDataObjectForms);
    }
}
Also used : BPMNFormAdapter(org.kie.workbench.common.forms.migration.tool.pipelines.basic.impl.BPMNFormAdapter) DataObjectFormAdapter(org.kie.workbench.common.forms.migration.tool.pipelines.basic.impl.DataObjectFormAdapter) FormMigrationSummary(org.kie.workbench.common.forms.migration.tool.FormMigrationSummary)

Aggregations

FormMigrationSummary (org.kie.workbench.common.forms.migration.tool.FormMigrationSummary)1 BPMNFormAdapter (org.kie.workbench.common.forms.migration.tool.pipelines.basic.impl.BPMNFormAdapter)1 DataObjectFormAdapter (org.kie.workbench.common.forms.migration.tool.pipelines.basic.impl.DataObjectFormAdapter)1