Skip to main content
Administrator Guide
Last Updated: 2023-06-23
Create Custom Java Classes and Spring Beans

Create Custom Java Classes and Spring Beans

Create an assembly project.
You can create 4 custom assembly elements from the
Palette
in Workday Studio:
  • custom-mediation
    component
  • custom
    step
  • custom-out
    transport
  • custom-error-handler
A fifth custom element, custom routing strategy, is available from the
Route
component's context toolbar.
  1. Open an assembly in the Assembly Editor.
  2. Add one of these custom elements to the assembly:
    • custom-mediation
      component
    • custom
      step
    • custom-out
      transport
    • custom-error-handler
  3. Configure the custom element's properties in its
    Properties
    view.
  4. Click
    Create Spring Bean Properties and Java Class
    , to the right of the
    Spring Bean
    field. The properties that Studio displays vary slightly depending on the custom element type. As you complete the task, consider:
    Option Description
    Id
    Provide a unique Spring bean identifier.
    Scope
    • Select
      singleton
      to return the same bean instance with each reference.
    • Select
      prototype
      to return a different bean instance with each reference.
    Package
    Specify the Java package.
    Name
    Specify the class name.
    Input Type
    Select the input type to pass to the Java method. You don't need to specify implementation details for accessing the message part and converting it to the appropriate type. Workday inspects the method's first parameter and converts the message part to the same type.
    Output Type
    Select the method's output (return) type.
    Method Name
    Enter the name of the Java method that you want to define within the Java class. The default value is
    process
    .
    Include argument for dynamic endpoint
    Specifies whether to include an argument for a dynamic endpoint.
    Annotate Java class to appear in palette
    Select this check box to display the custom element on the
    Palette
    . This option adds an annotation to the generated Java class, which is located in the
    src
    folder of your assembly project folder.
    Tooltip
    Enter the text that displays as the custom element's description.
  5. Save the assembly.
Studio generates the Java class representing the custom element within the package specified. It also adds a reference to the new custom Spring bean at the bottom of the assembly.xml file.
Add the required code to your custom Java class.