Git Product home page Git Product logo

Comments (4)

nicpottier avatar nicpottier commented on July 18, 2024

So another approach would be the JSONSchema approach of using $ref as a marker that the resource should be loaded from a URL:

"assets": [
{ "$ref": "https://rpd.io/as/flows/7123..." },
{ "type": "flow", "uuid": "7114...", "name": "..."},
]

Not sure this is better, just different..

from goflow.

nicpottier avatar nicpottier commented on July 18, 2024

Downside of this is you don't know UUID or type or anything ahead of time.

from goflow.

rowanseymour avatar rowanseymour commented on July 18, 2024

Something else to consider - maybe runs (and contacts?) can be assets sometimes. For example in the trigger flow action case - the caller will need to start a flow with a parent run which belongs to a different contact. It may make sense to model this as an asset because:

  • It's immutable for the new flow session
  • The engine shouldn't be sending it back in the session and the caller shouldn't be trying to sync it.

The way it might works is:

  1. The trigger flow action will return a trigger_flow (?) event which contains the UUID of the parent run.
  2. Caller will grab the output of that run (either immediately from the session output or RapidPro could do it later by loading FlowRun.output)
  3. Caller starts a new flow session with:
    • That parent as an asset
    • A start_flow event which specifies the parent by UUID

from goflow.

nicpottier avatar nicpottier commented on July 18, 2024

Ya, I think that sounds right to me, that if a run is not part of a session then it is an asset. So I guess it is that runs belong to the session where they were started, otherwise are assets.

from goflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.