Skip to main content

Edoras Adapter

To render form definitions generated in the Flowable Design editor provided in Edoras One you need to adapt them to the new form specification. This adapter is only intended for supporting old versions of the edoras one product form definitions. EdorasAdapter provides the following methods:

Methods

cleanBooleans(formDefinition);
mergeExtra(formDefinition);
handleColumns(formDefinition);
handleAccordions(formDefinition);
handleWizards(formDefinition);
handleTextComponent(formDefinition);
handleEditable(formDefinition);
handleIsVisible(formDefinition);
handleAutocompletes(formDefinition);
handleDataSourceProperties(formDefinition);
handleDates(formDefinition);
handleList(formDefinition);
handleDescription(formDefinition);
handleUploaders(formDefinition);
handleLinks(formDefinition);
handleTextAreas(formDefinition);
handleShowBorder(formDefinition);
handleSubforms(formDefinition);

transformFormDefinition

All these methods adapt the old formDefinition for backwards compatibility support.
To apply them all, just call:

transformFormDefinition(formDefinition) 

Additional methods

expandSubforms

This method adapts the subform definitions (multi-type subforms are no longer supported):

expandSubforms(formDef: FormLayout, formDefinitionFetcher: (ref: string) => Promise<FormLayout>) 

addDefaultOutcomes

This method adds an outcomeButtonGroup type in the formDefinition if it doesn't exist and provides default outcome buttons like: saveButton and completeButton.

addDefaultOutcomes(formDefinition);

Import & Use

In order to use any of these methods just import the edorasAdapter.

import { edorasAdapter } from "@flowable/forms";
edorasAdapter.transformFormDefinition(/*my_form_definition*/);