title: Dependent properties in gremlin
body: <p>Consider the following schema for in JanusGraph.</p>
  <pre><code>g.addV('node1').next()
  g.addV('node2').next()
  g.addV('node3').next()
  
  g.V().hasLabel('node1').as('fromV').V().hasLabel('node2').as('toV').addE('rel').from('fromV').to('toV').property('property1',1).iterate()
  
  g.V().hasLabel('node1').as('fromV').V().hasLabel('node3').as('toV').addE('rel1').from('fromV').to('toV').property('property2',2).iterate()
  </code></pre>
  <p>3 nodes: node1,node2 and node3
  2 relations: node1-&gt;rel-&gt;node2 and node1-&gt;rel1-&gt;node3</p>
  <p>I want the property2 for the rel1 relationship to be dependent on the property1 of rel relationship with formula 2*property1.
  Example:
  If property1=4 then property2=2 * 4=8</p>
  <p>Is it possible to update the property2 automatically when the property1 is updated and how?
  If not possible automatically, how to update using queries?</p>