With the Torp (R49) release, it is now possible to use Actions within Configurable Graphs. This enhancement enables any graph to be transformed from a read-only view into an interactive, editable interface.
The underlying technology builds on the same foundation as Actions in Configurable Grids, and previously created Grid Actions can be reused in graphs.
The key difference in Graph Actions lies in the use of ActionBindings, which define how an Action receives the necessary input to execute within the graph context.
GraphActionBinding: Supported Parameters
Graph Actions support three types of input parameters via the <WithParam> configuration:
Parameter with SystemWeaver Dialog Value
The parameter value is provided through a supported dialog, defined using a Dialog tag. Supported dialogs include:
- DialogSelectItems
- DialogCreateItem
- DialogCreateIssue
- DialogCreateNote
- DialogSelectLibrary
- DialogSelectItemVersion
Parameter with Clipboard Value
The parameter value is sourced from objects currently copied to the clipboard. In this case, the WithParam tag only requires the name attribute.
Parameter with Path Query Value
The parameter value is the result of executing a path query. Path queries also support the following predefined variables:
- $focused: Refers to the SystemWeaver object associated with the graph element that was right-clicked to initiate the action. Supported element types include: Node, Edge, InPort, OutPort, and InOutPort.
- $selection: Refers to the SystemWeaver object(s) currently selected by the user, excluding the focused object. Multiple elements can be selected, including: Node, Edge, InPort, OutPort, and InOutPort.
Example Configuration
For an explanation of the configuration elements, see Editability in the XML Tag Reference - Graph specific section of the application Help.
<Graph> <Options> <Editable value="true"/> </Options> <Variable name="listOfItems" as="[Item]" select="/part::*/defobj::"/> <Variable name="listofParts" as="Item" select="/part::*/defobj::"/> <Variable name="homeLibrary" as="Item" select="HomeLibrary"/> <GraphActionBindings> <GraphActionBinding id="1" actionId="mapp" focusedCaption="Test WithParam in ActionBinding"> <WithParam name="p1" select="$focused"/> <WithParam name="p2" select="$selection"/> <WithParam name="p3" select="."/> <WithParam name="p4" select="/part::*"/> <WithParam name="p5" select="/part::*/defobj::"/> <WithParam name="p6" select="/issueref::IR"/> <WithParam name="p7" select="$listOfItems"/> <WithParam name="p8" select="$listofParts"/> <WithParam name="p9" select="$homeLibrary"/> <WithParam name="p10"> <DialogSelectLibrary defaultValue="$homeLibrary"/> </WithParam> <WithParam name="p11"> <DialogSelectItems itemType="ARAP" owner="." partType="ITFC" multiSelect="true"/> </WithParam> <WithParam name="p12"> <DialogCreateItem itemType="ARAP"/> </WithParam> <WithParam name="p13"> <DialogCreateIssue project="WI" issueType="Epic"/> </WithParam> <WithParam name="p14"> <DialogCreateNote/> </WithParam> <WithParam name="p15"> <DialogSelectItemVersion/> </WithParam> <WithParam name="p16"> <Clipboard/> </WithParam> </GraphActionBinding> </GraphActionBindings> <Actions> <Action id="mapp"> <Parameter name="p1" as="Item"/> <Parameter name="p2" as="[Item]"/> <Parameter name="p3" as="Item"/> <Parameter name="p4" as="[Part]"/> <Parameter name="p5" as="[Item]"/> <Parameter name="p6" as="[Issue]"/> <Parameter name="p7" as="[Item]"/> <Parameter name="p8" as="[Part]"/> <Parameter name="p9" as="Object"/> <Parameter name="p10" as="Object"/> <Parameter name="p11" as="[Item]"/> <Parameter name="p12" as="ItemData"/> <Parameter name="p13" as="IssueData"/> <Parameter name="p14" as="Object"/> <Parameter name="p15" as="Item"/> <Parameter name="p16" as="Object"/> <Log>p1 ($focused): #{? $p1}</Log> <Log>p2 ($selection): #{? $p2}</Log> <Log>p3 (.): #{? $p3}</Log> <Log>p4 ([Part]): #{? $p4}</Log> <Log>p5 ([Item]): #{? $p5}</Log> <Log>p6 ([Issue]): #{? $p6}</Log> <Log>p7 (Variable-Items): #{? $p7}</Log> <Log>p8 (Variable-Parts): #{? $p8}</Log> <Log>p9 (Variable-Object): #{? $p9}</Log> <Log>p1 ($focused.PathQuery): #{? $p1}</Log> <Log>p10 (DialogSelectLibrary): #{? $p10}</Log> <Log>p11 (DialogSelectItems): #{? $p11}</Log> <Log>p12 (DialogCreateItem): #{? $p12}</Log> <Log>p13 (DialogCreateIssue): #{? $p13}</Log> <Log>p14 (DialogCreateNote): #{? $p14}</Log> <Log>p15 (DialogSelectItemVersion): #{? $p15}</Log> <Log>p16 (Clipboard): #{? $p16}</Log> <!-- Do someting here--> </Action> </Actions> <Node actionBindingIds="1"/> </Graph>