Difference between revisions of "Custom Nodes"

From PresenceWiki
Jump to: navigation, search
Line 1: Line 1:
It is possible in presence to create a custom node.
+
Custom nodes allow you to wrap a Presence Task or Java class inside a simple to reference node. This aids re-use and standardizes parameters.
  
Select <Todo> from the top menu, from here you can create, import and export your custom nodes.
+
http://www.international-presence.com/wikidocs/images/custom_node.png
  
When designing a custom node you first decide It's name. this is the name that will appear in the <top view> in Presence.
+
Typically, if you want to call a sub-Task in Presence, you would first have to make sure that the correct variables are being passed into the task. This process is often painstaking, as variable names have to match, and often requires one or more "set variable" nodes before invoking the sub-task (see below):
  
After this you can add extra parameters,
+
http://www.international-presence.com/wikidocs/images/subtask.jpg
  
Once the node is complete it, will contain a name and description on the first tab.
+
This is a common source of errors which can be difficult to debug. By turning your sub-task into a Custom Node, you can require implementers to enter the correct parameters each time they use the node, as with any other Presence task node.
  
The second tab will contain the parameters you added.
+
==Creating a new Custom Node==
  
The components you can add are:-
+
To create a new Custom Node for re-use, go to the Tools Menu > Custom Nodes. You will be presented with the Custom Nodes dialog box (see below):
  
TextBox
+
http://www.international-presence.com/wikidocs/images/custom_nodes_dialog.png
PasswordBox
+
NumberBox
+
RadioButtonGroup
+
CheckBox
+
ComboBox
+
  
Each component added will also need a label and name:-
+
The icons along the bottom have the following functions:
  
At a later stage we can add a tab for exception handling and testing.
+
* Edit selected Custom Node
 +
* Create new Custom Node
 +
* Delete selected Custom Node
  
The engine side of this will either be pure java code, or a task, in which case there will aslo be a wizard to create the node from the task..
+
=== Introduction Screen ===
  
Once the node is created it can be exported/saved as an xml file.
+
The first screen (Introduction) requires you to give the custom node a name and an optional description of the purpose. The example below is for logging audit messages to a database table.  
  
There should also be an option to set images for the node.
+
http://www.international-presence.com/wikidocs/images/new_custom_node_1.png
 
+
These xml files can then be imported into Presence, using the import menu.
+

Revision as of 10:49, 18 June 2014

Custom nodes allow you to wrap a Presence Task or Java class inside a simple to reference node. This aids re-use and standardizes parameters.

http://www.international-presence.com/wikidocs/images/custom_node.png

Typically, if you want to call a sub-Task in Presence, you would first have to make sure that the correct variables are being passed into the task. This process is often painstaking, as variable names have to match, and often requires one or more "set variable" nodes before invoking the sub-task (see below):

http://www.international-presence.com/wikidocs/images/subtask.jpg

This is a common source of errors which can be difficult to debug. By turning your sub-task into a Custom Node, you can require implementers to enter the correct parameters each time they use the node, as with any other Presence task node.

Creating a new Custom Node

To create a new Custom Node for re-use, go to the Tools Menu > Custom Nodes. You will be presented with the Custom Nodes dialog box (see below):

http://www.international-presence.com/wikidocs/images/custom_nodes_dialog.png

The icons along the bottom have the following functions:

  • Edit selected Custom Node
  • Create new Custom Node
  • Delete selected Custom Node

Introduction Screen

The first screen (Introduction) requires you to give the custom node a name and an optional description of the purpose. The example below is for logging audit messages to a database table.

http://www.international-presence.com/wikidocs/images/new_custom_node_1.png