Difference between revisions of "Workflow Designer"
(→Standard activities) |
|||
Line 13: | Line 13: | ||
! Activity!! Category !! Purpose | ! Activity!! Category !! Purpose | ||
|- align="left" | |- align="left" | ||
− | | AddToCollection<T>|| Collection || | + | | AddToCollection<T>|| Collection || Adds an ''Item'' to a ''Collection'' |
|- align="left" | |- align="left" | ||
− | | ClearCollection<T>|| Collection || | + | | ClearCollection<T>|| Collection || Removes an ''Item'' from a ''Collection'' |
|- align="left" | |- align="left" | ||
− | | ExistsInCollection<T>|| Collection || | + | | ExistsInCollection<T>|| Collection || Clears a ''Collection'', removing all items stored in it |
|- align="left" | |- align="left" | ||
− | | RemoveFromCollection<T> || Collection || | + | | RemoveFromCollection<T> || Collection || Verifies if an ''Item'' exists in a ''Collection''; if the item exists, its ''Result'' argument will yield True |
|- align="left" | |- align="left" | ||
− | | DoWhile|| ControlFlow || | + | | DoWhile|| ControlFlow || Executes its ''Body'' until the ''Condition'' evaluates to True; the Body will be executed at least once |
|- align="left" | |- align="left" | ||
− | | ForEach<T> || ControlFlow || | + | | ForEach<T> || ControlFlow || ForEach activity contains a list of ''Values'' and a ''Body''; at runtime, the list is iterated and the body is executed for each value in the list |
|- align="left" | |- align="left" | ||
− | | If|| ControlFlow || | + | | If|| ControlFlow || The If activity selects a child activity for execution based on the value of a Boolean expression; if the Boolean expression ''Condition'' yields True (and “Then” activity is configured), the ''Then'' activity is scheduled; if the expressions yields False (and ''Else'' activity is set), the ''Else'' expression is scheduled |
|- align="left" | |- align="left" | ||
| Parallel|| ControlFlow || - | | Parallel|| ControlFlow || - | ||
Line 31: | Line 31: | ||
| ParallelForEach<T>|| ControlFlow || - | | ParallelForEach<T>|| ControlFlow || - | ||
|- align="left" | |- align="left" | ||
− | | Pick|| ControlFlow || - | + | | Pick|| ControlFlow || The Pick Activity provides event-based control flow modeling in WF; the only valid children for a Pick activity are PickBranches; at the beginning of a Pick execution, all the Trigger activities from all its ''Branches'' are scheduled; when the first Trigger completes its corresponding Action activity is scheduled, and all other Trigger activities are canceled |
|- align="left" | |- align="left" | ||
− | | PickBranch|| ControlFlow || | + | | PickBranch|| ControlFlow || PickBranch represents a branch in a Pick; it consists of a ''Trigger'' and ''Action''; PickBranch can only be added to a Pick activity |
|- align="left" | |- align="left" | ||
− | | Sequence|| ControlFlow || | + | | Sequence|| ControlFlow || The Sequence activity allows for the execution of one or more ''Activities'' in order |
|- align="left" | |- align="left" | ||
− | | Switch<T>|| ControlFlow || | + | | Switch<T>|| ControlFlow || Switch activity is similar to switch statement in C#; it contains an ''Expression'' and a set of ''Cases'' (each case has a key and an activity); after the expression is evaluated, the Switch activity looks for a ''Case'' with a key that matches the result of the expression and if found, it schedules the activity associated with that Case |
|- align="left" | |- align="left" | ||
− | | While|| ControlFlow || | + | | While|| ControlFlow || The While activity executes it's ''Body'' while a Boolean ''Condition'' is True |
|- align="left" | |- align="left" | ||
| Rethrow|| ErrorHandling || - | | Rethrow|| ErrorHandling || - |
Revision as of 06:27, 22 July 2013
The Workflow Designer is a component in UBIK® which appears on many occasions, namely every time when there is a Workflow to be displayed or edited. It features a full re-hosted version of the designer for the Microsoft Workflow Foundation, extended with manipulation capabilities for UBIK® objects.

