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.