Designer:Web Components/Decision Table

From FlexRule Wiki
Jump to: navigation, search

The Decision Table editor is a web component based on JavaScript and HTML DOM which allows you to simply integrate the authoring experience into your web application. You can apply your own style by overriding its CSS configuration.

Download

Download and install FlexRule Designer from http://download.flexrule.com and in the Samples folder you will see project and libraries for WebComponents.

Glossary

The editor supports a glossary and it loads business terms, values and expressions from the glossary.

DT-glossary.png

Ordering Columns

The Decision Table editor allows users to reorder the columns simply by dragging the column header's handle and dropping it into the new location.

DT-move-column.png

Ordering rows

The Decision table editor allows users to reorder the rows simply by finding a empty space in a row, dragging it and then dropping it in the right location.

DT-move-row.png

API

Loading

// Creates the decision table editor from an HTML element
// return: reference to decision table editor
toDecisionTable()
 
// Load the decision table content
// content: string content of decision table in XML format
loadDecisionTable(content)

Generate Decision Table

// Generates the XML representation of Decision Table
getDecisionTable()

Properties

// Returns the type of Decision Table: Validation, Decision 
getTableType
 
// Sets type of Decision Table: Validation or Decision (default is validation)
setTableType(type)
 
// Returns processAll attribute of decision table
getProcessAll
 
// Sets processAll attribute of decision table
setProcessAll(processAll)
 
// Returns name attribute of decision table
getName
 
// Sets name attribute of decision table
setName(name)

Glossary

// Creates the decision table editor from an HTML element
// return: reference to the Decision Table editor
clearGlossaries()
 
// Retrieve list of glossaries addresses (uri)
getGlossaries()
 
// Loads a new glossary to the Decision Table
// glossary: content of the glossary document to import into the editor
loadGlossary(glossary)

Columns

// Lists of columns on decision table
getColumns()
 
// Update the columns of the Decision Table
updateColumns(columns)
 
// Creates a new 'Condition' on the Decision Table
createColumnCondition(column)
 
// Creates a new 'Action' on the Decision Table
createColumnAction(column)
 
// Creates a new action 'Notice' on the Decision Table
createColumnNotice(column)
 
// Deletes the current selected column
deleteColumn
 
// Deletes a column by index
deleteColumnByIndex

Rows

// Adds a new row to the Decision Table
addNewRow()
 
// Deletes the current row from the Decision Table
deleteRow()

Parameters

Visit Signature of rules in web editors using JavaScript

More

  1. Decision Table
  2. Flow and Workflow
  3. Natural Language