dbTalk Databases Forums  

Workflow - skip multiple tasks?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Workflow - skip multiple tasks? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter A. Schott
 
Posts: n/a

Default Workflow - skip multiple tasks? - 09-20-2004 , 03:12 PM






I've reviewed a couple of the posts @ sqldts.com and was wondering if it's
possible to skip multiple tasks and jump directly to the end.

I have something like this:

Check for files
Check size here for data in the file. If no data, skip to Logging step
Quote:
V
Import data & Other misc processing in 4-5 steps
Quote:
V
ExecSQL task to put filename, size, and current datetime in a log table
Quote:
V
Move file to a "Processed" directory in case of future issues.


I always want the ExecSQL and Move steps to run if a file exists. I've
already got some logic in place to handle "no (more) files" by directing to a
Finished step. However, when I try to implement this, I get no steps running.

I can't disable the first import step or I get no further steps running.
I can't enable the first import and set my Log step to waiting because it then
flows through the Import path.

I'm hoping to do this without the "switched" paths that I've seen. However,
if I have to create a simple ActiveX script that will just return success, I
guess I can do that. Not sure if that will route correctly to an ExecSQL task
or if I'll need another ActiveX task to pick up right before that.


Any ideas? Is there an easier way to do this short of going to Yukon? (SO
wish we could use that - would make most of this task easier....)

Thanks for all of your help.

-Pete Schott


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Workflow - skip multiple tasks? - 09-21-2004 , 01:55 PM






In article <mhduk0521lvt8dnmhvdifvgh5tdlsh60fa (AT) 4ax (DOT) com>, Peter A. Schott wrote:
Quote:
I've reviewed a couple of the posts @ sqldts.com and was wondering if it's
possible to skip multiple tasks and jump directly to the end.

I have something like this:

Check for files
Check size here for data in the file. If no data, skip to Logging step
|
V
Import data & Other misc processing in 4-5 steps
|
V
ExecSQL task to put filename, size, and current datetime in a log table
|
V
Move file to a "Processed" directory in case of future issues.

I always want the ExecSQL and Move steps to run if a file exists. I've
already got some logic in place to handle "no (more) files" by directing to a
Finished step. However, when I try to implement this, I get no steps running.

I can't disable the first import step or I get no further steps running.
I can't enable the first import and set my Log step to waiting because it then
flows through the Import path.

I'm hoping to do this without the "switched" paths that I've seen. However,
if I have to create a simple ActiveX script that will just return success, I
guess I can do that. Not sure if that will route correctly to an ExecSQL task
or if I'll need another ActiveX task to pick up right before that.

Any ideas? Is there an easier way to do this short of going to Yukon? (SO
wish we could use that - would make most of this task easier....)

Thanks for all of your help.

-Pete Schott

OK so you have a line of tasks. If the file meets the criteria then you want to
run through them all else you want to skip to the last step

If I am right then at the start of the line of items you put in an active Script
task that asks the file if it meets the criteria. It has an on success
constraint to the line of tasks that do the importing.
You also add an On Success Constraiint from our starting Active Script task to
the last task which you always want to run.
( The last task should have 2 On Success Constraints entering it)

You can then enable or disable the step that does the importing depending on if
the file meets the criteria. The two constraints entering the last task mean
that both these conditions must be true so if you do the import then fine but if
you decide to skip you will need to use this article to fake the result.

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)




--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know





Reply With Quote
  #3  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Workflow - skip multiple tasks? - 09-21-2004 , 04:10 PM



I think that was my confusion. Problem was looking at the sample package for
multiple paths - with everything being ActiveX, I wasn't sure if I needed to
have a new step in between to split and another step to re-merge the paths. I
will see if I can put a "success" constraint straight out to my Log, Move file
steps from my first step.

I'll go back through the sample again. I'm not quite getting the part about
disabling the "On Success" workflow for one and not the other.

Thanks.

