Skyway Builder 6.2 Feature Preview – #2 Invoke Java Step (Inline)
For my second post on new Skyway Builder 6.2 features, I want to highlight some improvements to the Invoke Java Step. This step was introduced in Skyway Builder 6.1 Community Edition (CE), but it hasn’t been available to Enterprise Edition (EE) users until 6.2. The Invoke Java step lets you invoke pre-written Java code from your Actions. As a developer is sequencing various Skyway steps to implement an Action, the developer can incorporate pre-existing Java logic into the flow. The Java code may be contained in Java libraries (jar) or source files within the project. Skyway Builder 6.1 supported this functionality with three different invocation types (variable, instance and static). Skyway Builder 6.2 adds a fourth invocation type (inline). Here’s a summary of each invocation type:
- Variable – this invocation type is for invoking methods on variables defined in either the Controller, Service, Operation or Project
- Instance – this invocation type is for creating an instance of a specified class prior to invoking a Java method
- Static – this invocation type is for invoking static methods without creating an instance of a class
- Inline (New in 6.2) – this invocation type is for invoking Java source code that is embedded directly into the step
By adding the inline invocation type, we’ve made a big improvement to the Invoke Java step. The Java code to be invoked doesn’t needed to be contained in a separate file (.java) or library (.jar) anymore. You can now add your own Java code directly into the step. Furthermore, the Inline editor provides content assist for aiding the developer. As would be expected, the code that’s added to the step is emitted directly into the operation being implemented. One of the biggest benefits of using the Invoke Java step is that the code is maintained within the model. While in earlier versions of Skyway Builder you could blend hand-coded and generated code, the Invoke Java step reduces the risk of having to deal with any potential merging issues.

Figure: Action Diagram using Invoke Java Step with Inline Option
In earlier versions, developers had become accustomed to using the Skyway Groovy step for embedding fragments of Java code into their model-based implementations of operations. The only problem with this approach was that Groovy code was emitted into the operation and interpreted at runtime. There is obviously nothing wrong with using Groovy — I’m a big fan of Groovy — however, many development shops didn’t want Groovy code emitted into their Spring applications; they wanted pure Java applications. Using Groovy for implementing part of an operation also contradicted Skyway’s emphasis on generating pure Spring applications that look as if they were hand-coded. The new Invoke Java Step addresses these concerns.
The bottom line is that if you aren’t a fan of using Skyway Actions to model the implementation of your operations, then by all means continue using Skyway Builder to generate the skeleton of your Spring MVC applications, and you can continue to implement the operations using hand-coded Java. However, if you do use Skyway Actions, but you wish you could include some fragments of hand-coded Java here and there, then the new Invoke Java step is at your service. The new step will be available in Skyway Builder Community Edition and Enterprise Edition.
To stay in the loop on the upcoming 6.2 release, please follow us on Twitter or join the Skyway Community. As one of the many benefits of joining our community, you will automatically receive product announcements and updates.
Tags: Features, groovy, java, Skyway Builder 6.2







