   foreign key fk_workflowtyperesource_wid (workflowid) references workflow(workflowid)
 ) ENGINE=InnoDB charset=utf8;
 
-create table workflowresource (
-  workflowresourceid int(10)  primary key auto_increment, 
+create table workflowresourcecategory (
+  workflowresourcecategoryid int(10)  primary key auto_increment, 
   workflowid int(10) ,
-  resourceid int(10) ,
-
-  constraint unique index u_workflowresource_wid_rid (workflowid, resourceid),
-
-  foreign key fk_workflowresource_rid (resourceid) references resource(resourceid),
-  foreign key fk_workflowresource_wid (workflowid) references workflow(workflowid)
-) ENGINE=InnoDB charset=utf8;
-
-create table workflowresourcemeta (
-  workflowresourcemetaid int(10)  primary key auto_increment, 
-  workflowresourceid int(10) ,
+  resourcecategoryid int(10) ,
+
+  constraint unique index u_workflowresource_wid_rcid (workflowid, resourcecategoryid),
+
+  foreign key fk_workflowresourcecategory_rcid (resourcecategoryid) references resourcecategory(resourcecategoryid),
+  foreign key fk_workflowresourcecategory_wid (workflowid) references workflow(workflowid)
+) ENGINE=InnoDB charset=utf8;
+
+create table workflowresourcecategorymeta (
+  workflowresourcecategorymetaid int(10)  primary key auto_increment, 
+  workflowresourcecategoryid int(10) ,
   k varchar(250) , 
   v text,
   position int(10)  default 0,

  lastupdts timestamp  default current_timestamp,
  lastupduser int(10)  default 0,

  foreign key fk_wrometa_workflowresourceid (workflowresourceid) references workflowresource(workflowresourceid),

  constraint unique index u_wro_wrid_k (workflowresourceid, k)
) ENGINE=InnoDB charset=utf8;



) ENGINE=InnoDB charset=utf8;

--
-- RUN.runLANE (LANE)
--
create table runlane (
  runlaneid int(10)  primary key auto_increment,