-Pete
(C'mon Yukon!!!)

Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote:

Quote:
In article <mhduk0521lvt8dnmhvdifvgh5tdlsh60fa (AT) 4ax (DOT) com>, Peter A. Schott wrote:
I've reviewed a couple of the posts @ sqldts.com and was wondering if it's
possible to skip multiple tasks and jump directly to the end.

I have something like this:

Check for files
Check size here for data in the file. If no data, skip to Logging step
|
V
Import data & Other misc processing in 4-5 steps
|
V
ExecSQL task to put filename, size, and current datetime in a log table
|
V
Move file to a "Processed" directory in case of future issues.

I always want the ExecSQL and Move steps to run if a file exists. I've
already got some logic in place to handle "no (more) files" by directing to a
Finished step. However, when I try to implement this, I get no steps running.

I can't disable the first import step or I get no further steps running.
I can't enable the first import and set my Log step to waiting because it then
flows through the Import path.

I'm hoping to do this without the "switched" paths that I've seen. However,
if I have to create a simple ActiveX script that will just return success, I
guess I can do that. Not sure if that will route correctly to an ExecSQL task
or if I'll need another ActiveX task to pick up right before that.

Any ideas? Is there an easier way to do this short of going to Yukon? (SO
wish we could use that - would make most of this task easier....)

Thanks for all of your help.

-Pete Schott


OK so you have a line of tasks. If the file meets the criteria then you want to
run through them all else you want to skip to the last step

If I am right then at the start of the line of items you put in an active Script
task that asks the file if it meets the criteria. It has an on success
constraint to the line of tasks that do the importing.
You also add an On Success Constraiint from our starting Active Script task to
the last task which you always want to run.
( The last task should have 2 On Success Constraints entering it)

You can then enable or disable the step that does the importing depending on if
the file meets the criteria. The two constraints entering the last task mean
that both these conditions must be true so if you do the import then fine but if
you decide to skip you will need to use this article to fake the result.

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)


Reply With Quote
  #4  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Workflow - skip multiple tasks? - 09-21-2004 , 04:25 PM



Another question - in this case, I don't necessarily want to disable my step,
I want to "Short-circuit". I've actually got 5 steps in between my beginning
and the Logging step that I'd want to skip.

I guess I'm not quite sure on how this would work - you've got two paths where
you can disable a branch. I've just got the one so I can't quite disable the
task leading into everything else. I appreciate the example, but am not quite
making the final connection that I need here. If you could help me with that
last part, I'd appreciate it.

Thanks.

-Pete Schott

Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote:

Quote:
In article <mhduk0521lvt8dnmhvdifvgh5tdlsh60fa (AT) 4ax (DOT) com>, Peter A. Schott wrote:
I've reviewed a couple of the posts @ sqldts.com and was wondering if it's
possible to skip multiple tasks and jump directly to the end.

I have something like this:

Check for files
Check size here for data in the file. If no data, skip to Logging step
|
V
Import data & Other misc processing in 4-5 steps
|
V
ExecSQL task to put filename, size, and current datetime in a log table
|
V
Move file to a "Processed" directory in case of future issues.

I always want the ExecSQL and Move steps to run if a file exists. I've
already got some logic in place to handle "no (more) files" by directing to a
Finished step. However, when I try to implement this, I get no steps running.

I can't disable the first import step or I get no further steps running.
I can't enable the first import and set my Log step to waiting because it then
flows through the Import path.

I'm hoping to do this without the "switched" paths that I've seen. However,
if I have to create a simple ActiveX script that will just return success, I
guess I can do that. Not sure if that will route correctly to an ExecSQL task
or if I'll need another ActiveX task to pick up right before that.

Any ideas? Is there an easier way to do this short of going to Yukon? (SO
wish we could use that - would make most of this task easier....)

Thanks for all of your help.

-Pete Schott


OK so you have a line of tasks. If the file meets the criteria then you want to
run through them all else you want to skip to the last step

If I am right then at the start of the line of items you put in an active Script
task that asks the file if it meets the criteria. It has an on success
constraint to the line of tasks that do the importing.
You also add an On Success Constraiint from our starting Active Script task to
the last task which you always want to run.
( The last task should have 2 On Success Constraints entering it)

You can then enable or disable the step that does the importing depending on if
the file meets the criteria. The two constraints entering the last task mean
that both these conditions must be true so if you do the import then fine but if
you decide to skip you will need to use this article to fake the result.

Multiple Paths in Workflow
(http://www.sqldts.com/default.aspx?218)


Reply With Quote
  #5  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Workflow - skip multiple tasks? - 09-22-2004 , 04:05 PM



I use it here if you want to take a look

Looping, Importing and Archiving
(http://www.sqldts.com/Default.aspx?246)


--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know




Reply With Quote
  #6  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: Workflow - skip multiple tasks? - 09-23-2004 , 11:36 AM



Allan,
Would the best way to handle this just be to have three potential
branches from my first step? One for "Finished", one for "0-bytes - go direct
to log", and one for the complete process?

-Pete

Allan Mitchell <allan (AT) no-spam (DOT) sqldts.com> wrote:

Quote:
I use it here if you want to take a look

Looping, Importing and Archiving
(http://www.sqldts.com/Default.aspx?246)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.