Advanced Customization > Business Logic Customization > Customizing Workflow Administration > Customizing Change Activity Workflow Assignments > Customization Points
  
Customization Points
Create Custom Rework Role
Use the enumCustomize tool to add a new rework role to wt.project.RoleRB.rbInfo. See The Enumerated Type Customization Utility for more information on using this tool.
The custom role “Rework Assignee” is used in this process. This step can be skipped if a new role is not needed.
Customize Change Activity Workflow Template
1. Select Workflow Template Administration from Utilities page of a Site, Organization, Product or Library context.
2. Select the “Save As” action for “Change Activity Workflow” template to create a copy for customization. Select suitable name for the customized workflow (for example, “Custom Change Activity Workflow”) is used in this document. Always copy a workflow template before changing it; always avoid customizing an OOTB workflow template.
3. Select the “Edit” action for “Custom Change Activity Workflow” template and the change activity workflow graph is displayed in the Workflow Template Editor. The area of interest for this customization is the rework loop, located in the upper-right portion.
4. Double-click the “Rework Change Notice Task” to open the editor and select the “Participants” tab. Add the “Rework Assignee” role and remove the “Assignee” role. This step can be skipped if a new role is not needed.
5. Create a new expression step in the workflow between the “Set State Implementation” and “Rework Change Notice Task” steps, and name it something meaningful, such as “Set Rework Assignee”.
6. Add Java code to the “Set Rework Assignee” step to automatically obtain the users that completed the prior work task and assign them to the change item team for the rework task. See Java Helper Methods for a description of helper methods that can be called here.
Example:
wt.project.Role reworkRole = wt.project.Role.toRole("REWORK_ASSIGNEE");
wt.project.Role participantsRole = reworkRole;

java.util.Map<wt.project.Role, wt.fc.collections.WTSet> roleToParticipantMap;
// Try to get participants from the rework activity.
roleToParticipantMap = com.ptc.windchill.pdmlink.change.server.
impl.WorkflowProcessHelper.getActivityParticipants(
(wt.change2.VersionableChangeItem) primaryBusinessObject,
"Rework Change Notice Task");

// If the map is null then the rework activity has not executed yet.
if (roleToParticipantMap == null) {
participantsRole = wt.project.Role.toRole("ASSIGNEE");

// Try to get participants from the original activity.
roleToParticipantMap = com.ptc.windchill.pdmlink.change.server.impl.
WorkflowProcessHelper.getActivityParticipants(
(wt.change2.VersionableChangeItem) primaryBusinessObject,
"Complete Change Notice Task");
}

// Assign participants from original or rework activity to the
rework role on the change team.
// By doing so only those participants will get the next
rework tasks.
wt.fc.collections.WTSet participants = roleToParticipantMap.
get(participantsRole);
com.ptc.windchill.pdmlink.change.server.impl.WorkflowProcessHelper.
setChangeItemParticipants(
(wt.change2.VersionableChangeItem) primaryBusinessObject,
reworkRole, participants);
7. When the Java code is complete select the “Check Syntax” button to check for errors. Be sure to correct all errors before using the custom workflow template.
8. Save the changes made to the “Custom Change Activity Workflow” template and check it in.
Customize Change Activity Life Cycle
Create a custom “Change Activity Life Cycle” template using the Life Cycle Template Administration utility. Specify the custom workflow template created in the previous section:
Customize Change Activity Object Initialization Rule
Create a custom “Change Activity” object initialization rule (OIR) using the template using the Object Initialization Rules Administration utility. Specify the custom life cycle template created in the previous section: