Creating a collaboration area

A collaboration area is a runtime instance of a workflow. You create a collaboration area so that users can work with items or categories in a workflow.

About this task

A collaboration area associates a workflow to a specific catalog or hierarchy. The entries belonging to that catalog or hierarchy are checked out to the collaboration area, where they will move through a series of steps corresponding to the workflow associated with the collaboration area.
You can checkout entries into a collaboration area, and work with the entries through the workflow steps in the collaboration area. The checked out version of the entry is initially populated with the attribute values from the entry in the source container. You may also import new entries directly in the collaboration area. When you run an import, you initially populate the attributes with the values provided from the import source.
Important: Ensure that you open the collaboration area and click Refresh whenever attributes (for example, catalog scripts or link attributes) are modified on the associated source catalog.

Procedure

Create a collaboration area.
Use one of the following methods to create a collaboration area:
Option Description
User interface
  1. Click Collaboration Manager > Collaboration Areas > New Collaboration Area.
  2. Provide a name for your collaboration area.
  3. Select the workflow to provide the design of this collaboration area by selecting a container (either a catalog or hierarchy) from the Container field. If you are working with items, you need to select a catalog. If you are working with catalogs, you need to select a hierarchy.
  4. Assign an administrator to the collaboration area by selecting from the list in the Administrators field. Administrators are assigned to collaboration areas to maintain the access to the workflow, and to make changes if an item is not passing a particular step. The collaboration area administrator has the ability to move items stuck in a particular step and ensure that all entries are able to progress through the steps of the collaboration area.
  5. Specify the access control group for the collaboration area in the Access Control Group (ACG) field. The ACG on a given collaboration area controls which users are allowed to checkout items to this collaboration area.
Java™ The following sample code creates an item collaboration area.
// get an existing catalog
		CatalogManager ctgManager = ctx.getCatalogManager();
		Catalog catalog = ctgManager.getCatalog("test catalog");
		
		// get an existing workflow
		WorkflowManager wflMgr = ctx.getWorkflowManager();
		Workflow workflow = wflMgr.getWorkflow("test catalog workflow");
		
		CollaborationAreaManager manager = ctx.getCollaborationAreaManager();
		
		String collaborationAreaName = "test item collaboration area";
		// create a collaboration area using a workflow and a catalog
		CollaborationArea collaborationArea = manager.createItemCollaborationArea(collaborationAreaName, workflow, catalog);
		
		// get an existing access control group
		OrganizationManager orgManager = ctx.getOrganizationManager();
		AccessControlGroup accessControlGroup = orgManager.getAccessControlGroup("Default");
		
		Collection<Performer>  performers = new ArrayList<Performer>();
		
		// get an existing user and add it to the performers list
		User user = orgManager.getUser("userA");
		performers.add(user);
		
		// get an existing role and add it to the performers list
		Role role = orgManager.getRole("roleA");
		performers.add(role);
		
		// set access control group
		collaborationArea.setAccessControlGroup(accessControlGroup);
		// set administrators/performers for the collaboration area
		collaborationArea.setAdministrators(performers);
		// then save the collaboration area
		collaborationArea.save();

Java The following sample code creates a category collaboration area.
Context ctx = PIMContextFactory.getCurrentContext();

		// get an existing hierarchy
		HierarchyManager hierManager = ctx.getHierarchyManager();
		Hierarchy hierarchy = hierManager.getHierarchy("test hierarchy");
		
		// get an existing workflow
		WorkflowManager wflMgr = ctx.getWorkflowManager();
		Workflow workflow = wflMgr.getWorkflow("test hierarchy workflow");
		
		CollaborationAreaManager manager = ctx.getCollaborationAreaManager();
		
		String collaborationAreaName = "test category collaboration area";
		// create a collaboration area using a workflow and a hierarchy
		CollaborationArea collaborationArea = manager.createCategoryCollaborationArea(collaborationAreaName, workflow, hierarchy);
		
		// get an existing access control group
		OrganizationManager orgManager = ctx.getOrganizationManager();
		AccessControlGroup accessControlGroup =
 orgManager.getAccessControlGroup("Default");
		
		Collection<Performer> performers = new ArrayList<Performer>();
		
		// get an existing user and add it to the performers list
		User user = orgManager.getUser("userA");
		performers.add(user);
		
		// get an existing role and add it to the performers list
		Role role = orgManager.getRole("roleA");
		performers.add(role);
		
		// set access control group
		collaborationArea.setAccessControlGroup(accessControlGroup);
		// set administrators/performers for the collaboration area
		collaborationArea.setAdministrators(performers);
		// then save the collaboration area
		collaborationArea.save();

Script The following sample script creates an item collaboration area.
var catalog = getCtgByName("test catalog");
var workflow = getWflByName("test workflow");
var collaborationAreaName = "test item collaboration area";
var collaborationArea = new CollaborationArea(collaborationAreaName, workflow, catalog);

var accessControlGroupName = "Default";
var users = [];
users[0] = "userA";
var roles = [];
roles[0] = "roleA";
collaborationArea.setColAreaAccessControlGroup(accessControlGroupName); 
collaborationArea.setColAreaAdminUsers(users);
collaborationArea.setColAreaAdminRoles(roles);
collaborationArea.saveColArea();
Script The following sample script creates a category collaboration area.
var hierarchy = getCategoryTreeByName ("test hierarchy");
var workflow = getWflByName("test workflow");
var collaborationAreaName = "test category collaboration area";
var collaborationArea = new CollaborationArea(collaborationAreaName, workflow, hierarchy);

var accessControlGroupName = "Default";
var users = [];
users[0] = "userA";
var roles = [];
roles[0] = "roleA";
collaborationArea.setColAreaAccessControlGroup(accessControlGroupName); 
collaborationArea.setColAreaAdminUsers(users);
collaborationArea.setColAreaAdminRoles(roles);
collaborationArea.saveColArea();