Skip to main content
Administrator Guide
Last Updated: 2023-06-23
Concept: Custom Assembly Elements

Concept: Custom Assembly Elements

You can create 5 types of custom assembly elements in Workday Studio:
Custom Element
Procedure
Mediation component
Add a
custom-mediation
component from the
Components
category on the
Palette
.
Mediation step
Add a
custom
step from the
Other
category on the
Palette
.
Out transport
Add a
custom-out
transport from the
Out Transports
category on the
Palette
.
Error handler
Add a
custom-error-handler
component from the
Error Handlers
category on the
Palette
.
Routing strategy
Select
Create custom-strategy
from a
Route
component's context toolbar.
In each case, the custom element consists of 3 parts:
  • The underlying Java implementation, which defines the classes and methods used by the element.
  • The Spring bean configuration, which tells Workday how to create instances of the Java classes.
  • The assembly component configuration, which places your custom element on the graphical assembly view.
    Custom assembly elements can access message parts in the normal way when processing incoming data. You can also specify the message part where Workday should direct the custom element's output.
To share a custom element, export the Java package as a binary JAR. Other developers can then add the JAR to their project’s classpath.

Custom Steps

When writing a Java implementation for a
custom
step, consider these points:
  • The method must be declared
    public
    so it can be called from outside the class.
  • The method must be nonstatic.
  • Each method must have a unique name.
  • Parameter lists must match the supported combinations.
  • The method can throw any type of exception.
  • If you don't provide a method name, Workday selects any public method (ignoring getters and setters) with a parameter list matching the supported method signatures. If there's any ambiguity, Workday reports an error during deployment, which you can resolve by specifying a method name.
A
custom
step must provide a method that adheres to one of these signatures:
Signature
Usage
Example
public
return type
method(
input parameter type
input) [throws
any Exception
]
Defines the return type of the method and an input parameter.
public String addTimestamp(byte[] messageContent) throws IOException {
public void method(
input parameter type
input,
output parameter type
output) [throws
any Exception
]
Defines supported input and output parameters.
public void addTimestamp(byte[] messageContent, OutputStream out) throws IOException {
The
custom
step supports these input, return, and output parameter types:
Input Types
Return Types
Output Parameter Types
  • java.lang.String
  • byte[]
  • java.io.InputStream
  • javax.activation.DataHandler
  • javax.activation.DataSource
  • org.w3c.dom.Element
  • org.w3c.dom.Document
  • javax.xml.transform.Source
  • javax.xml.transform.stream.StreamSource
  • javax.xml.transform.dom.DOMSource
  • void
  • boolean
    (
    custom
    step only)
  • java.lang.String
  • byte[]
  • java.io.InputStream
  • javax.activation.DataHandler
  • javax.activation.DataSource
  • org.w3c.dom.Element
  • org.w3c.dom.Document
  • javax.xml.transform.Source
  • java.io.OutputStream
  • javax.xml.transform.Result
If a
custom
step returns a
void
type or a null value, it doesn't alter the mediation message.