I have a workflow process in my system having data in following format.
From To
1 2
1 3
2 4
3 5
4 5
5 6
6 7
6 8
7 9
8 9
I need to convert this to following format.
S1 S2 S3 S4 S5 S6 S7
1 2 4 5 6 7 9
1 3 5 6 7 9
1 3 5 6 8 9
1 2 4 5 6 8 9
or
S1 S2 S3 S4 S5 S6 S7
1 2 4 5 6 7 9
1 3 5 6 7 9
6 8 9
6 8 9
or any other useful format
The output represent the number of probable paths that can be followed during a workflow process.
You can assume I have information which is my first stage and last stage. In this case you can assume 1 = first stage and 9 = final.
So once the user is at Stage 1 he can choose whether to go in Stage 2 or Stage 3