Process definition status

25 views
Skip to first unread message

Chad

unread,
Jul 31, 2012, 10:19:57 PM7/31/12
to openwfe...@googlegroups.com
Hi,

I see 2 ways to determine status of a workflow.  Given a wfid, I look up the process with here the 'process' method, or with the 'process_ids' method.

But, after slowing down Ruote to a complete crawl, I noticed that even though a process has a wfid, it cannot be found using the methods cited above.  As you know, a process status is determined by the ProcessStatus classes fetch method.  This looks up documents of type 'expressions', 'workitems', 'errors', and 'schedules'.  However, after looking at the database, the document type for the wfid I just created is "msgs".  Hence, I can see the status of the workflow, even if it has an wfid.

I have noticed this behavior even when I have not slowed down Ruote to a complete crawl, even when we have it connected to a fast mysql server.

Is this a bug, or a feature?  And is there another way to determine the status of a workflow.  

Thanks for your help,
Chad

John Mettraux

unread,
Jul 31, 2012, 10:37:45 PM7/31/12
to openwfe...@googlegroups.com

On Tue, Jul 31, 2012 at 07:19:57PM -0700, Chad wrote:
>
> Is this a bug, or a feature? And is there another way to determine the
> status of a workflow.

Hello Chad,

it's a feature. All workflow operations are queued. Until the "launch" gets
processed (and the first expression of the workflow is created), the workflow
doesn't exist.


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

Chad

unread,
Jul 31, 2012, 10:49:08 PM7/31/12
to openwfe...@googlegroups.com
Thanks John.

Any there a way to find out if the job is in the queue?

Chad

John Mettraux

unread,
Jul 31, 2012, 11:00:38 PM7/31/12
to openwfe...@googlegroups.com

On Tue, Jul 31, 2012 at 07:49:08PM -0700, Chad wrote:
>
> Any there a way to find out if the job is in the queue?

Well, like you did, by looking at the "msgs" documents. Something like:

queued = ruote.storage.get_many('msgs', nil).find { |m| m['wfid'] == wfid }

Unfortunately, this doesn't work with all the storage implementations.

Chad

unread,
Jul 31, 2012, 11:04:27 PM7/31/12
to openwfe...@googlegroups.com
Cool.  That's was what I was just implement.  Thanks!
Reply all
Reply to author
Forward
0 new messages