Namespaces
Workrunner supports the mostly used namespaces in XML standard. Namespaces list allows to import data models or assign prefix for used namespaces.
What is namespace?¶
XML namespaces are used for providing uniquely named elements and attributes in an XML document.
A simple example would be to consider an XML instance that contained references to a customer and an ordered product. Both the customer element and the product element could have a child element named id. References to the id element would therefore be ambiguous; placing them in different namespaces would remove the ambiguity.
Process Namespace¶
In Workrunner after you define your data model, it's namespace is set to empty by default. Using empty namespace is not harmful but you may want to set an namespace to your data model if you need to exchange data with other external applications.
Adding a new namespace with empty prefix will change your data model schema to new namespace and all of your data is now stored in declared namespace URI.
Importing Namespaces¶
If you have an external system and need to use it's data types in your model; you can add it as a new namespace and provide XML Schema Location to load. If you specified a schema location Workrunner will be try to download schema and store in "External Xml Schema Sets" to use. If schema is not accessible from network you can manually add (with basic copy and paste) XSD file content to "External Xml Schema Sets".
Registered Namespaces¶
Workrunner provides couple of namespaces to make easier process development.
Workrunner Forms
Contains generic and basic data models. To import Workrunner forms namespace please use http://schemas.workrunner.io
namepace and same location.
After you import namespace you can use following data models:
Identity
Specifies an identity like Organization Unit, Position, User or Group. Identity element contains id number of identity with Caption, Type, Domain attributes.
Workrunner form designer recognizes this data type proposes to use identity picker control.
Scripting with Namespaces¶
You can access data model elements as usual in process namespace even you define a namespace. For example following script will continue run as usual
var customers = $Xml.Select('Customers/Customer');
If you need to access other namespaces you need merge prefix and element names with
var orders = $Xml.Select('Customers/Customer//ext:Order');