<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/11/16 Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">When you start an activity for the first time, the shell generates a random activityId. It passed it on the the command line to the python activity. The activity loads the html page then runs something like this in its js context<br>
<div class="gmail_extra"><div class="gmail_quote"><div>
<br>window.sugar.environment = {activityId:...};<br><br></div><div>The js activity retrieves it using env.getEnvironment(). It also creates a datastore object and put activityId in its metadata (the objectId is generated and returned by the datastore).<br>
<br></div><div>When you resume an activity, the shell has a datastore object. It gets objectId and activityId from it and send them to the js activity through the environment as I explained above.<br></div></div></div></div>
</blockquote><div><br></div><div>Okay it make sense. Thanks.<br></div><div>Few more questions about link between datastore and journal.<br></div><div>I understand that because each objectId has an activityId, it's easy for the journal to display the related activity for each datastore entry. Right ? But what if an activity create extra datastore entries ? Is there also the activtyId field in these extra datastore entries ? If yes, how avoiding display it in the journal ? Guess also that each datastore entry has a date time entry ?<br>
<br></div><div> Lionel.<br> <br></div></div></div></div>