Storyboard TTC2011HelloWorldConstantTransformation1

A constant transformation that creates a Greeting object

Create class model and generate implementation:

The code that builds and runs the transformation / pattern looks like:

      GreetingPO greetingPO = (GreetingPO) new Pattern<Pattern>()
            .startCreate()
            .has(new GreetingPO());

      greetingPO.hasText("Hello World");

Check: Constant transformation has match true

At runtime the object structure for the pattern and for the hostgraph looks like:

For completeness just the host graph:

TTC2011HelloWorldConstantTransformation1 number of matches is 1

For fairness, the java code that does this transformation looks like:

      Greeting greeting = new Greeting()
      .withText("Hello World");