I'd like to create a workflow so that the first job gets some ids from a database and passes them to the subsequent jobs. It's expensive to get the ids so I'd prefer to do it only once in the master job. The other jobs should just modify the data in their own way.
I've found a similar question about how this can be achieved: Quartz.Net and passing data between chaining jobs however I'm not sure whether this is a good idea because the documentation suggests otherwise:
Only store primitive data types (including strings) in JobDataMap to avoid data serialization issues short and long-term.
What can happen if I put a List<id>
on to the JobDataMap
? Is there another way for doing this?
You are right in stating that List<int>
is not primitive. Rather, it is a finite set of primitive values. However, since string
s are considered to be primitive, you can encode your list into a JSON string
, so it will be primitive.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments