You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated to ash_neo4j 0.3.1 and bolty 0.0.10 — no database compatibility with prior versions due to significant changes in the data layer and Bolt protocol handling
@@ -94,4 +64,53 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
@@ -113,10 +113,41 @@ alias Diffo.Provider.PartyRef
113
113
aliasDiffo.Provider.Place
114
114
aliasDiffo.Provider.PartyRef
115
115
aliasDiffo.Uuid
116
+
aliasDiffo.Type.Value
116
117
importJason, only: [encode:2]
117
118
useOutstand
118
119
```
119
120
121
+
The value types used in this livebook are defined without the Provider Extension DSL — each requires a dedicated `Ash.TypedStruct` so that `Diffo.Type.Dynamic` can round-trip values through Neo4j storage.
122
+
123
+
```elixir
124
+
defmoduleDiffo.Livebook.E2eValuedo
125
+
@deriveJason.Encoder
126
+
useAsh.TypedStruct
127
+
typed_struct do
128
+
field :downstream, :integer
129
+
field :upstream, :integer
130
+
field :units, :atom
131
+
end
132
+
end
133
+
134
+
defmoduleDiffo.Livebook.OptionsValuedo
135
+
@deriveJason.Encoder
136
+
useAsh.TypedStruct
137
+
typed_struct do
138
+
field :options, {:array, :atom}
139
+
end
140
+
end
141
+
142
+
defmoduleDiffo.Livebook.TechnologyValuedo
143
+
@deriveJason.Encoder
144
+
useAsh.TypedStruct
145
+
typed_struct do
146
+
field :access, :atom
147
+
end
148
+
end
149
+
```
150
+
120
151
We can either create specification instances with Ash directly, or use the Diffo.Provider code interface.
@@ -305,13 +336,13 @@ We'll have a few things outstanding which we would normally find out during serv
305
336
We recommend using outstanding to drive next task logic, so that the orchestration is directed by the difference engine. This could look like an address lookup (where we learn the provider) followed by a provider service qualification (where we learn the technology) and the related network places.
In this tutorial you've used Diffo to create, relate and update some TMF Service and Resources, simulating activities over the service and resource lifecycle, and you've learned how this functionality is underpinned by open source Neo4j, Ash Framework and Elixir.
451
483
Diffo contains an example Access domain showing how to specialise the structure and behaviour of TMF Services and Resources.
452
484
485
+
But there is a lot of friction here and we still only have structure and not much behaviour. In practice, you'd use the Provider Extension DSLs to do the heavy lifting. But what you've learned here is foundational to help you move on to the other livebooks.
486
+
453
487
If you find Diffo useful please visit and star on [github](https://github.com/diffo-dev/diffo/). Feel free to join discussions and raise issues to discuss PR's.
0 commit comments