-
1. understanding taskclient
krisverlaenen Jan 17, 2011 9:56 PM (in response to odelyaholiday)These are two different things. The human task handler is an integration component that is registered at the engine and communicates with the human task service. You should only register it, after that it will handle the communication between the process engine and the task service.
The task client however is a client you can use to communicate with the task service, like for example query all tasks or complete a task etc. Note that you don't need this is you use a task UI (as this will instantiate a client like this for you if you click the buttons etc.).
Kris
-
2. understanding taskclient
odelyaholiday Jan 18, 2011 9:04 AM (in response to krisverlaenen)Note that you don't need this is you use a task UI (as this will instantiate a client like this for you if you click the buttons etc.).
Can you please explain more?
-
3. understanding taskclient
salaboy21 Jan 18, 2011 9:08 AM (in response to odelyaholiday)What I think that Kris is trying to explain is that if you use the gwt jbpm console, the buttons there already instantiate a task client to interact with your created human tasks.
Greetings.
-
4. understanding taskclient
odelyaholiday Jan 18, 2011 9:19 AM (in response to salaboy21)It means that every time that I invoke a task - I have to start
TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1",new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));
?
Or it should be done once?
since in the Emergency application it is being invoked only once when the user logs-in to TaskUIPanel!
-
5. understanding taskclient
salaboy21 Jan 18, 2011 11:37 AM (in response to odelyaholiday)You can do it once when the application start.. and check everytime youwant to use it is still active.. The task client creates a connectionwith the task server via socket so if the connection is interrupted youneed to connect it again. For this you can implement your own mechanismbased on the kind of environment where you are running the application.The emergency service application it's just a demo app that connect itonce and it suppose that the connection is alive forever.
-
6. understanding taskclient
salaboy21 Jan 19, 2011 9:33 AM (in response to odelyaholiday)The task clients connects to the task server. The server support multiple clients, but you can close the client with client.disconnect() after you finish the interaction with the server.
-
7. understanding taskclient
odelyaholiday Jan 19, 2011 9:36 AM (in response to salaboy21)Thanks.
I am still not sure - when do I have to start and when to disconnect from a taskclient?
-
8. understanding taskclient
salaboy21 Jan 19, 2011 9:52 AM (in response to odelyaholiday)You have the task client right?
You need to be connected in order to use it.. When you finish the interaction you can disconnect it.
The common interactions are start the task (that means that an user will start working in a specific task) and complete task (that means that the user will end the current task). Once again, for calling this start and complete task methods, you need to be connected. Depending on your application, you can connect that task client when the app start (or restart) or you can connect the task client to the server each time that you want to interact.
Greetings.
-
9. understanding taskclient
odelyaholiday Jan 19, 2011 10:02 AM (in response to salaboy21)In a regular web application - pet shop for instance - what would you recommend?
-
10. understanding taskclient
salaboy21 Jan 19, 2011 10:05 AM (in response to odelyaholiday)For each user that logs in to the application you should create a task client and disconnect it when the users logs out. That will be my first option.
-
11. understanding taskclient
odelyaholiday Jan 19, 2011 10:06 AM (in response to salaboy21)Thanks I appreciate your help.
-
12. understanding taskclient
odelyaholiday Jan 19, 2011 10:28 AM (in response to odelyaholiday)Does that mean that for each client I have to check what port on my machine is not listening? what if I have 100000 users logging at the same time?
-
13. understanding taskclient
salaboy21 Jan 19, 2011 11:29 AM (in response to odelyaholiday)Probably you are missing something. you have just one server in the 9123 port right? then you can connect any number of clients to that server?
The only thing that the client must know is the server IP and Port..
Why do you want to check the ports that are being used in your machine?
Are you trying to start multiple task server? (task server are the only ones that require to have a free port to run.. so if you want to have multiple task server you require multiple ports, only if you want to do that in the same machine)
Cheers.
-
14. understanding taskclient
odelyaholiday Jan 25, 2011 3:28 AM (in response to salaboy21)and what about StatefulKnowledgeSession - shall I have one running for web application (like pet shop) or for each client should I start and end it?