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-mediationcomponent
- customstep
- custom-outtransport
- custom-error-handler
Route
component's context toolbar.- Open an assembly in the Assembly Editor.
- Add one of these custom elements to the assembly:
- custom-mediationcomponent
- customstep
- custom-outtransport
- custom-error-handler
- Configure the custom element's properties in itsPropertiesview.
- ClickCreate Spring Bean Properties and Java Class, to the right of theSpring Beanfield. The properties that Studio displays vary slightly depending on the custom element type. As you complete the task, consider:
Option Description IdProvide a unique Spring bean identifier.Scope- Selectsingletonto return the same bean instance with each reference.
- Selectprototypeto return a different bean instance with each reference.
PackageSpecify the Java package.NameSpecify the class name.Input TypeSelect 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 TypeSelect the method's output (return) type.Method NameEnter the name of the Java method that you want to define within the Java class. The default value isprocess.Include argument for dynamic endpointSpecifies whether to include an argument for a dynamic endpoint.Annotate Java class to appear in paletteSelect this check box to display the custom element on thePalette. This option adds an annotation to the generated Java class, which is located in thesrcfolder of your assembly project folder.TooltipEnter the text that displays as the custom element's description. - 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.