<
From version < 3.1 >
edited by Thomas Mortagne
on 2018/03/20 10:45
To version < 5.1 >
edited by Thomas Mortagne
on 2018/03/20 10:51
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,6 +2,14 @@
2 2  
3 3  When the job is in interactive mode it can ask questions and wait for the answer. The UI is then supposed to make sure the user is going to see the question and answer it.
4 4  
5 += Job status =
6 +
7 +The general idea is that a job question is a Java POJO containing "properties" (a set of setters/getter) for each information the job would like an answer to (or a confirmation). Once those properties have been set ##JobStatus#answered()## is called to notify the job to continue.
8 +
9 +On the Job side it means calling ##JobStatus#ask(myquestion)## which will block until the question is answered.
10 +
11 +But this API is not restricted to the job itself, it can be used by a listener reacting to something a generic job has done for example. In such a use case you can use ##org.xwiki.job.JobContext## component to access the current job and its status.
12 +
5 5  = User interface =
6 6  
7 7  To make easier to provide UI for your job the Job module provide generic tools to show and answer a question and allow customizing and extending it in various ways.

Get Connected