Changes for page Job Question and Answer system
Last modified by Snehal Harshe on 2021/06/12 10:56
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
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.