• Object Variable Not Set when attempting to create first Workflow in a new database

    By Mark Demicoli 2 decades ago

    After deploying QAF o a fresh database then attempting to create the first Workflow, "Object Variable Not Set" is thrown from PostOpen. This occurs because the Global Settings document does not yet exist.

    • I was about to post this same bug

      By Kevin Pettitt 2 decades ago

      Ha, you're too fast for me! I ran into the same problem and realized I needed to create a new Global Settings document manually to fix it. I was thinking that adding the creation of the GS doc to the deployment functionality would be a possibility, but a better approach I think would be to trap for these sort of "missing GS" errors and compose a new document right then and there (assuming proper roles), displaying a message saying that "You must define Global Workflow Settings for this database before you can proceed". If for some reason someone without the proper role (not even sure if there is one for GS creation), received this error, you could at least pop up saying something like "The Database Administrator must create the Global Workflow Settings for this database before you can proceed".



      I very nearly abandoned my experimentation with this database after getting this error, as I wasn't sure how stable the whole enterprise would be. As complex as the code is, and with the minimal documentation currently available, it requires a good leap of faith to invest sufficient time in learning how it all works. Any little hiccup that early in the evaluation could easily discourage further evaluation. Happily, I was able to figure out that the error was not really a "bug" per se and move on, and I have had little trouble defining and connecting my various workflow pieces after that. I do think a little more "quickstart guide" kind of documentation will be extremely helpful, and I'm taking notes as I go to help out in that regard - stay tuned.

      • QAF setup

        By Mark Demicoli 2 decades ago

        Kevin, excellent suggestions. The basic core of the workflow engine is quite sturdy but as you discovered I messed up some important peripheral things while preparing for openNTF! As you say it's essential to make this easy to get stuck into quickly. I'm thinking along the lines of an initial setup 'wizard' which will make sure everything is configured right to get the developer going. This is where I'll be concentrating for release 1 in the next month or so, so any more ideas along the lines you've suggested would be appreciated.



        At the moment my thinking is that the initial setup will request essential info such that:


        1. Global Settings (GS) basics are in place for proper operation, plus ask user to select any global workflow preferences (eg unique reference numbering etc).
        2. Common Global Roles & States created (eg, Administrator role, Initial Author role, common states eg Draft, Open, Closed etc).



          My view is that the need for usage documentation should be minimal if we can pay enough attention to making the beast intuitive. Technical doco is something I want to tackle later.
        • Populating a "default workflow" a great idea

          By Kevin Pettitt 2 decades ago

          Mark, I think pre-populating the most basic workflow elements upon creation of a new workflow is a great idea. I would take it one step further and allow the creation of "workflow templates" such that whenever a new workflow is being created, you could have a selection of pre-built options to choose from and customize. The "default" one you describe would simply be the first and most basic one. I had also been thinking about a similar concept of "copying" a workflow for use elsewhere. Maybe we simply combine the concepts, and create a "copy workflow" agent that asks which database to look in for an existing workflow definition, then asks for a new name, and finally copies all those documents into the current db, modifying the necessary fields along the way. You would then just need to have a default workflow defined somewhere, perhaps in a "workflow repository" db. Finally, in order to keep track of which newly copied workflow docs have been "verified" or "customized" for their new purpose, some sort of draft/unverified flag might be employed.



          This is not unlike the paradigm of creating new Notes dbs from templates or by copying existing ones, but there still are differences to consider. For starters, there are form dependencies that may not be obvious from a cursory look at the workflow documents. Maybe the answer is to include the form note (and other dependencies) in the definition of the workflow so it is copied along with the docs. And there are also ACL Role dependencies, and perhaps even specific names that may be entered in some places, making it hard to share a workflow between companies, for instance.



          This last point touches on the possibility of creating a secondary open-source project for workflow definitions using the Qenos framework. I don't know if DXL is mature enough to be used for this purpose yet, but regardless there are ways to do this I'm sure.



          Of course, putting a lot of effort into this may be unnecessary, since one can always just copy an existing .nsf, workflow docs, forms, and all, and then customize. If however a single database needs to have multiple, similar workflows, then this becomes much more useful. I suspect this is often the case, so the effort is probably worthwhile.

          • workflow repository

            By Mark Demicoli 2 decades ago

            Good thinking. The concept is good and I can see how this would encourage the community to upload/share workflows for the benefit of others. Are you interested in managing it? Go on then :)





            It actually reminds me of an idea I've been toying with for a while, whereby the workflow engine is exposed as a web service. This has a number of benefits. Firstly, workflows can be centralised (workflow repository), shared & controlled more effectively. Secondly it opens the door to non-Notes client software.