1 of 1 people found this helpful
In PowerCenter itself there is no out-of-the-box functionalitiy embedded to implement such dependencies between workflows. So using command tasks is one way to do it, but I wouldn't try it. But first things first.
Most customers having such needs use some kind of enterprise-wide scheduling software, such as AutoSys, Control-M, Tidal, Tivoli, and whatever. If your organisation does have such an enterprise scheduler, I would suggest you use it here.
Other than that I hesitate to use command tasks within workflows to fire off other workflows. Just imagine that in three months you need to invoke this same workflow in a different workflow chain; then the workflow has to be changed again, but this time the change will be much more complicated because you somehow have to distinguish between the cases when the command task shall start another workflow and when not.
This is simply nothing that should be executed within a workflow under normal circumstances.
This is a task for a global scheduler system. That's what they have been made for.
If you want to overcome the concerns of Nico in the previous answer you can create a separate repository folder in which you create a workflow with a chain of command tasks to start the workflows.
In this case you would need to use the -wait option in the command to make sure the next one is started only after completion of the workflow.
Thanks for the response, and I totally agree to the complexity involved, if I need to tweak anything in the future. Hence was looking for a better solution. Unfortunately, this is our first one and we do not have an Enterprise scheduler yet. We will have to look into that probably in few months/years time
Thanks for the response, I have 2 questions:
1) Is there a reason as why the new workflow with the command tasks need to be created in a separate folder and not in the existing one where the actual workflows exist?
2) Even if I use the -wait option, is there a way to confirm that workflow (wf1) completed successfully before starting wf2?
1 The only reason to have it in a separate folder is to keep things organized, there is no specific technical need for it.
2 The command returns the message about succeeding or not which can be used in the connection between wf1 and wf2 and the subsequent ones.
Create a Worklet for each of your Workflows, like, WLT1, WLT2, .. etc instead of creating them as Workflows.
Use Successful/ Failure Email Notification property inside the Session Task to send alerts based on the tasks execution.
Create a Workflow using all these Worklets and set dependency on them like -
WLT1 -> WLT2 - > WLT3 ...
Use link conditions for setting up the dependencies.
Hi, can you replace your 7 workflows by worklets and place them to one workflow?
Thanks for the response, That might not be possible, as sometimes we just need to execute a few of the sessions within the workflows manually. If I place them within the worklet, then they cannot be run.
Well it is for external schedule to control these kind of dependency. However just a thought in mind,
you could create a master workflow which have the command task to call all of these workflow in order of their dependency.
The option to create worklets is only possible if all the mappings are in one and the same repository folder.
The option I described is also working if the workflows are in different repository folders.