Forum Archive

Can a Workflow be modified from another Workflow or Python?

gr8tbaldone

Just curious if you can ... modify a variable in a Workflow from another Workflow OR modify a variable in a Workflow from a Python Script OR modify a variable in a Python Script from another Python Script ... ?

Use case - I am working on a Taskpaper Workflow to do some date modifications in my files. But it would be a lot easier and more effective if I could store a "last run" date somewhere. If I could programatically update a date string in a Python Script once the Workflow finishes, then I could check that the next time it runs.

The other option I have come up with, so far, is to add a tag to the actual Taskpaper file - "@LastRun(2014-07-03)" and using that ... but it's sort of ugly :)

Any suggestions? Thanks!

omz

You could do this by storing text in a hidden file, using the Set/Get File Contents actions. Here's a quick demo:

http://www.editorial-workflows.com/workflow/5214071641079808/JksLUeJqshk

(Note: The filename begins with a dot, so that it doesn't show up in the file browser)

gr8tbaldone

OMZ, that's brilliant. Thanks for the demo!

The dot (.) trick in the file name is a nice touch. I didn't realize it existed. I can probably create an entire "settings file" for various things ;)

Thanks again.