Hello World

Author: Accord Project

helloworld@0.14.0 Clause ^0.22.0 4a4eff4a7665015fc3f50a2f33b55f33aaa229a48d1f6b7135e1a5e292a5b63f

This is the Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string `Hello` prepended to text that is passed in the request.

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

Hello World

This is the Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string Hello prepended to text that is passed in the request.

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.helloworld.HelloWorldClause",
    "name": "Fred Blogs",
    "clauseId": "029212db-1e3b-46eb-992d-1c8db5ee812a",
    "$identifier": "029212db-1e3b-46eb-992d-1c8db5ee812a"
}

Template Model

namespace org.accordproject.helloworld

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 HelloWorldClause 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": "7e756190-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

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

Response Types

Type Sample JSON
org.accordproject.helloworld.MyResponse
{
    "$class": "org.accordproject.helloworld.MyResponse",
    "output": "Mollit deserunt cupidatat voluptate culpa.",
    "$timestamp": "2021-04-27T13:10:40.937-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.