i-Tasks Demo’s

 

 

 

Links to the Demo:

Links to the Code:

Single-user demo

Coffee Machine

Coffee Machine

Travel

Travel

 

Multi-user demo

Quotation

Quotation

Date Appointment

Date Appointment

Delegate

Delegate

Multi-user Workflow

Marking

Marking - Login

Newsgroup

Newsgroup

 

Back to the download page.

 

 

ABOUT THE DEMO’s

 

Notice that there are different categories of i-Tasks examples:

 

·         Single-user demo’s: they are intended for one user. Such applications show how i-Tasks can be used to guide a user stepwise through actions on the web.

·         Multi-user demo’s: you play the role of all users. This mode is great for developing and testing of a multi user application.

o           With a pull-down menu you can easily switch from identity within the same browser window;

o           With the trace button you can see which tasks are completed and which tasks are open;

o           With the refresh button, you can ask for the latest status.

·         Real workflow demo’s: a running workflow application in which you are one of the users. To join the workflow you first have to create a login account. Hereafter you can start the application. Others can login as well and you all jointly work together to perform a task guided by the workflow system.

 

In each category one can define persistent or non-persistent applications:

 

·         When you re-visit a persistent application, it will look exactly the way it has been left the previous time. You do need to login again if that is required.

·         A non-persistent application will start from scratch each time you re-visit the site.

 

By changing an option one can decide for any task in an i-Tasks application where to store its information (in a page, file, or relational database). For instance, a login ritual (completely defined it as an i-Tasks as well) is typically non-persistent, while the actual application might be persistent.

           

 

Changing from one mode to another is just a matter of switching options.

 

The demo’s are shortly explained below. They are presented from simple to more complicated.

 

The library comes with two different http servers one can use.

It is of course also possible to connect an i-Tasks application as a CGI application with any other http server (such as Apache, IIS, or whatever).

 

The demo’s showed on this page make use of the Clean http 1.1 server running on a (very slow) Windows machine (http://idatasrv.cs.ru.nl). If the machine is down or there is a problem, please send us an email.

 

 

SINGLE USER DEMO’s

 

Coffee Machine

 

The demo: a simple coffee machine which will ask for money depending on the product chosen.

 

The code: shows a nice collection of task combinators and shows how a task (asking for coins until enough money is paid) can be defined recursively.

 

With the trace option one can see which tasks are being evaluated (blue box) and which tasks are finished (yellow box). When you closer look at the trace you will notice that tasks, like functions, are rewritten and replaced by their result. The administration is garbage collected in such a way that when the coffee machine is finished it will back into its original state.

 

 

Click here for the demo. Look at the Coffee Machine code.

 

 

Travel: book a trip

 

The demo: one can choose to book a flight, a hotel and / or a car. One after another the chosen bookings will be handled. The bill is made up in the end.

 

The code: shows how to program a multiple choice.

 

 

Click here for the demo. Look at the Travel code.

 

 

 

MULTI USER DEMO’s

 

Quotation

 

In this demo user 0 has to fill in a quotation form. When finished the result of the task has to be reviewed by user 1. He can ask to improve the task, or approve or cancel it. When the task needs more work, the whole process (adjusting the form, refereeing the form) is repeated. Otherwise the task is finished and the application restarts from scratch.

 

The code shows how to assign tasks to user: simply by assigning a user id to a task. The code is highly re-usable. Any task can be reviewed. Furthermore notice that the quotation form is automatically generated from it’s type.

 

 

Click here for the demo. Look at the Quotation code.

 

 

Make an appointment by settling a date and time

 

This demo application will settle a date and time between two persons that want to meet.

The first person, with id 0, takes the initiative and chooses another person to make an appointment with. Then a date is settled by the two by repeatedly asking each other for a convenient date. If such a date is found both have to confirm the date and the task repeats itself.

 

The code speaks for itself.

 

 

Click here for the demo. Look at the Date Appointment code.

 

Delegate work to a set of users

 

This interesting workflow exercise was given by Erik Zuurbier (Thanks Erik). First a set of id's of persons is determined by user 0 to which a task can be delegated. The task is only shipped to the first person who accepts to do the task. User 0 or the person itself can stop the task at any moment. Now again everybody in the set is asked again to accept the task. The one who accepts can *continue* the work already done so far. This process can be repeated as many times one likes until finally the task is finished. The task itself is simple: defining three integer value’s in a row who value is summarized.

 

The code is very interesting because the workflow is higher order: not a plain value but a partially evaluated workflow (!) is transmitted from one user to another.

 

 

 

Click here for the demo. Look at the Delegate code.

 

REAL WORKFLOW DEMO’s

 

Give a mark to an event

 

This example can be used to give a marking and to give a comment to some common event all users are watching, e.g. a lecture about i-Tasks. This is a real persistent workflow, you are one of the users. In this example you have to create your own login first. Than you can give either a mark, or a comment, or have look at the marks and comments of others. You can do this in any order you like.

 

The code: you can see here how a complete working i-Data workflow looks like. The login procedure actually is a an i-Tasks workflow as well.

 

 

 

Click here for the demo. Look at the Marking code.

 

News group

 

In this example User 0 can define newsgroups. This is a real persistent workflow, you are one of the users. In this example you have to create your login first. All users can subscribe to one or more of the newsgroups and read them out or submit news to them.

 

The code: a realistic example showing how compact an application like this can be coded. No attempt is made yet to produce slick looking pages though.

 

 

 

Click here for the demo. Look at the Newsgroup code.

 

 

 

Back to the download page.