Imixs Workflow ...the open source workflow technology

API

XML

The Imixs Workflow API provides a subcomponent supporting a XML API. The component is defined by the maven artifact imixs-workflow-xml.

This XML API is used in different components of the Imixs Workflow Framework. If you plan to develop a xml interface to the Imixs Workflow like the JEE Rest Service or JEE Web Service this XML API helps you developing such interfaces.

Dataobjects

The Imixs XML API make use of the service dataobjects defined by the package org.imixs.workflow.services.dataobjects.

XML Schema

The purpose of a XML Schema is to define the legal building blocks of an XML document. XML Schemas are used in the Web Service description language (WSDL) to define data objects but also in other components of the Imixs Workflow framework.

The Imixs XML subcomponent describes a XML Schema to be used in XML interfaces. This schema can be used for different requirements but the Imixs JEE Services are the main purpose for this schema.

The following code shows the XML schmea which can be saved in a .xsd file. Thuch a schema file is part of the Imixs JEE Workflow components.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
        targetNamespace="http://imixs.org/workflow/services/dataobjects"
        xmlns:imixs="http://imixs.org/workflow/services/dataobjects"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema">

        <xsd:complexType name="EntityCollection">
                <xsd:sequence>
                        <xsd:element name="entity" type="imixs:Entity"
                                minOccurs="0" maxOccurs="unbounded" />
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="Entity">
                <xsd:sequence>
                        <xsd:element name="item" type="imixs:Item" minOccurs="0"
                                maxOccurs="unbounded" />
                </xsd:sequence>
        </xsd:complexType>

        <xsd:complexType name="Item">
                <xsd:sequence>
                        <xsd:element name="name" type="xsd:string" />
                        <xsd:element name="value" type="xsd:anyType" minOccurs="0"
                                maxOccurs="unbounded" />
                </xsd:sequence>
        </xsd:complexType>

</xsd:schema>

The reserved Namespace for this XML schema is "http://imixs.org/workflow/services/dataobjects. As explained before the schema is also mapped to java classes in the package.

  org.imixs.workflow.services.dataobjects

The following section explains the XSD datatypes in more detail:

EntityCollection

The EntityCollection is a complex data type containing a collection of Entity objects. This datatype is typical used in service methods returning a collection of workitems or other entity objects. Typical a worklist provided by the Imixs Workflow Manager is represented as an EntityCollection in a service definition like the Imixs Web Services or the Imixs REST Service.

This data type can be mapped to the java class

  org.imixs.workflow.services.dataobjects.EntityCollection

Entity

The Entity data type holds a collection of item objects. The Entity represents a single workitem or document structure containing a collection of items. The wrapper class for this complex data type is the class org.imixs.workflow.ItemCollection defined in the Imixs Workflow API

This data type can be mapped to the java class

  org.imixs.workflow.services.dataobjects.Entity

Item

The Item data type represents the basic data object inside this schema definition. The Item is a complex data type containing a key value pair to a set of different datatypes. Every Item is defined by its name element and contains a unbounded collection of values. The Value element is defined as a "xsd:anyType" element. This element is defined by the namespace "http://www.w3.org/2001/XMLSchema". So this kind of elements can contain any XML basic data type.

Datatype mapping

The data types can be mapped on different plattforms. The following section will give a short overview about the usage of datatypes in the Java and the .NET plattform.

XML Schema Type Java type .NET type
xsd:byte Byte,byte
xsd:boolean Boolean,boolean boolean
xsd:short Short,short
xsd:int Integer,int
xsd:long Long,long
xsd:float Float, float float
xsd:double Double, double double
xsd:string java.lang.String string
xsd:dateTime java.util.Calendar dateTime
xsd:integer java.math.BigInteger
xsd:decimal java.math.BigDecimal decimal