Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gerickson opened this issue Aug 13, 2019 · 3 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists F2F4 Resolved WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL.

Comments

@gerickson
Copy link

gerickson commented Aug 13, 2019

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

  • completion_event
    • This is a string naming the command response event expected in reply to the command. In WDL, this is expected to be a message of message_type RESPONSE_EVENT with the specified name.

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
Copy link
Contributor

input and output data

@gerickson
Copy link
Author

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.

@gerickson gerickson added the WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL. label Sep 6, 2019
@asoloway64
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists F2F4 Resolved WDL Related to Weave and the Weave Data Language and the ability for ODM SDF to losslessly express WDL.
Projects
None yet
Development

No branches or pull requests

3 participants