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

Pass in node id of input node to be able to get additional information #14

Open
alastair opened this issue Feb 22, 2021 · 1 comment
Open

Comments

@alastair
Copy link
Member

I want to run an algorithm that acts on a node in the CE, but doesn't represent a file that can be downloaded (it has no source field set). I need to be able to perform a query to the CE to get the necessary information about the node.

I need to be able to add an [Input1] config section to the TPL and get passed the ID of the selected node, rather than a url or file.

@alastair
Copy link
Member Author

We decided to add some additional properties in this case to indicate

  • If we want to download a field and pass in the file, or pass in the value of a field as an argument
  • if downloading, which field to download (source, contentUrl, etc)

We should store this data in the CE, using Property.additionalProperty, for example:

mutation {
  pvfield:CreatePropertyValue (
    identifier: "96b27fe7-5753-46c2-a77b-34be0f04b73f"
    name: "field"
    value: "identifier"
    valueReference: String
  ) {
    identifier
  }
  pvdownload:CreatePropertyValue (
    identifier: "a2df12e1-c618-4d8b-afe3-814585c1660e"
    name: "downloadfield"
    value: "false"
    valueReference: Boolean
  ) {
    identifier
  }
  mergefield:MergePropertyAdditionalProperty (
    from: {identifier: "property-id"}
    to: {identifier:"96b27fe7-5753-46c2-a77b-34be0f04b73f"}
  ) {
    from {identifier}
    to {identifier}
  }
  mergedownload:MergePropertyAdditionalProperty (
    from: {identifier: "property-id"}
    to: {identifier:"a2df12e1-c618-4d8b-afe3-814585c1660e"}
  ) {
    from {identifier}
    to {identifier}
  }
}

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