Hello Klaus,
welcome to the ruote mailing list.
Process variables are not the same thing as workitem fields [1]
You cursor 1 and your cursor 2 work on a different copy of the original
workitem. When the concurrence ends, the workitems get merged [2].
There are various ways to do the thing you seem to be doing, the most obvious
one is:
---8<---
sequence do
participant 'askForBudget'
participant 'sayMyBudget'
end
--->8---
I.e. keep the "budget" as a workitem field and never call "sayMyBudget"
before "askForBudget".
Best regards,
--
John Mettraux - http://lambda.io/processi
[1] http://ruote.rubyforge.org/vars_and_fields.html
[2] http://ruote.rubyforge.org/exp/concurrence.html
Hello Klaus,
from what you describe, you seem to be using a file storage shared by your
two "engines", making them effectively a single "engine". The worker in
terminal 1 and the one in terminal 2, each launch a workflow and then compete
for pieces of work.
Not all storage implementations are "multi worker" enabled. The documentation
at http://ruote.rubyforge.org/configuration.html#storage should help.
> My Questions:
>
> 1. What have i to do in order to execute multi process-instances at
> the same time?
You just described how you ran two process instances thanks to two workers
above...
> My goal is later to built a web-application for multi-
> authors in order to generate knowledge-Objects which are thebase fpr
> new knowledge-modells (its part of my master thesis). Is it possible
> to configure one processinstance with a web-session-id?
I guess that you could launch a process instance and pass a workitem field
containing the web-session-id:
---8<---
@dashboard.launch(process_definition, 'web_session_id' => web_session_id)
--->8---
This sets the workitem field 'web_session_id' at launch. Of course, you can
set more fields.
I have the impression you're trying to build a web wizard (because you want
to store that "web-session-id"). What if the workflow is meant to live longer
than a browser session?
You could decide not to care about "web sessions" and simply have different
tasklists or worklists by users and they pick workitems there and proceed
them or cancel them (ruote-kit's web interface is a some example of that).
> 2. Is there a way to interact with instance variables between
> different Process-Instances e.g. for looking some ressources ect. Or
> whats it the mainly used technology in order to synchronize some
> instances?
It's not possible. Instead it's much easier for different workflow instances
to share resources by pointing at them.
---8<---
@dashboard.launch(
process_definition,
'customer_id' => customer_id,
'item_id' => item_id)
--->8---
Here the process instance carries customer_id and item_id around and updates
those in the database. It doesn't carry the whole objects in the workitem
fields.
Now you can extend that and use it to make process instances
"communicate"...
I'm probably not replying exactly to your question, but if you step back a
few paces and look at the whole house you'll think about different ways to
ask your question.
> 3. Is "ruote-fluo" still the state of the art in ruote-process-
> visualization?
It's more of an example. I'm working on a new, SVG, version, but I have
trouble finding time for it, https://github.com/jmettraux/ruote-fluo/tree/svg.
Hope it helps, kind regards,
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to openwfe...@googlegroups.com
to unsubscribe : send email to openwferu-use...@googlegroups.com
more options : http://groups.google.com/group/openwferu-users?hl=en
I never wrote you needed more of a customer-based workflow-instance than a
web-session [-based one]...
> So i tried this:
>
> wfid = dashboard.launch(pdef, 'customer_id' => customer_id) .. with an
> individual given ID. But the same: If i start 2 Session (each in a
> different terminal), the output of the one occurs in the other and the
> input of the other terminal occurs asynchronously in the other terminal
> window.
You took my answer to your question number 2 as an answer to your unnumbered
initial question... It's very difficult to have a conversation with such a
confusing technique of yours.
Please define what do you mean by "starting a Session". Don't hesitate to use
a gist: https://gist.github.com/
> Maybe i need a separate process-definition-name?
No. What we need is a common understanding.
> I think, i understood the theory: one piece of work will be done by multi
> users.
Let me rephrase. If you have multiple ruote workers, they will compete for
pieces of work, one piece of work will be executed by a single ruote worker.
If now by "piece of work" you mean "workitem" and by "user" you mean a human
using a web browser, then a workitem will be done by a human if he's
presented with the workitem in some way (in ruote-kit this is done via the
"workitems" tab).
> But in my case, each user (web-client) has to go through the same
> workflow (from the beginning until the end). The instances differentiate
> only by the different user-choice of sub-processes, they want to go
> through. Do You know a better way to synchronize the sessions for each
> client?
This is unclear. Could you please explain your use case as it looks for the
human using the system?
> An other problem i saw is the Timeout of 60s. Even if i give a much longer
> timeout to my main sequence like
>
> sequence :timeout => '2000s' do...
The problem here is that you're using "wait_for" which is a testing/demo
tool.
In production one lets the workflow instances run their course and never uses
wait_for.
wait_for is used in tests and demonstrations, to pause the main thread of
execution while the workflow is running, then, when wait_for returns the
control to the main thread, to verify if the workflow instance or the whole
system is in the desired state.
As said in my previous answer, you should investigate "worklists", ie points
where workitems accumulate and users (humans) may do/perform them. I'm sorry,
but in my previous answer, I forgot to mention that there is a ready made
"worklist" in the form of Ruote::StorageParticipant.
Your use of wait_for indicates you're misunderstanding ruote. I have the
impression you're trying to make it work synchronously instead of
understanding it and leveraging its asynchronoucity.
Once again, are you trying to build a "wizard system":
http://en.wikipedia.org/wiki/Wizard_%28software%29 ?
> there is a timeout after 60s:
>
> /home/hugo/.rvm/gems/ruby-1.9.2-p318/gems/ruote-2.3.0/lib/ruote/log/wait_logger.rb:144:in
> `block in wait_for': waited for [:informTimeout], timed out after 60s
> (Ruote::LoggerTimeout)
>
> i found it is the default value for timeout, defined here:
>
> /ruby-1.9.2-p318/gems/ruote-2.3.0/lib/ruote/log/wait_logger.rb
> @timeout = context['wait_logger_timeout'] || 60 # in seconds:
>
> But how can i set the timeout to infinitely?
You can set the timeout to infinity with a negative value:
> An Other question is, how to interrupt and reopen a started
> process-instance? Is such an interrupt also possible in a shell client?
Please define "interrupt".
Please define "reopen".
> With "ruote-fluo" i am nearly happy. Wasn't there a possibility to start
> and stop the instances? Or was this only possible with ruote-kit?
ruote-fluo != ruote-kit
Have you noticed that ruote-kit uses ruote-fluo? ruote-fluo is only meant to
render workflow definitions. The administration console is ruote-kit,
ruote-fluo is only a rendering tool (repeating that).
Someone might want to use ruote-fluo only and provide his own tool for
process administration instead of ruote-kit.
> Last but not least:
> why do i have to use this Dashboard now, instead of the engine?
Because I made a mistake when I first named it an "Engine". The enactment of
workflow instances is performed by workers, the sum of the workers is the
engine, there is no execution happening in Ruote::Engine / Ruote::Dashboard,
it's only a dashboard, there are a few indicators and a few wheels to turn,
but the real thing is happening in Ruote::Worker on top of storage
implementations.
I'm now trying to show a good example and use "Dashboard".
> Hope to get the overview once.
Let's do our best.
Best regards,
Not sure if it's an architecture or if it focuses on your problem, but I've
compiled an example at
https://github.com/jmettraux/for_klaus
It's composed of a server (ruote worker) and a client.
Log in as "alice" and launch a new flow, select a workitem, add a note to it,
proceed it, ... Exit the client, come back into it, check again the "notes",
...
I hope this will help you. If you have further questions, please ask.
Kind regards,