http://code.google.com/p/sarasvati/source/detail?r=924
It allows defining custom attributes for each instance of an external imported.
So one could do something like:
<?xml version="1.0"?>
<process-definition name="external-env-two"
xmlns="http://sarasvati.googlecode.com/ProcessDefinition">
<node name="B">
<arc external="one" to="A"/>
<arc external="two" to="A"/>
</node>
<external name="one" processDefinition="external-env-one">
<custom>
<foo>bar</foo>
<hello>world</hello>
</custom>
</external>
<external name="two" processDefinition="external-env-one">
<custom>
<foo>baz</foo>
<hello>universe</hello>
</custom>
</external>
</process-definition>
Here's some new documentation for Node that should make how nesting works clear:
* <process-definition name="Graph I">
* <node name="A"/>
* </process-definition>
*
* <process-definition name="Graph II">
* <external name="G1" processDefinition="Graph I">
* <custom>
* <foo>bar</foo>
* <hello>world</hello>
* </custom>
* </external>
*
* <node name="B">
* <arc external="G1" to="A"/>
* </node>
* </process-definition>
*
* <process-definition name="Graph III">
* <external name="G2" processDefinition="Graph II">
* <custom>
* <foo>baz</foo>
* </custom>
* </external>
*
* <node name="C">
* <arc external="G2" to="B"/>
* </node>
* </process-definition>
*
* If you get node A from graph III, you can observe the following:
*
* Node nodeA = ...;
* nodeA.getExternalEnv().getAttribute( "foo" ) // returns "baz"
* nodeA.getExternalEnv().getAttribute( "hello" ) // returns "world"
* nodeA.getExternal().getEnv().getAttribute( "foo" ) // returns "baz"
* nodeA.getExternal().getEnv().getAttribute( "hello" ) // returns null
* nodeA.getOriginatingExternalNode().getExternal().getEnv().getAttribute(
"foo" ) // returns "bar"
* nodeA.getOriginatingExternalNode().getExternal().getEnv().getAttribute(
"hello" ) // returns "world"
cheers,
Paul