All features supporting the SysML v2 BETA specification are currently ALPHA and subject to change. The final SysML 2.0.0 specification is expected to be officially adopted in the second half of 2025. While there have been many questions during the finalization, we believe this implementation provides enough value for early adopters to start preparing to create and execute models using the new specification. We will be expanding support for the specification through finalization, into SysML v2.1, and beyond. There are a small number of remaining issues related to execution scheduled for revision in SysMLv2.1. We will be expanding and clarifying support for SysML v2.x throughout the upcoming language revision process. Consult the What's New and Modeling with SysML v2 pages for more information about what is currently supported.
Delegate Modules
A delegate module is a JAR file containing the custom code for a simulation. Behavior Execution Engine loads the delegate module at the start of the simulation and executes the registration code contained within.
Building
Once you have created the project structure for your custom delegate module, you will need to build and
deploy a JAR file, which Behavior Execution Engine will load at the start of the simulation. The JAR file contains the delegate module provider and
the custom code that will execute when registered with the CustomCodeRegistry
. Gradle is the build tool we use, as
it has support for a number of IDEs, including Eclipse,
IntelliJ IDEA,
VS Code, and others. You can even use it from the command line. Behavior Execution
Engine provides a build.gradle script with the samples and tutorials included in the installation; for more
information, check out the README.txt file in the same location. However, you may build delegate modules using any
Java build tool you prefer.
To learn more about Gradle, go to https://gradle.org.
Deploying
In order for Behavior Execution Engine to load the classes in your JAR file, you must either copy the JAR file to a subdirectory in your delegate
module home directory or use the additionalDelegateModuleSearchDirectories
field in the model configuration file to specify the directory
that directly contains the JAR file. Your home directory is specified by the sharedDelegateModulesDirectory in the
application settings that you may have configured. You can use the install
task in the sample Gradle build script to
automatically copy the JAR file to a subdirectory in the directory you specify in the gradle.properties file.
Behavior Execution Engine will load JAR files in directories that exist directly under your shared delegate modules directory when running simulations. An example is <DelegateModuleHomePath>\com.agi.mbse.samples.training.tortoisevshare.part2\sample-tutorial-tortoise-vs-hare-part-2.jar. Behavior Execution Engine will not load JAR files located directly in the root of your delegate module home directory or in subdirectories more than one level below it.
Debugging
As you write your delegates, you will likely want to have the ability to debug them as your simulation executes. See the Using the SysML v2 Launcher page for more details on running a simulation.
Using Debug Mode
The SysML v2 Launcher offers a way to debug your delegate modules after deploying them to your project. In the launcher window, there is a checkbox to enter Debug Mode. Selecting it gives the option to specify a port number. Once the session has started, connect to this port number in your preferred IDE and run a simulation. From that point, whenever the simulation runs, the process will stop at any breakpoints set in your delegate module code, allowing you to step through your code as the engine executes the SysML model.