Hello Module

Author: Accord Project

hellomodule@0.8.0 Clause ^0.22.0 06259cd77d8fc6f7350d10ebef44fb8c377e2f45a3eb02b934411d3ac1b427d0

This is the Hello World of Accord Project Templates, with two Ergo modules.

Download Archive Download Compiled Archive Open in Template Studio Open in VSCode Web

Hello Module

This is the Hello World of Accord Project Templates, with two Ergo modules.

Template Text

Name of the person to greet: "Fred Blogs". Thank you!

Name of the person to greet: "Fred Blogs".
Thank you!
Name of the person to greet: {{name}}.
Thank you!
{
    "$class": "org.accordproject.hellomodule.HelloModuleClause",
    "name": "Fred Blogs",
    "clauseId": "d14e68ba-f03f-46b7-b330-7260b75918b9",
    "$identifier": "d14e68ba-f03f-46b7-b330-7260b75918b9"
}

Template Model

namespace org.accordproject.hellomodule

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto

transaction MyRequest extends Request {
  o String input
}

transaction MyResponse extends Response {
  o String output
}

/**
 * The template model
 */
asset HelloModuleClause extends Clause {
  /**
   * The name for the clause
   */
  o String name
}

// this is a change!

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.runtime.State
{
    "$class": "org.accordproject.runtime.State",
    "$identifier": "7de15ef0-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

Type Sample JSON
org.accordproject.hellomodule.MyRequest
{
    "$class": "org.accordproject.hellomodule.MyRequest",
    "input": "Pariatur.",
    "$timestamp": "2021-04-27T13:10:39.967-04:00"
}

Response Types

Type Sample JSON
org.accordproject.hellomodule.MyResponse
{
    "$class": "org.accordproject.hellomodule.MyResponse",
    "output": "Dolor culpa.",
    "$timestamp": "2021-04-27T13:10:39.967-04:00"
}

Events Types

Type Sample JSON
concerto.Event
{
    "abstract": "this is an abstract type"
}

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.