Forum OpenACS Q&A: Ticket tracker and multiple workflows

Collapse
Posted by Ian Boyle on
Hi all,
I have a question regarding using a ticket tracker application(s) and more than 1 workflow.

I'm using OpenACS V4.5 with Oracle 8i.

I have an instance of the ticket tracker application running.

This ticket tracker is associated with a workflow. This is working fine.

I've now created a second workflow - and I want to associate this workflow to a ticket tracker.

My understanding of what I need to do is as follows:

1. create a new directory in the site-map and use(mount) a second instance of the ticket-tracker application.

2. create a new set of  procs/functions like those in ticket-tracker-packages.sql that reference the package_id and workflow_key of the second workflow/ticket tracker.

3. Change all ticket-tracker code so that everytime one of these packages,functions is called it says:

if ticket-tracker_1 && workflow_key_1 :
  do a,
      b,
      c,
else if ticket-tracker_2 && workflwo_key_2 do:
      x,
      y,
      z

e.g.

If <workflow_1> do:
begin
        :1 := ttracker_ticket.new (
            context_id    => :package_id_1,
            subject      => :subject,
            description  => :description,
            mime_type    => :mime_type,
            category_id  => :category_id,
            severity      => :severity,
            priority      => :priority,
            type          => :type,
            deadline      => :deadline_date,
            referral_source => :referral_source,
            process_type  => :process_type,
            creation_user => :user_id,
            creation_ip  => :creation_ip
        );
    end;
else if <workflow_2>

begin
        :1 := ttracker_ticket.new_workflow_2 (
            context_id    => :package_id_2,
            subject      => :subject,
            description  => :description,
            mime_type    => :mime_type,
            category_id  => :category_id,
            severity      => :severity,
            priority      => :priority,
            type          => :type,
            deadline      => :deadline_date,
            referral_source => :referral_source,
            process_type  => :process_type,
            creation_user => :user_id,
            creation_ip  => :creation_ip
        );
    end;

Question 1: Are the above steps correct ?
Question 2: Is there an easier way ? 😊 !!!, particularly
part 3, it seems quite cumbersome.

Tia
Ian Boyle

Collapse
Posted by Kevin Crosbie on
Hey Ian,

Long time no see eh?

I think you can easily do what you want without any major complicated work.  Using the Sitemap, you can already mount two versions of the same ticket tracker because all of the tables contain a package_id, thus if you have two different urls set up for your ticket tracker, you will see them as two separate ticket trackers.

In the ticket-add page, you could have a person choose which workflow they want to use, and modify the ticket-tracker.new proc to accept this rather than the hardcoded one.  An alternative method of choosing which workflow to use, you could use ad_conn url, find out which url you have come from, and select the workflow based on this.

Hope this helps!

K.

Collapse
Posted by Titi Ala'ilima on
I think you may be better off creating a new package called ticket-tracker-2, copying the code from ticket-tracker into ticket-tracker-2, and modifying from there. Then you know which code which ticket-tracker is running. Of course then you've forked and have to maintain two sets of code, so if you think there will be a lot of such maintenance work, then this would be similarly troublesome.

The other thought I have right now is trying to push the conditional branching down into the PL/SQL, so you don't have to touch the Tcl at all. Are the differences in the workflows sufficiently transparent that you could hide it like that? How much work would it be to make sure the package_id gets passed into the PL/SQL at all times (in your example, it gets passed in as context_id)?

Collapse
Posted by Ian Boyle on
Thanks for the suggestions Guys.

I'll get back to y'all with my findings!

Collapse
Posted by Lars Pind on
Ian,

Just wanted to let you know that we (Collaboraid) are in the process of developing a replacement workflow package as well as a replacement for ticket-tracker, similar to the existing bug-tracker.

We've made considerable progress, in fact, we already have bug-tracker mostly working with the new workflow package, but a final production-ready version is still probably about five weeks off (we're aiming at three weeks, so I'm saying five to be conservative here).

Just to give you an idea of how far along we are, the things that are still missing are:

- Caching in the workflow API
- Service-contract-based callbacks
- Mapping users to roles
- Task list UI
- Internationalizing
- Porting to Oracle
- Scalability
- Documentation
- Doing the ticket-tracker (mostly copy-and-paste from bug-tracker)

If we feel like we have the time, we have a couple other wish-list item we'd like to throw in there:

- Metadata for objects/forms
- List builder

Just so you (and others) know where we're at.

/Lars