Richard,
yeah, yeah, I know. Sorry to say, I ended up having to go back to that
chapter a few weeks ago to reread it having not done much with WFs for
awhile.
In any case, it would be nice, now that the version DB is available, to be
able to pass in a DS for it to use to get the artifact. Or to set the DS to
use when the WF is defined or a WF instance is created.
Or, perhaps better, if you could pass in the version label -- or the version
number you want the WF to use. Then you'd pass the UUID of the original
object as well as the version label and internally the WF would get the
correct version for that object and invoke handlers on it.
There is one further little twist you have to watch when doing updates to
the version -- when you do a cfa_contentobjectVersionGet you pass the
original object UUID and the version label (or version number) as mentioned
above, but when you get the version back, it is given the original object's
UUID.
If you want to update the version, you have to remember to do the
contentobjectData on the actual version UUID (which I don't believe you
don't get back from cfa_contentobjectVersionGet -- you have to get it
yourself -- usually from the ObjectHistory property of the original
object -- this is the property that holds pointers to all the object's
versions).
Although this seems counterintuitive in this circumstance, in the context of
a version system, it does make some sense. Still, it would be nice to get
both the original UUID and the UUID of the version back from
cfa_contentobjectVersionGet.
I was just hoping someone would have a more elegant solution than the one I
mentioned for using the version DB with WFs.
David
-----Original Message-----
From: Richard Ragan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 24, 2001 9:51 PM
To: Spectra-Talk
Subject: Re: workflows and 1.5 versioning
It has been many moons since I looked closely at workflows so
I just checked the purple book -- hell man, you wrote the chapter
on workflows. So don't as me. LOL
Actually there does appear to be a hitch once I refreshed my
memory of WF tasks. They do get passed the object which
means that, as you say, Spectra would have trouble finding it if
it were in the version DB. I was thinking they just got the artifact id.
Too bad you can't pass in a datastore to the WF process.
Your scheme to go via the versioning data in the original object
seems as good as any I can think of right now.
Rich
> I like simple!
>
> But I'm not sure I understand what you're suggesting.
>
> When I create the workflow instance with cfa_workflowinstanceCreate, I
pass
> it the UUID of the artifact.
>
> then the tasks are associated with a method that is invoked on that
> artifact. Unless I change the spectra code, the task execute code will
> invoke that method on the original object, won't it?
>
> Hence my problem -- that the workflow code itself invokes the method I
> associate with the task and, as far as I know, that code doesn't know
about
> the version DB.
>
> Or am I missing something?
>
> david
>
> -----Original Message-----
> From: Richard Ragan [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 24, 2001 9:07 PM
> To: Spectra-Talk
> Subject: Re: workflows and 1.5 versioning
>
>
> How about a nice simple solution. Just design and implement
> your workflow to always expect to be operating on artifacts
> in the version DB. Maybe there is some reason why this
> won't work for you. Even if you had a new object, you can
> quickly copy it to the version DB before starting the WF.
>
> Rich
>
> > I have a questions about the details of how to use the version API with
> > workflows in 1.5 as I'm spec'ing an app now. Following is a description
of
> > what I want to do:
> >
> > Take an existing piece of content and kick off a workflow to manage it.
> >
> > When the workflow starts, create a version called "WorkInProgress" which
> is
> > the actual object I'm going to manage.
> >
> > Here's the issue -- I want that version to be the artifact that is
handled
> > by the workflow. But if I specify the UUID of the original object as the
> > artifact then the workflow will invoke the edit method on that original
> > object -- which is NOT what I want to edit.
> >
> > If I specify the UUID of the version as the artifact, I'm guessing the
WF
> > won't be able to find it because the version lives in the version DB,
not
> > the application DB.
> >
> > One way to handle this, although it seems a bit kludgey, would be to
> create
> > a special edit method that uses the ObjectID of the original object to
get
> > the WorkInProgress version and then edit that. This involves a
relatively
> > unnecessary get of the original object.
> >
> > Is there another, better way to do this?
> >
> > David
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.