Jump to content

For what do I need workflow data?


Recommended Posts

  • I probably think somewhere in this forum my question is already answered, but I couldn't find it. :/

So I was wondering what all the different workflow data is for. All the great Libs (post link) are able to find the cache dir, data dir, bundle id and different stuff. But why do I need this?

 

David mentioned Data Storage here but I don't really understand what the difference between these two dirs is.

 

Can any one explain me why my workflow should know the bundle ID, the cache and data dir?

Link to comment
  • I probably think somewhere in this forum my question is already answered, but I couldn't find it. :/
So I was wondering what all the different workflow data is for. All the great Libs (post link) are able to find the cache dir, data dir, bundle id and different stuff. But why do I need this?

David mentioned Data Storage here but I don't really understand what the difference between these two dirs is.

Can any one explain me why my workflow should know the bundle ID, the cache and data dir?

The cache should be used for data that will not be needed very long. For example, in my Colors workflow, I use the cache to store the color preview images generated by my script; the files are for that moment, only saved for quick access, deletable, unnecessary, and can be made again.

The data folder is for information that will be needed again and again. For example, user credentials (like the AppID in my Wolfram|Alpha workflow, passwords, usernames, etc.). They are necessary for functionality, and if deleted, need to be replaced manually.

The workflow's actual path folder holds scripts, non-changing icons, and other core components of the workflow. These will be deleted and replaced if the workflow is updated, thus updating the components.

Bundleid is used to identify your workflow. It is used as the name for your workflow's cache folder and data folder; workflows without bundleids cannot be safely updated.

Hope this makes sense :)

Edited by Tyler Eich
Link to comment

The cache should be used for data that will not be needed very long. For example, in my Colors workflow, I use the cache to store the color preview images generated by my script; the files are for that moment, only saved for quick access, deletable, unnecessary, and can be made again.

The data folder is for information that will be needed again and again. For example, user credentials (like the AppID in my Wolfram|Alpha workflow, passwords, usernames, etc.). They are necessary for functionality, and if deleted, need to be replaced manually.

The workflow's actual path folder holds scripts, non-changing icons, and other core components of the workflow. These will be deleted and replaced if the workflow is updated, thus updating the components.

Bundleid is used to identify your workflow. It is used as the name for your workflow's cache folder and data folder; workflows without bundleids cannot be safely updated.

Hope this makes sense :)

 

Spot on. Thank you sir.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...