| 2010-11-02 06:45:04 utc | jmettraux | codebeaker: hello |
| 2010-11-02 07:03:23 utc | jmettraux | codebeaker: you usually don't need to ask the workflow where you are, it tells you by giving you some work |
| 2010-11-02 07:03:26 utc | jmettraux | it's a workflow engine |
| 2010-11-02 07:04:15 utc | jmettraux | but if you want to know anyway, you can do engine.process(wfid).position |
| 2010-11-02 07:04:48 utc | jmettraux | it will list the participants to which it has attributed workitems |
| 2010-11-02 08:14:37 utc | codebeaker | thanks jmettraux (sorry, was sleeping) |
| 2010-11-02 08:14:45 utc | jmettraux | you're welcome |
| 2010-11-02 08:14:59 utc | codebeaker | … that makes sense, also then the right way is to see when something requires work from the "user" and show it to them |
| 2010-11-02 10:32:38 utc | hassox | good evening |
| 2010-11-02 10:52:01 utc | hassox | hey guys |
| 2010-11-02 10:52:14 utc | hassox | is anyone here who could help me work out a storage_participant query? |
| 2010-11-02 10:59:47 utc | tosch_le | hassox: i'll be back in about an hour. |
| 2010-11-02 10:59:53 utc | hassox | kk |
| 2010-11-02 11:00:02 utc | hassox | I'll prolly be gone by then... but I'll remember it ;) |
| 2010-11-02 11:00:06 utc | tosch_le | perhaps i may help quickly |
| 2010-11-02 11:00:07 utc | hassox | thanx |
| 2010-11-02 11:00:14 utc | hassox | kk lemme gist |
| 2010-11-02 11:00:58 utc | hassox | tosch_le: just pm'd the gist |
| 2010-11-02 11:00:59 utc | hassox | so |
| 2010-11-02 11:01:07 utc | hassox | there is a participant incidents |
| 2010-11-02 11:01:25 utc | hassox | and when I launch, I pass it :incident_id => 1234 |
| 2010-11-02 11:01:51 utc | tosch_le | ok |
| 2010-11-02 11:01:56 utc | hassox | lets say I have a Rails controller action that accepts the witness reports |
| 2010-11-02 11:02:04 utc | hassox | and when all witnesses have reported |
| 2010-11-02 11:02:08 utc | hassox | I want to reply to the engine |
| 2010-11-02 11:02:12 utc | hassox | so |
| 2010-11-02 11:02:29 utc | hassox | I'm guessing the first thing I need to do is to find the work item for that participant with that command |
| 2010-11-02 11:02:50 utc | hassox | engine.storage_participant.query(:participant => "incidents", "${f:params:command}" => "/gather_witness_reports}", "${f:incident_id}" => 14) |
| 2010-11-02 11:03:03 utc | hassox | sorry.. the incident_id should be 1234 |
| 2010-11-02 11:03:08 utc | hassox | copy / paste ;) |
| 2010-11-02 11:03:23 utc | hassox | would that query find the right thing that I could then reply to the engine with? |
| 2010-11-02 11:03:41 utc | hassox | ACTION is a bit lost with long running processes |
| 2010-11-02 11:03:46 utc | tosch_le | no, dollar substitution is for process definitions only afair |
| 2010-11-02 11:03:52 utc | hassox | so |
| 2010-11-02 11:04:08 utc | tosch_le | let me have a look at the query method |
| 2010-11-02 11:04:22 utc | hassox | engine.storage_participant.query(:participant => "incidents", "f:params.command" => "/gather_witness_reports", "f.incident_id" => 14) |
| 2010-11-02 11:04:32 utc | hassox | engine.storage_participant.query(:participant => "incidents", "f.params.command" => "/gather_witness_reports", "f.incident_id" => 14) |
| 2010-11-02 11:04:35 utc | hassox | I meant that one |
| 2010-11-02 11:06:39 utc | tosch_le | engine.storage_participant.query(:participant => "incidents", "incident_id" => 14) |
| 2010-11-02 11:07:04 utc | tosch_le | i don't know if you may check for an entry in params with that method |
| 2010-11-02 11:07:22 utc | hassox | but, that could grab either the witnesses sequence, or the employments_involved sequence couldn't it? |
| 2010-11-02 11:08:05 utc | tosch_le | yes. you'll have to select the appropriate items yourself |
| 2010-11-02 11:08:42 utc | tosch_le | hmm. i'm not happy with my answer. please drop a post in the ml, that could be a feature request |
| 2010-11-02 11:08:53 utc | hassox | sure |
| 2010-11-02 11:08:57 utc | hassox | thanx :) |
| 2010-11-02 11:09:30 utc | tosch_le | anyway, perhaps it's more easy to put the fei into the form |
| 2010-11-02 11:10:02 utc | tosch_le | s/fei/wfid |
| 2010-11-02 11:10:37 utc | hassox | but, how do I get hold of it? |
| 2010-11-02 11:10:40 utc | hassox | oh |
| 2010-11-02 11:10:41 utc | hassox | wfid |
| 2010-11-02 11:10:48 utc | hassox | I was talking to john the other day |
| 2010-11-02 11:11:16 utc | hassox | and he said that there could be many fei's per wfid (one for each point in the workflow) |
| 2010-11-02 11:11:32 utc | tosch_le | yes, sure |
| 2010-11-02 11:12:03 utc | tosch_le | let me repeat for better understanding: you want to show a form? |
| 2010-11-02 11:12:14 utc | tosch_le | for gathering reports |
| 2010-11-02 11:12:28 utc | hassox | so |
| 2010-11-02 11:12:47 utc | hassox | I'm not really sure how to deal with long running processes (i.e. that don't respond immediately) |
| 2010-11-02 11:12:59 utc | hassox | so the idea is that when the incident occurs, a process is launched |
| 2010-11-02 11:13:19 utc | hassox | at some point, witnesses are identified |
| 2010-11-02 11:13:42 utc | hassox | that's the record_witnesses command |
| 2010-11-02 11:13:54 utc | hassox | (I don't know how to get that done yet but it's the same answer) |
| 2010-11-02 11:13:55 utc | tosch_le | ok, i'd recommend to name your participants after the actions |
| 2010-11-02 11:14:14 utc | hassox | so, when I get to the gather_witness_reports command |
| 2010-11-02 11:14:21 utc | tosch_le | if you use the catchall, each will point to the storage participant |
| 2010-11-02 11:14:30 utc | hassox | I will email the witnesses asking them to follow a link, to complete a report |
| 2010-11-02 11:14:33 utc | tosch_le | will make querying easier |
| 2010-11-02 11:14:43 utc | hassox | I don't understand |
| 2010-11-02 11:15:14 utc | tosch_le | let me re-start |
| 2010-11-02 11:15:27 utc | tosch_le | incidents :command => "/gather_witness_reports" |
| 2010-11-02 11:15:38 utc | tosch_le | will block until all reports are gathered? |
| 2010-11-02 11:16:36 utc | tosch_le | you have to functionalities here: 1) send mails to the witnesses and 2) wait for (and process/save) answers |
| 2010-11-02 11:16:56 utc | tosch_le | 1) is done immediately, 2) blocks |
| 2010-11-02 11:17:29 utc | hassox | well, until all witness reports are gatherd |
| 2010-11-02 11:17:35 utc | hassox | correct |
| 2010-11-02 11:17:36 utc | tosch_le | i'd use two different participants for that |
| 2010-11-02 11:17:57 utc | tosch_le | 1) sends the mails, 2) is the storage participant |
| 2010-11-02 11:21:08 utc | hassox | that makes sense |
| 2010-11-02 11:21:13 utc | hassox | I guess I've overloaded them |
| 2010-11-02 11:21:45 utc | tosch_le | i forked your gist |
| 2010-11-02 11:22:00 utc | tosch_le | just to give you the idea what i meant with renaming the participant |
| 2010-11-02 11:22:31 utc | tosch_le | the storage participant may be used as a catchall, it will catch all workitems not caught by another participant registered |
| 2010-11-02 11:22:46 utc | tosch_le | you may use the participant name in the query method |
| 2010-11-02 11:23:07 utc | tosch_le | engine.storage_participant.query(:participant => "incidents", "incident_id" => 14, 'participant' => 'witnesses') |
| 2010-11-02 11:23:41 utc | tosch_le | but querying after the 'command' param should work, too. i just don't know how atm |
| 2010-11-02 11:24:07 utc | hassox | looking |
| 2010-11-02 11:25:03 utc | tosch_le | (i mean: it should work not in a sense that it already does ;-) ) |
| 2010-11-02 11:25:08 utc | hassox | so |
| 2010-11-02 11:25:21 utc | hassox | don't provide a participant and just let it go through to the keeper so to speak? |
| 2010-11-02 11:25:33 utc | hassox | then query and reply manually via the storage participant? |
| 2010-11-02 11:25:43 utc | tosch_le | sorry, have to leave now. will be back in an hour |
| 2010-11-02 11:25:44 utc | hassox | ACTION brain melt |
| 2010-11-02 11:25:46 utc | hassox | np |
| 2010-11-02 11:25:52 utc | hassox | would love to continue this tomorrow :) |
| 2010-11-02 11:25:57 utc | tosch_le | but yes, that's the way i'd go |
| 2010-11-02 11:26:02 utc | tosch_le | your welcome! |
| 2010-11-02 11:26:54 utc | hassox | tat's really interesting |
| 2010-11-02 11:26:58 utc | hassox | hey jmettraux |
| 2010-11-02 11:27:10 utc | jmettraux | hassox: hello ! |
| 2010-11-02 11:27:11 utc | hassox | I didn't realise that's what a catchall is used for |
| 2010-11-02 11:27:15 utc | hassox | how are you mate? |
| 2010-11-02 11:27:21 utc | jmettraux | fine and you ? |
| 2010-11-02 11:27:38 utc | jmettraux | is tosch_le helping you out ? |
| 2010-11-02 11:27:53 utc | hassox | indeed |
| 2010-11-02 11:28:01 utc | hassox | ACTION just made my first post to the ml :D |
| 2010-11-02 11:28:07 utc | hassox | talking about this one |
| 2010-11-02 11:28:30 utc | jmettraux | just "always allow"ed you |
| 2010-11-02 11:28:30 utc | hassox | trying to wrap my head around processes that don't respond immediately |
| 2010-11-02 11:28:36 utc | hassox | thanx :D |
| 2010-11-02 11:29:11 utc | jmettraux | OK, dinner time for me, let me answer your email right after it |
| 2010-11-02 11:29:37 utc | hassox | thanx heaps dude :D |
| 2010-11-02 11:29:41 utc | hassox | there's no great rush |
| 2010-11-02 11:29:45 utc | hassox | ACTION is about to o to bed ;) |
| 2010-11-02 11:29:59 utc | jmettraux | ok, great |
| 2010-11-02 11:30:03 utc | hassox | first working day in 4 days tomorrow ;) |
| 2010-11-02 11:30:24 utc | jmettraux | :-) |
| 2010-11-02 12:52:31 utc | jmettraux | tosch_le: hello, many thanks for helping hassox |
| 2010-11-02 12:53:10 utc | tosch_le | never mind, had some troubles figuring out what to say in what way, but it was fun |
| 2010-11-02 12:54:11 utc | tosch_le | he wanted to query the storage participant for a field within the params field. is this possible? |
| 2010-11-02 12:54:26 utc | tosch_le | after having a look at the code, i'd say no. |
| 2010-11-02 12:55:57 utc | jmettraux | depends on the storage |
| 2010-11-02 12:56:32 utc | jmettraux | IIRC, we've arranged only for querying top level fields |
| 2010-11-02 12:57:24 utc | tosch_le | it's ok for me, but i'll have to tell hassox |
| 2010-11-02 12:57:48 utc | jmettraux | he fired an email to the mailing list, IIRC it includes that question |
| 2010-11-02 12:58:16 utc | tosch_le | yep. |
| 2010-11-02 16:20:21 utc | jmettraux | answered to hassox : http://groups.google.com/group/openwferu-users/browse_thread/thread/2b76b1b7ac024b52 |