Skip to content

SCXML code generation

Generating SCXML code works like with any other code generator. You need to create a generator model and select the SCXML code generator. Please note, that your statechart must have the SCXML domain enabled.

In the generator model, you need to specify the target folder for the generated XML file. For this, you can use the Outlet feature like for any other code generator in itemis CREATE:

GeneratorModel for create::scxml {

    statechart example {

        feature Outlet {
            targetProject = "scxml.example"
            targetFolder = "gen"
        }
    }
}

This example will generate the XML file into the “gen” folder of your “scxml.example” project.

You can also omit the targetProject attribute and specify a path on your file system. The path can be absolute or relative to the generator model location.