[rules-users] Querying persistence rules flow data

Mauricio Salatino salaboy at gmail.com
Wed Feb 25 07:51:03 EST 2009


Good questions, here goes some answers:

1,2) As you know the human task service here is fully pluggable and
drools have their own implementation. This implementation is based on
Web Services Human Task standard and is implmented in MinaTaskClient
class using the TaskServiceSession class to do all that kind of stuff
with tasks. Like assignments, abort, skip, query, etc. You could take
a look at this class to see how it works or just use it. This class is
inside the Drools-Task module, and of course, this module have all the
functionality about tasks. Also you can take a look at
WSHumanTaskHandlerTest where all this kind of functionalities is
tested.

3) there is a lot of situation when you don't have to update the old
processes that start the execution with an old definition. there is
also a lot of situation when you want to updated. In jBPM and here i
think that the best approach will be some kind of migration procedure
for one version to another.. but is just my opinion.. and i think that
this need to be analyzed for each particular situation.

4) If you see the TaskData class have the following attributes:
  private User             createdBy;

    private Date             createdOn;

    private Date             activationTime;

    private Date             expirationTime;

that are persisted when a task is created.. this TaskData is an
embedded entity inside the Task entity. You also can take a lot at
that.. to see if all the attributes that this class have are enough
for you.

Let me know if i can help you with something else!



On Wed, Feb 25, 2009 at 9:17 AM, CK <chrisckc at gmail.com> wrote:
> Hi all,
>
> Before I ask my question, just wanted to know if others have noticed that
> the Hudson docs for Drools 5 is not available online.  Or maybe it's just
> me?
>
> I'm a little bit of a beginner in this particular area on the Drools flow
> and its persistence mechanism.  I have a couple questions that maybe someone
> can answer for me.
>
> Say that I have a long-running workflow process.  When it reaches a human
> task (ie. take out trash), the workflow gets saved/persisted to the DB.
>  Once the trash is taken out, the user updates this status.  The workflow
> continues and finishes.
>
> My questions are fairly simple:
>
> 1) How would I query for a list of human tasks that have not yet been
> completed?  I believe the answer for this one is simply in the
> demo/test/example codes, but somehow I can't seem to find it.  I see mostly
> codes that sends complete/fail methods to indicate that the process is
> completed.  Is there an API for this that I can look at?
>
> 2) Is there an API that allows me to query completed items, failed items,
> etc?  It'd be great if someone can point to the right class.
>
> 3) What happens to old long-running processes currently still waiting to be
> finished (and stored in the DB) when I decide to change the workflow process
> (either manually or in Guvnor)?  What would be a good way in dealing with a
> situation with changing workflow processes?  Create a new workflow (with a
> new workflow id) and have all new requests go through the new workflow?  If
> that's the case, then how would one "upgrade" the old workflow processes?  I
> believe jBPM also has an issue with this, along with all other workflow
> engines with long-running processes.  Is there a recommended way?
>
> 4) Is it a good idea to just have Drools store the workflow status data (ie.
> task start and completion date) and use that to query and calculate
> performance or is it better to create an additional workflow step that
> updates my own database table containing these data?  Is there also a
> recommended way for this procedure?
>
> I appreciate any insights and recommendations that you have.
>
> Thanks,
> Chris
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 - Salatino Mauricio -




More information about the rules-users mailing list