Hi Artii,
You should be able to do this now (have a look at how the task service is
put together in the bpmscriptlibrary.js file that ships with bpmscript).
I'll look to making it easier in an upcoming version,
cheers,
j.
Artti wrote:
>
> Hi,
>
> I was just thinking; now that we can call other services asynchronously
> via futures:
>
> var future = sender.send("http://servicemix.org/components", "echo", true,
> input.getInMessage().getContent());
>
> // ... do something while waiting
> var exchange = future.get();
>
> It would be really nice to be able to do the same thing with human tasks:
>
> var taskRequest = taskService.taskRequest("How do you feel about
> BpmScript?");
> taskRequest.response("rocks", "Rocks!");
> taskRequest.setRole("ANONYMOUS");
>
> var future = taskService.request(taskRequest); <--
>
> // ... do something while waiting
> var result = future.get();
>
> At least if you need to collect hundreds of responses, you don't want to
> do that sequentially :-)
>
--
View this message in context: http://www.nabble.com/Human-interaction-and-futures-tf2114424.html#a6099587
Sent from the BpmScript - Users forum at Nabble.com.
|