Personalización avanzada > Business Logic Customization > Customizing Workflow Administration > Multiple Participant Selection Wizard Customization
Multiple Participant Selection Wizard Customization
When implementing Windchill you can customize so that you have finer grain control of what can be displayed in the participant selection table for a change tasks or for promotion requests. The following information details the supported customizations for the participant selection component in the change task and promotion request wizards.
Solution
Extend the default participant configuration delegate to override the default display of the participant picker in the change task or promotion request wizard.
Prerequisite Knowledge
To perform this customization you need to have an understanding of the following:
Basic development involving JAVA and properties.
Solution Elements
Element
Package
Type
Description
ParticipantConfiguration
com.ptc.windchill.enterprise.wizardParticipant.configuration
Interface
The interface for the delegates which control the display of the wizard participant selection table with different configurations.
DefaultParticipantConfiguration
com.ptc.windchill.enterprise.wizardParticipant.configuration
Class
The default delegate for displaying the wizard participant selection table with different configurations.
PromotionParticipantConfiguration
com.ptc.windchill.enterprise.maturity.configuration
Class
The configuration delegate for displaying the promotion wizard participant selection table.
typedservice.properties.xconf
xconf
Participant configuration delegates are registered in the typed service properties.
ParticipantsFormDelegate
com.ptc.windchill.enterprise.wizardParticipant.forms
Class
Form delegate for processing the selection of workflow team participants.
PromotionParticipantsFormDelegate
com.ptc.windchill.enterprise.maturity.forms.delegates
Class
Stores the selection process and the selection of workflow participants for the selected processes.
Customization Points
Override Display
To override the display of the participant selection picker in the change task or promotion request wizard the DefaultParticipantConfiguration delegate can be extended to provide the desired behavior. The promotion request overrides some of the default display behavior which is implemented by the PromotionParticipantConfiguration. To make use of the customized participant configuration delegate it must be first registered in the typedservice.properties for the type of object that the delegate is to be used for. The typedservice.properties should not be directly updated instead a custom typedservice.properties.xonf should be created to register the delegate. Currently the supported types are promotion request, change task and any sub types. The following is the example of a delegate registered for the Promotion Request object.
<Service context="default"
name= "com.ptc.windchill.enterprise.wizardParticipant.
configuration.ParticipantConfiguration" >
<Option requestor="wt.maturity.PromotionNotice"
selector="wizardParticipantConfiguration"
serviceClass= "com.ptc.windchill.enterprise.maturity.configuration.
PromotionParticipantConfiguration" />
</Service>
The following table describes specific display configurations which can be overridden:
API
Description
Default Behavior (Change Task)
Overridden Behavior for Promotion Request
getWorkFlowTemplate
The work flow process template which is used to define the displayed work flow roles for selection and the resource pools used to display the list of participants.
Looks up the life cycle template work flow process template from the selected object type in the wizard.
getWorkflowResourcePools
The resource pools used to display the list of participants available for selection. The map will contain the work flow role as the key and value as a set of Context Team, Team Template, Team or Group.
The resource pools used to display the list of participants available for selection. Uses the work flow process template returned from getWorkFlowTemplate(FormDataHolder) and the context team from the container found in the form data.
getFixedRoleSelection
The mapping of initially selected participant roles to work flow process roles to be selected. These roles can be unselected by the user.
No roles are marked as fixed.
If the role is mapped to another role via promotion "Fixed Roles For Promote" preference, then we get the initially selected participants from the mapped role. Otherwise the initially selected participants is derived from the given role.
getInitialRoleSelections
The mapping of fixed initially selected participant roles to work flow process roles to be selected. These roles cannot be unselected by the user.
Uses the roles on the object team template defined in the object initialization rules.
No initial selections.
isSelectUsersInGroups
When true users can be selected within groups.
Enable selecting users within groups.
If the "Group Members Display" promotion preference is set to Yes the users can be selected within groups.
excludedWorkflowRoles
Used to filter work flow roles.
No roles excluded.
Excludes the OWNER role.
excludedWorkflowRolesForDisplay
Used to filter workflow role columns from displaying in the participant table. Any system selected participants for the hidden roles would still be saved.
No roles excluded.
The default is that no roles are excluded. When the workflow template variable "hideFixedRoles" is set to true all fixed roles are hidden. The workflow template variable "overrideFixedRoleDisplay" is used as an override to filter out hiding the fixed roles when "hideFixedRoles" is set to true. To override more than one role use the "|" to separate the roles.
Validate Participant Selections
Currently there is no validation of selections based on the configured resource configurations. To validate the selections prior to processing the selections the preProcess API on the ParticipantsFormDelegate or the PromotionParticipantsFormDelegate can be overridden. The getParticipantsToProcess API in the ParticipantsFormDelegate can be leveraged to get the map of workflow roles and the selection participants for the workflow role.
The getParticipantConfiguration API can then be used to get the correct instance of the ParticipantConfiguration delegate in order to evaluate the participant selections.
Exclude Workflow Roles for Display in the Promotion Request
The promotion request process workflow templates can be updated to exclude the system fixed roles from being displayed on the promotion request participant table. For example the Promotion Request Approval Process has two workflow roles the Approver and Reviewer. There is a requirement that the Reviewers are always predetermined and that the promotion request author should not be able to set additional Reviewers.
In order for the fixed selected roles to be hidden in the table update the Promotion Request Approval Process workflow template properties to include a new Boolean variable called “hideFixedRoles” with a default value of “true”.
Since both Approver and Reviewer roles are configured as fixed system selected roles they are both hidden in the participants table.
In order to display the Approver role even though it is configured as a fixed system selected role update the Promotion Request Approval Process workflow template properties to also include a new String variable called “overrideFixedRoleDisplay“ with the internal name of the role i.e. “APPROVER”. Note that additional roles can be added using “|” to separate the internal role names.
The Approver role column now displays in the participants table. Note that even though the Review role column is not displayed, any preselected fixed system participant role selections will still be processed when completing the promotion request wizard.
Limitations
Custom display configurations are limited to the supported APIs in the ParticipantConfiguration delegate.
¿Fue esto útil?