Curiosity about Item References

  • 20 February 2019
  • 2 replies
  • 1 view

Badge +8

I'd like to fully understand how Item References work. How often does K2 go back to the data source to get the LOB data?

 

If I create a Reference in a workflow (talking K2 Five here), then every time I want to use a property of that reference, does K2 go to the source for that one item? So if I use 5 values to construct and email, has it hit the source 5 times?

 

Or .. does the reference get some point in time understanding of the data and hold it in memory? If so, when/how often does it go to get the source data?

 

Thanks.


2 replies


Good day Doug

An Item reference only hit the smart object once to retrieve data based on an ID. So you usually have an Item Reference step at the beginning of a workflow to get the data of the field correlating with the ID and then as the workflow progress, It uses that data that gets stored in variables. Please see the documentation link listed below about how Item References work and how to use these item references in a workflow.

Documantation:
https://help.k2.com/kb001367

Kind Regards
Jacques.

Badge +8

So what happens if the data changes while the workflow is running? Say it's a long running workflow, the Item reference is created when the workflow starts. 2 weeks later a step runs to use the values of the reference. If the data had been changed in the LOB system during those 2 weeks, will the workflow know about it? Or will the data be stale?

Reply