Fork me on GitHub

Template helloworldstate@0.8.1

Clause Ergo ^0.9.1 b740f9dfd3d753f7a1bba37e52b350ecee827ae89c4ff8d6145f85814bda3ea5

This is the stateful Hello World of Accord Protocol 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 along with the number of times the clause has been called.

Download Archive Open in Template Studio

Hello World State

This is the stateful Hello World of Accord Protocol 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 along with the number of times the clause has been called.

Sample

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

Model Dependencies

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on on GitHub.

Sample Instance

{
    "$class": "org.accordproject.helloworldstate.HelloWorldClause",
    "clauseId": "1fe5b734-9e6e-439e-9907-33fb68c5f233",
    "name": "Fred Blogs"
}

State Types

Type Sample JSON
org.accordproject.helloworldstate.HelloWorldState
{
    "$class": "org.accordproject.helloworldstate.HelloWorldState",
    "counter": 99.801,
    "stateId": "276036b0-ee63-11e8-90b2-8532f3de0ed9"
}

Request Types

Type Sample JSON
org.accordproject.cicero.runtime.Request
{
    "$class": "org.accordproject.cicero.runtime.Request",
    "transactionId": "275fe890-ee63-11e8-90b2-8532f3de0ed9",
    "timestamp": "2018-11-22T14:30:26.457Z"
}
org.accordproject.helloworldstate.MyRequest
{
    "$class": "org.accordproject.helloworldstate.MyRequest",
    "input": "Fugiat.",
    "transactionId": "275fe891-ee63-11e8-90b2-8532f3de0ed9",
    "timestamp": "2018-11-22T14:30:26.457Z"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "27600fa0-ee63-11e8-90b2-8532f3de0ed9",
    "timestamp": "2018-11-22T14:30:26.458Z"
}
org.accordproject.helloworldstate.MyResponse
{
    "$class": "org.accordproject.helloworldstate.MyResponse",
    "output": "Qui.",
    "transactionId": "27600fa1-ee63-11e8-90b2-8532f3de0ed9",
    "timestamp": "2018-11-22T14:30:26.458Z"
}

Events Types

Type Sample JSON
org.accordproject.base.Event
{
    "abstract": "this is an abstract type"
}