You can create a workflow that calls and manages subviews from other workflows.
- Create a new workflow in which you need to store the required subviews.
- In the workflow, create a Form that will have all the required subviews. You need not connect this form with a Start and End activity.
- Create a SQL table to store the view paths and the information required for calling the views.
For example:insert into DemoTable_51718 values ('India','../../../51718_Subflows/{active}/SubFlow_Details/DefaultView.ascx','test description1') insert into DemoTable_51718 values ('Israel','../../../51718_Subflows/{active}/SubFlow_Details/Israel.ascx','test description2') insert into DemoTable_51718 values ('London','../../../51718_Subflows/{active}/SubFlow_Details/London.ascx','test description3')
- Create a stored procedure to search the SQL table.
For example:CREATE proc [dbo].[USP_GetDataforDemo] as select fldId as ID, Name from DemoTable_51718 GO
- Create another workflow.
- In this workflow, do the following:
- Create two Data Source objects, one that will be connected to the stored procedure, and other for receiving the path and transferring it to the subview variable.
- Create an object that will be the trigger.
- Connect the object to the first Data Source.
- Create another stored procedure to receive the selection of combo box and transfer the path of .ascx file from SQL table to the subview in the workflow.
For example:( @Id int ) as select fldId as ID, Name, Path from DemoTable_51718 where fldId=@Id
- Create a SubView activity and assign the variable path according to the previous stored procedure.
For example:VirtualPath='<%# {ds.item.Path} %>'