I wish to create a flow as part of an interface definition. I have added two PortUsages and defined the item that should flow (item usages, typed by the same item definition, used in the two port definitions, maybe I should reference the item instead?). In the following snippet you can see what I am trying to achieve:
example{
item def someItemDef;
port def portInDef {
in item someItemUsage : someItemDef;
}
port def portOutDef {
out item someItemUsage : someItemDef;
}
interface def someInterfaceDef {
end port portIn : portInDef;
end port portOut : portOutDef;
// so far so good. The part I cannot figure out how to create and write with Automator:
flow portOut.someItemUsage to portIn.someItemUsage
}
}
Is this the right syntax to begin with? And if not, what would be the correct syntax? Do I need to connect the two ports before creating a flow? If I so, I am also not sure what the syntax in Automator would be for that.
How can I create this flow with Automator? The idea is to then redefine the ports when creating an interface usage typed by the created interface definition, but leave the flow untouched, as I will only allow redefinition if all item flows are the same, and if the port is typed by the same definition.
Thanks!
