STEP INTO THE WORLD OF TECHNOLOGICAL INSIGHTS AND INNOVATION

XSL, XSLT, and XPath in Workday® Studio

Mar 30, 2016

XSL-XSLT and XPath in Workday® Studio

One of the biggest concerns of organizations that use enterprise software platforms is connectivity. If a company’s business applications don’t work together, there is little chance it can be competitive at today’s speed of business.

To maintain its commitment to business integration for its customers, Workday® provides pre-built connectors to many vendors, toolkits for integration types such as payroll, and a simple integration builder for business users. For more complex integrations, it provides a complete developer tool.

Integration Tools for Developers

Workday®’s most powerful integration platform is Workday® Studio, a graphical developer tool for building sophisticated data integrations and transformations. It gives developers full control over integrations, making it possible to connect to any application using any of the commonly used Web transports and frameworks.

Workday® provides pre-built components which developers can manipulate in integration flows. As a developer, you can assemble these components to split, transform, loop, route, validate, wrap, or perform any other operation. The platform displays components in a graphical representation of the integration flow to make it easier to understand, configure, and troubleshoot.

The Language of Data

Workday® recommends using XSL, XSLT, and XPath operations to transform data. These tools are powerful, but to use them effectively you need to understand their limitations. Workday® loads message into memory as DOM objects, so large documents will create bottlenecks or cause a server to abort the operation. We can recommend some best practices to avoid the problems that large documents cause.

Best Practices

Use Streaming. STX transforms documents without building a document tree in memory. It works well if the sequence of items or elements in the output is similar to the input document. Complex transformations, however, require using STX buffers or Java Bean objects to temporarily store data.

Split Large Documents. For large, complex documents, use a split-transform-aggregate sequence to reduce the size of DOM objects in memory. To ensure scalability, assume your documents will grow over time.

Use Simple Expressions. Complex MVEL expressions can have high performance overhead. Break down complex or heavily nested XPath evaluation statements into a sequence of simpler expressions. If you use a complex expression, consider using XSLT, static methods, or custom Beans instead of MVEL.

MVEL and XPath. xpathF.text has a 1,000,000 character limit. It is best not to use it. Considering the performance overhead of large DOM objects, it is best not to use xpath and xpathB in MVEL template @if conditions.

Avoid Recursive Operations. Rootless XPath queries will evaluate every node in an object, and recursive calls in custom functions will tend to create never-ending loops.

Use XSLT 2.0. To maintain compatibility, use XSLT 2.0 with the Saxon Transformation Factory in XSLT steps. The best practice is to use the tools present in the developer interface since they have been proved compatible.

Use Text Schema instead of XSLT or STX for formatting number or date-time values. In additional defining the structure of a text document, Text Schema defines formatting rules for numeric and date-time values. It is much cleaner.

XSLT Functions are better for complex logic than templates when you need to return these values:

  • Sequences of atomic values.
  • A sequence of existing nodes. Call a function using the select or test attribute to help the XSLT processor navigate input document nodes.
  • A new node or element when the input to the function is a single note or element.

Use Decimals instead of Double. In XML Schema, the IEEE 64-bit double is subject to precision and rounding errors. Also, the XPath fn:number(node) returns a double.

Use Strongly Typed Variables so you don’t have to explicitly convert values every time you evaluate them. They also simplify logic in XSLT in conditional and choice operations. It also helps to define the data type when you are sorting to avoid unexpected sort behavior.

Always check the latest information on the Workday® Community if you are unsure about how to use the components in Workday® Studio. Careful planning up front will save a lot of headaches downstream.

Pixentia is a full-service technology company dedicated to helping clients solve business problems, improve the capability of their people, and achieve better results.

Download My E-Book

Previously:  Next up: 

Share

News Letter Sign up

Get in touch with us
phone_footer.png  +1 903-306-2430,
              +1 855-978-6816
 
contact-us.jpg