Facts can be retrieved, compared against, and written to (if not read-only) from within jobs. Every grid object has a set of accessor and setter JDL functions. For example, to retrieve the cryptpw job argument fact in the job example listed in Job Arguments and Parameter Lists, you would write the following JDL code:
1 def job_started_event(self): 2 pw = self.getFact("jobargs.cryptpw")
In line 2, the function getFact() retrieves the value of the job argument fact. getFact() is invoked on the job instance grid object.
The following set of JDL grid object functions retrieve facts:
getFact() factExists() getFactLastModified() getFactNames()
The following set of JDL grid object functions modify fact values (if they are not read-only) and remove facts (if they are not deleteable):
setFact setDateFact setTimeFact setArrayFact setBooleanArrayFact setDateArrayFact setIntegerArrayFact setTimeArrayFact setStringArrayFact deleteFact
For more complete information on these fact values, see GridObjectInfo.