Contents
Basics
Toolbox
The Toolbox features a wide range of Activities that cane be used within your Workflows. There are generic activities as well as activities specific for the manipulation of UBIK® objects.
Standard activities
Activity | Category | Purpose |
---|---|---|
AddToCollection<T> | Collection | Adds an Item to a Collection |
ClearCollection<T> | Collection | Removes an Item from a Collection |
ExistsInCollection<T> | Collection | Clears a Collection, removing all items stored in it |
RemoveFromCollection<T> | Collection | Verifies if an Item exists in a Collection; if the item exists, its Result argument will yield True |
DoWhile | ControlFlow | Executes its Body until the Condition evaluates to True; the Body will be executed at least once |
ForEach<T> | ControlFlow | ForEach activity contains a list of Values and a Body; at runtime, the list is iterated and the body is executed for each value in the list |
If | ControlFlow | The If activity selects a child activity for execution based on the value of a Boolean expression; if the Boolean expression Condition yields True (and “Then” activity is configured), the Then activity is scheduled; if the expressions yields False (and Else activity is set), the Else expression is scheduled |
Parallel | ControlFlow | - |
ParallelForEach<T> | ControlFlow | - |
Pick | ControlFlow | The Pick Activity provides event-based control flow modeling in WF; the only valid children for a Pick activity are PickBranches; at the beginning of a Pick execution, all the Trigger activities from all its Branches are scheduled; when the first Trigger completes its corresponding Action activity is scheduled, and all other Trigger activities are canceled |
PickBranch | ControlFlow | PickBranch represents a branch in a Pick; it consists of a Trigger and Action; PickBranch can only be added to a Pick activity |
Sequence | ControlFlow | The Sequence activity allows for the execution of one or more Activities in order |
Switch<T> | ControlFlow | Switch activity is similar to switch statement in C#; it contains an Expression and a set of Cases (each case has a key and an activity); after the expression is evaluated, the Switch activity looks for a Case with a key that matches the result of the expression and if found, it schedules the activity associated with that Case |
While | ControlFlow | The While activity executes it's Body while a Boolean Condition is True |
Rethrow | ErrorHandling | - |
Throw | ErrorHandling | - |
TryCatch | ErrorHandling | - |
FlowChart | FlowChart | - |
FlowSwitch<T> | FlowChart | - |
FlowDecision | FlowChart | - |
Assign | Primitives | - |
Assign<T> | Primitives | - |
Delay | Primitives | - |
InvokeMethod | Primitives | - |
WriteLine | Primitives | - |
Persist | Runtime | - |
TerminateWorkflow | Runtime | - |
CancellationScope | Transaction | - |
CompensableActivity | Transaction | - |
Compensate | Transaction | - |
Confirm | Transaction | - |
TransactionScope | Transaction | - |
UBIK® activities
Activity | Category | Purpose (Short) |
---|---|---|
DebugMessage | UBIK Control Flow | Writes a debug Text |
InvokeInterface | UBIK Control Flow | Invokes a UBIK® Interface component |
InvokeWorkflow | UBIK Control Flow | Invokes a UBIK® Workflow object |
SendEmail | UBIK Control Flow | Sends an Email To recipients via an SMTP Host |
CreateCSVScope | UBIK Data Exchange | Creates a new csv document for flat data export |
CreateCSVRow | UBIK Data Exchange | Creates a single row in a csv file |
CreateCSVValue | UBIK Data Exchange | Creates a single value (column) in a csv row |
CreateXMLScope | UBIK Data Exchange | Creates a new xml document for hierarchical data export |
CreateXMLElement | UBIK Data Exchange | Creates a new xml element in an xml document |
CreateXMLAttribute | UBIK Data Exchange | Creates a new xml attribute on an xml element |
ReadCSVDocument | UBIK Data Exchange | Reads a csv file for flat data import |
ReadXPathDocument | UBIK Data Exchange | Reads an xml file for hierarchical data import |
GetXPathResult | UBIK Data Exchange | Evaluates an XPath-expression in a csv or xml document |
AssignToNamedRelation | UBIK Object Primitives | Assigns a Child object via the named RelationName to a Parent object |
AssignToSystemRelation | UBIK Object Primitives | Assigns a Child object via the given Relation to a Parent object |
CreateInstance | UBIK Object Primitives | Creates a new instance of a given MetaClass |
DeleteObject | UBIK Object Primitives | Deletes a UBIKObject (Deep delete by default, ShallowDelete optional) |
GetObjectsByPropertyValue | UBIK Object Primitives | Queries instances of MetaClass where PropertyName has a certain value |
GetObjectsByQuery | UBIK Object Primitives | Delivers the result of Query |
RemoveFromNamedRelation | UBIK Object Primitives | Removes a Child object via the named RelationName from a Parent object |
RemoveFromSystemRelation | UBIK Object Primitives | Removes a Child object via the given Relation from a Parent object |
SaveObject | UBIK Object Primitives | Saves the UBIKObject (Deep save by default, ShallowSave optional) |
SetPropertyValue | UBIK Object Primitives | Sets the Value to the property named PropertyName of the UBIKObject |
AssignIconToBaseClass | UBIK UI Primitives | Assigns a selectable icon image to the UBIKObject |
SelectSourceFile | UBIK UI Primitives | Brings up an open file dialog |
SelectTargetFile | UBIK UI Primitives | Brings up a save file dialog |
ShowUnsavedObjectsHierarchy | UBIK UI Primitives | Brings up the Unsaved Objects dialog |
UserDecisionYesNo | UBIK UI Primitives | Brings up a Yes/No dialog with configurable Title and Text |
UserInputText | UBIK UI Primitives | Brings up an input box with configurable Title and Text |
Design canvas
Property window
Working with the designer
Toolbar
Item | Purpose |
---|---|
Open file | Opens a dialog to load a previously saved UBIK® workflow file (.uwf) into the design canvas |
Save to file | Saves the current design canvas into a file (.uwf) |
Toggle breakpoint | Sets/Removes a breakpoint at the currently selected activity (async execution only) |
Resume | Resumes execution if a breakpoint was hit (async execution only) |
Delay between activities | Execution delay in Milliseconds between activities (async execution only) |
This control doesn't feature any context menu yet.
Designing workflows
Designing a workflow is fairly easy and typically involves placing, configuring and connecting various Activities. All available activities are listed in the Toolbox on the left side. Use Drag&Drop to place an Activity on the canvas in the middle. Select an activity on the canvas and use the context menu or the Del key to remove it again.
![]() | Unless the activity is of type FlowChart or Sequence, you will not be able to add more than one Activity to the canvas |
Typically we want to start with a Sequence or a Flowchart, which are both able to host child (nested) Activities
- The Sequence executes its nested Activities sequentially, one after the other
- The FlowChart executes its nested Activities in the order you link them with connecting lines