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

When a single ID has multiple meanings by given context #114

Open
koriym opened this issue Nov 22, 2021 · 1 comment
Open

When a single ID has multiple meanings by given context #114

koriym opened this issue Nov 22, 2021 · 1 comment

Comments

@koriym
Copy link
Contributor

koriym commented Nov 22, 2021

For example, I need two account IDs and the amount of money to transfer money.
How do I represent this?

href+name
https://github.com/alps-io/profiles/blob/master/xml/alps-with-varying-rt-values.xml#L32

    <!-- Ontology -->
    <descriptor id="accountId" />
    <descriptor id="moneyAmount"  />

    <!-- Choreography -->
    <descriptor id="doTransfer" type="idempotent" rt="#User" >
        <descriptor href="#moneyAmount" />
        <descriptor href="#accountId" name="senderId" />
        <descriptor href="#accountId" name="receiverId" />
    </descriptor>

(Is it valid to include more than one of the same ID?)

id+href
https://github.com/koriym/app-state-diagram/pull/67

    <!-- Ontology -->
    <descriptor id="accountId" />
    <descriptor id="moneyAmount"  />

    <!-- Choreography -->
    <descriptor id="doTransfer" type="idempotent" rt="#User" >
        <descriptor href="#moneyAmount" />
        <descriptor id="senderId" href="#accountId"  />
        <descriptor id="receiverId" href="#accountId"  />
    </descriptor>
@koriym
Copy link
Contributor Author

koriym commented Nov 23, 2021

I've come to this conclusion.

id+href is preferable because it has a different id, so there are two different descriptors that inherit from accountId, and it can express more detailed semantics.

This was the same thought that @tkawa had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant