one-data-model / language

(Old repo:) Simple Definition Format (SDF) for One Data Model definitions
7 stars 4 forks source link

Need Syntax for Expressing the Optional, Expected Response to an odmAction #40

Open gerickson opened 5 years ago

gerickson commented 5 years ago

In Weave Data Language (WDL), Commands (ODM "Actions") may either be one-way "fire-and-forget" requests or two-way request / responses. For the latter, the WDL syntax for indicating that a Command request has an expected response is to name that response with the completion_event: <name of completion event> key-value-pair.

Relevant Example Schema Input Files

Missing or Unmapped WDL-to-ODM SDF Syntax

Example Input WDL

message SetUserPincodeRequest {
    option (wdl.message_type) = COMMAND;
    option (wdl.command) = {
        id:               0x01,
        completion_event: "SetUserPincodeResponse"
    };

    UserPincode       user_pincode = 1;
}

message SetUserPincodeResponse {
    option (wdl.message_type) = RESPONSE_EVENT;

    PincodeErrorCodes status = 1;
}

Example Output ODM SDF

"odmAction" : {
    "SetUserPincodeRequest" : {
        "description" : "TBD",
        "id"          : 0x0001,
        "odmProperty" : {
            "user_pincode" : {
                "description" : "TBD",
                "name"        : "user_pincode",
                "id"          : 1,
            }
        }
    }
}
mjkoster commented 5 years ago

input and output data

gerickson commented 5 years ago

Not sure this is 100% a duplicate. The one issue on this front covers the syntax for describing that an action is single-phase (one-way) vs. two-phase (two-way) and what the name of the expected second phase of the two-phase (two-way) action is.

The other issue is describing the contents of the second phase of the two-phase (two-way) action.

asoloway64 commented 5 years ago

F2F4: This needs to be modeled as data in the object definitions. For example, "correlation id" should be passed as input data in the action and as output data of the event.