See
PublishedAPI for packages intended to be used by Plugin and Contrib authors, or
browse all packages.
See also
Developing plugins,
Developer's Bible,
Technical Overview
internal package
Foswiki::Plugins::QMPlugin::Net
implements a workflow network
A net consists of nodes, edges that connect them and
roles that participate in this workflow. A net is constructed
on the base of a workflow definition. A net can either be
defined in a way only reflecting the typology or have a State
assigned to it. The State encodes the location within the network.
The state has been reached by having traversed the edges in the net from
the start node following outgoing directed edges.
ClassProperty
TRACE
boolean toggle to enable debugging of this class
ClassMethod
new($web, $topic, $state) → $net
constructor for a net object; this either returns a net object
or undef when parsing of the network definition failed for some reason
ObjectMethod
finish()
called when this object is destroyed, calls finish() on its parts
ObjectMethod
setState($state) → $state
assign a state to this network
ObjectMethod
getState() → $state
get the state assigned to this network
ObjectMethod
getNodes() → @nodes
get the list of all nodes in this net
ObjectMethod
getNode($id) → $node
get a node of a specific id
ObjectMethod
getRoles() → @roles
get the list of all roles in this net
ObjectMethod
getRole($id) → $role
get a role of a specific id
ObjectMethod
getEdges() → @edges
get the list of all edges in this net
ObjectMethod
getEdge($from, $action, $to) → $edge
get a specific edge in this net. The parameters
$from
,
$action
and
$to
specify which edge to return. All parameters are optional and may
be specified in different combinations. If more than one edge matches
the given parameter will only the first one found be returned.
ObjectMethod
getSortedItems($type, $propName) → @items
get the list of all items of type
$type
(nodes, roles, edges)
sorted by the given property Name
ObjectMethod
getSortedRoles($propName) → @roles
get the list of all roles sorted a given property name
ObjectMethod
getSortedNodes($propName) → @nodes
get the list of all nodes sorted by a given property name
ObjectMethod
getSortedEdges($propName) → @edges
get the list of all edges sorted by a given property name
ObjectMethod
getDefinition() → $webtopic
get the webtopic path of the network definition
get the
Foswiki::Meta object of the current net
ObjectMethod
getNotificationTemplate() → $templateName
get the name of the template for workflow notification emails
ObjectMethod
getReminderTemplate() → $string
get the name of the template for workflow reminders
ObjectMethod
parseTableDefinition() → $boolean
parse the definition for this net stored in TML tables. this is called by the constructor right away;
returns true when parsing was successfull. There is a certain amount of compatibility
with
WorkflowPlugin in that workflow definitions written for it may be used in QMPlugin
as well.
States
State |
Allow Edit |
Allow View |
Message |
---|
Transitions
State |
Action |
Next State |
Allowed |
Form |
Notify |
---|
Roles table
Nodes table
ID |
Title |
Allow Edit |
Allow View |
Allow Approve |
Message |
---|
Edges table
From |
Action |
To |
Allowed |
Enabled |
Notify |
Command |
Sign Off |
---|
ObjectMethod
getUnknownNode() → $node
get the "unknown" node; it is a system node not part of the net
ObjectMethod
getDefaultNode() → $node
get the default node; this is the first node in the node definition list
ObjectMethod
getApprovalNodes() → $list
get all nodes marked as approval nodes in this net; this is the one node that has got an asterisk (*) assigned to it or
has got the ID QMPLUGIN_APPROVAL (defaults to approved)
ObjectMethod
getAdminRole() → $role
get the admin role of this net; this is the one role that has got an asterisk (*) assigned to it, or
has got the ID QMPLUGIN_ADMIN (defaults to Admin)
ObjectMethod
isAdmin($user)
returns true if the given user is member of the admin role
ObjectMethod
stringify() → $string
returns a string representation of this object
ObjectMethod
getDot($params) → $tml
returns a TML expression to render the graphviz dot graph
ObjectMethod
getVis($params) → $tml
returns a TML expression to render the Vis.js graph