Importing a set of dictionary items as a JAR file

This feature is available on request.

The JAR import feature allows you to import Java classes as dictionary items to use them as data models in the Signavio Decision Manager.

Thereby, the attributes and relationships of the classes are created as decision input/output data types.

Preparation and requirements

Before you import the JAR, make sure the target dictionary category supports data modeling (see: Creating a new category).

The classes in your JAR need to fulfill the following requirements:

  • Classes need the @XmlType annotation.
  • Attributes need to be of one of the following data types:
    • String
    • Boolean (and boolean)
    • Number (all subclasses) and int, double, byte, long, float
    • Nested classes (from the same JAR)
    • Collections of the above mentioned data types (no generic collections, as Set<? extends Number>

Examples

The following example shows a Java class that is valid for the import:

package sandbox.jarClasses;
import java.util.Set;
import javax.xml.bind.annotation.XmlType;

@XmlType
public class Relationship {


    private Person      man;
    private Person      woman;
    private Set<Person>   children;
    private boolean     broken;


    public Person getMan() {
        return man;
    }


    public void setMan(Person man) {
        this.man = man;
    }


    public Person getWoman() {
        return woman;
    }


    public void setWoman(Person woman) {
        this.woman = woman;
    }


    public Set<Person> getChildren() {
        return children;
    }


    public void setChildren(Set<Person> children) {
        this.children = children;
    }


    public boolean isBroken() {
        return broken;
    }


    public void setBroken(boolean broken) {
        this.broken = broken;
    }

}

This example can’t be imported, because the class lacks the @XmlType annotation:

package sandbox.jarClasses;

public class NotValid extends Relationship {

  private int justANumber;

  public int getJustANumber() {
      return justANumber;
  }

  public void setJustANumber(int justANumber) {
      this.justANumber = justANumber;
  }

}

Importing the JAR

To import a JAR, proceed as follows:

  1. Open the Dictionary and click Import / Export - import JAR:
Open the import dialog.

Open the import dialog.

  1. Select the JAR file and click Import:
Import the JAR.

Import the JAR.

Now, the JAR’s Java classes are available as dictionary items.

Reload your browser to see the imported items.