Ex: If I have two sessions SCD1 and SCD2 in single workflow and I want to run only SCD1 on daily basis and only SCD2 on weekly basis.
We have to control execution pipeline based upon workflow run means if workflow is running first time then SCD1 and when workflow is running 7th time then SCD2.
Yes, You are correct we need workflow variable. Ah!!! Now it's too simple. Let's try it practically
Create Worklfow Varaible
Name Datatype Persistent
$$WKF_RUN Integer Check (Check box should be Checked)
Set Default Value = 1
Create Decision Task
Develop expression like below
Drop your session SCD 1 and SCD2 create two concurrent link from decision task to both sessions. (See image below)
Now develop Link condition for both link
Create Assignment Task
User Define Variable Operator Expression
$$WKF_RUN = $$WKF_RUN + 1
Once again we need to develop two link condition for link which are coming from SCD1 and SCD2 to Assignment Task.
Step 8: It's a very important step (Set Treat Input Links as "OR") You will find this option in general tab.
Assignment Task-->Right Click-->Edit-->General Tab
What are you waiting for? :-) Run it analyse it....
Feel free to post your doubt in comment section.
Due to limitation, I can't attach exported .xml file which you can Import in your repository and see or analyse. (Feel free to mail me if you need .xml file with Scenario number and Question.)
If you like the approach and solution feel free to share with others.