Re: Workflow Actions are Parallel?
Re: Workflow Actions are Parallel?
- Subject: Re: Workflow Actions are Parallel?
- From: Brannock Thomas <email@hidden>
- Date: Fri, 25 Jan 2008 09:44:33 -0700
I had the same type of errors, mostly with Finder in Leopard. I guess
Finder in Tiger was faster because the same scripts from Tiger failed
to work in Leopard until I put a 5 second pause in. But once I did,
all was well. It was quite the annoyance though.
Ben is absolutely right! Automator is just like other programming
languages, it goes line by line. Unfortunately, unlike modern
programming languages, it doesn't care if the previous step was
completed. In Tiger, someone once wrote an action that would cause
Automator to wait for completion of the previous action. I'm no good
at applescript, so I'm waiting patiently for someone to do the same
for Automator in Leopard.
Happy scripting!
Tom
On Jan 25, 2008, at 7:03 AM, Ben Waldie wrote:
Automator itself shouldn't run two actions at once. It should run
the first one, and when it's done, then run the second.
That said, depending on how an individual action is written by its
developer, it could potentially release control back to the workflow
before its task has been completed. For example, an action could be
written to tell an application to do something, such as save a file
somewhere, and then not wait until the file is done saving before
telling Automator that it's done the task.
-Ben
On Jan 24, 2008, at 6:38 PM, Rush Manbert wrote:
I can't find mention of this in the docs, so I thought I'd ask here.
I have written a workflow that generates some files, then moves
them to a different folder. My first attempt kept getting a "no
such file or directory" error at the copy step.
I finally realized that I was seeing a race condition between the
action that creates the files and the action that moves them. The
move action had actually started before the file generation action
had completed. In fact, it had started before anything had been
written.
I added a 5 second Pause action before the move action. That got
rid of the error, but I was still moving files before they had all
been generated, depending on how many files I was generating in a
batch.
My question is this: Are the workflow actions run as separate,
parallel threads of execution? That's certainly how it looks. I
would expect that each workflow action would need to complete
before the next one was started. Otherwise, how can you believe the
output of the previous step? You also end up in race conditions
like I have described.
Can anyone enlighten me? Am I doing something wrong?
Ben Waldie
President
Automated Workflows, LLC
610.935.0652
=============================================
AppleScript * Automator * Workflow Automation
Products, Training, Custom Development Services
<http://www.automatedworkflows.com>
=============================================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden