On Mon, Feb 20, 2012 at 02:33:08PM -0800, John Roberts wrote:
>
> We have an error participant that takes care of a host of things in the
> event that a runtime error occurs...  I think the type of error I want to
> catch at this stage in the development process is that we have incorrectly
> defined the workflow logic in a new or modified workflow, which results in
> an unexpected workitem getting generated.  In this case, our test suite is
> calling dashboard.wait_for(expected_workitem), so it just hangs, waiting
> ever so patiently for a workitem to appear that will never appear due to
> our (usually my) logic error.

Hello John,

I interpret your

> our test suite is calling dashboard.wait_for(expected_workitem)

as

> our test suite is calling
> dashboard.wait_for(:name_of_the_participant_expected_receive_a_workitem)


In this case, you could write something like

---8<---
  r = dashboard.wait_for('dispatched')
  assert_equal 'expected_participant_name', r['participant_name']
--->8---

The wait_for will return as soon as a workitem is dispatched. The resulting
message, stored in "r", yields useful info for assertions.


I hope it helps, best regards,

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

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to