@@ -1,5 +1,11 @@ |
Workflow refers to procedures for processing documents, such as requiring an editor to review and approve a story.
|
|
+!References |
+Here are some links to ((bitweaver and TikiWiki)) documentation where some of the definitions have been taken from: |
+* [http://prdownloads.sourceforge.net/tikiwiki/Galaxia_introduction.pdf?download|Galaxia Introduction.pdf] |
+* [http://prdownloads.sourceforge.net/tikiwiki/Galaxia_manual.pdf?download|Galaxia Manual.pdf] |
+The above documents are not completely reflective of Galaxia in its current state within Bitweaver, but definitely informative. |
+ |
-=Pre Requisites=-
|
* Its presumed that you have basic programming knowledge including the assignment and use of variables.
|
* Please note - the workflow system greatly simplifies the amount of work needed to create a workflow application. You will require __very__ basic knowledge of PHP and Smarty, so do not delve too deeply and get discouraged.
|
|
|
@@ -8,9 +14,9 @@ |
|
!Hello World Process 1.0 - Introduction
|
Click here to download the XML file of the process.
|
-{attachment id=104}
|
+{attachment id=148} |
|
-bitweaver, has inherited a Workflow Engine from TikiWiki called Galaxia. This engine is quite powerful and easy to use once the basic concepts have been mastered. Rather than give you all the concepts now, I will introduce them throughout the tutorial to help understand their use and context in the scheme of workflow generation.
|
+bitweaver, has inherited a Workflow Engine from ((bitweaver and TikiWiki)) called Galaxia. This engine is quite powerful and easy to use once the basic concepts have been mastered. Rather than give you all the concepts now, I will introduce them throughout the tutorial to help understand their use and context in the scheme of workflow generation. |
Ensure Workflow is enabled on your website.
|
-=Bonnie=-
|
If you have the permissions, you can visit __Administration / Administer Packages / Features__ and check the __Workflow__ feature. Click __Change Preferences__ to save your change.
|
|
|
@@ -67,11 +73,13 @@ |
Click on the first __Action__ icon - __activities__ {img src=/galaxia/icons/Activity.gif}.
|
|
!Admin Activities
|
-Activities are actions that are performed during your process. A process can consist of many activities. By default, a ''start'' and ''end'' activity are created for you, but these can be renamed or deleted at a later stage. I'll define two other terms so you can understand their context later.
|
+An ''Activity'' is an action that is performed during your process. In Galaxia activities are mapped to PHP scripts so an activity can do anything that can be done from a PHP script. A process can consist of many activities. By default, a ''start'' and ''end'' activity are created for you, but these can be renamed or deleted at a later stage. I'll define two other terms so you can understand their context later. |
|
An ''instance'' is a particular process currently being executed. An activity can have many instances associated with it at any time. An instance is created when a process is initiated by a user and the instance will pass through the process activities until the process is terminated or completed.
|
|
A ''transition'' is the path between two or more activities. A transition defines what has to be done after each activity is completed.
|
+ |
+A ''workitem'' is added to the instance when an activity is completed. Workitems thus represent completed activities. |
|
Activities are broken up into different types. Here are two types listed below:
|
|
|
|
@@ -101,7 +109,8 @@ |
|
At the bottom of the ''Add or edit an activity'' form, there are the roles associated with this activity.
|
|
-__Roles__: Activities are asocited to roles which define who can perform certain activities. Roles are defined at a per-process level and assigned to bitweaver groups. This allows simplified administration of particular activities and processes.
|
+ |
+__Roles__: Activities are asocited to roles which define who can perform certain activities. ''Roles'' are defined at a per-process level and assigned to bitweaver groups defining who is able to execute each activity. This allows simplified administration of particular activities and processes. |
|
-=Process activities=-
|
In our first example, we will use just the start and end activities. In the start activity we will display our name.
|
|
|
@@ -175,7 +184,7 @@ |
|
First thing we want to do is set some text to be displayed on the screen. Enter this in the edit window.
|
{CODE()}<?php
|
- $smarty->assign('display_text', 'Hello world!');
|
+ $gBitSmarty->assign('display_text', 'Hello world!'); |
|
if(isset($_REQUEST['save'])){
|
$instance->complete();
|
|
|
@@ -184,7 +193,7 @@ |
You will notice that along the right side of the edit form are a number of links. These are coding shortcuts that allow you to quickly insert commonly used code.
|
|
Let me explain these lines.
|
-The first line ''$smarty->assign('display_text', 'Hello world!');'' is used to assign text to a ''variable'' which is used in __template__. Here we are assigning the variable ''display_text'' with the words '''Hello world!'''. You will see this used when we edit the template section.
|
+The first line ''$gBitSmarty->assign('display_text', 'Hello world!');'' is used to assign text to a ''variable'' which is used in __template__. Here we are assigning the variable ''display_text'' with the words '''Hello world!'''. You will see this used when we edit the template section. |
|
The second line is an ''if'' statement checking if the __save__ button was pressed. If the button was pressed, the ''$instance->complete();'' function is executed telling the workflow, that we have finished the activity and are ready to move to the next actitivity - in our case ''end''.
|
|
|
|
@@ -227,7 +236,7 @@ |
|
!Hello World Process 1.1 - New Version
|
Click here to download the XML file of the process.
|
-{attachment id=105}
|
+{attachment id=149} |
|
So we are going to create a more complex version of workflow. In the __Admin Processes__ page, you can select ''new major'' or ''new minor'', to create a duplicate process. This allows you to begin testing a new version of process and eventually, replace the old version with the new one.
|
|
|
|
@@ -264,7 +273,7 @@ |
</form>{CODE}
|
Click the __code__ button to switch to the PHP code window. Edit the code, to store the text from the INPUT TEXT field.
|
{CODE()}<?php
|
- $smarty->assign('display_text', 'Hello world!');
|
+ $gBitSmarty->assign('display_text', 'Hello world!'); |
|
if(isset($_REQUEST['save'])){
|
|
|
|
@@ -276,7 +285,7 @@ |
Drop down the __select source:__ list, and choose ''display''. Edit the code, to retrieve the stored text.
|
{CODE()}<?php
|
$name = $instance->get("name");
|
- $smarty->assign('name', $name);
|
+ $gBitSmarty->assign('name', $name); |
|
if(isset($_REQUEST['save'])){
|
$instance->complete();
|
|
|
@@ -291,4 +300,6 @@ |
Click __save__ to finish coding.
|
|
Click the {img src=/galaxia/icons/refresh2.gif} __activate__ icon to activate the process. Go to ''User Activities and try version 1.1 of the Hello World Process.
|
+ |
+ |
|
|
|