cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Dynamic team resolution in Windchill Change Management

psweet
4-Participant

Dynamic team resolution in Windchill Change Management

We have products that are built in multiple plants across the world. We have a "global" design and at each plant they're able localize certain aspects of the design. E.g. we have a product build in 3 different locations. A change may be requested that impacts plants 1 and 2 only. What I'd like the system to do is based on Plants Affected IBA values, for each plant include only those participants necessary for each plant. Each plant could be an "Any" or "All" vote. I was thinking that the context and Plant Affected values would help derive the appropriate group(s) to include on each task.


There must be others out there with the same requirements. How are you handling this situation? I'd like to keep the number of workflows down, yet minimize the amount of customization needed.


I look forward to your responses.


Regards,


Paul Sweet

3 REPLIES 3

Hi Paul, I'm sure we can find a workable solution to meet these requirements.


1- What is your context structure like?

2- Are the people that fill these activities in your workflow ALWAYS doing these tasks or do you want your user to pick from a list of condensed options via a "Setup Participants" task?

As far as an IBA on the ECN/ECR, there used to be some code that could interpret an IBA value on the PBO (Primary Business Object) and have that make a workflow decision for you (which branch it would go down). If I recall the code referenced a deprecated class though and isn't usable in WC10. Maybe someone can clarify this. Code is below (the top line):

You can search this thread in the forum for more info: "How to pull ECR IBA Value into variable to pass toWorkflow Conditional"

I'm told there are other methods now I'm just not familiar with this. Anyone else have a better way of doing this in WC10?

[cid:image001.jpg@01CD3805.24B9CA00]

[cid:image002.gif@01CD3805.24B9CA00]

Steve Vinyard
Application Engineer
psweet
4-Participant
(To:psweet)

Steve,


1. Our context structure is basically Products are used for Change Management and Library used to store CAD Models, Drawings, Documents, etc. Our Naming convention is somewhat standardized where from the context name, I can get the Business Unit and Product therefore identify the appropriate groups to go after. Based on the task I can determine who needs to be in the task.

2. With the requirement I have today from the Business Unit, Plant 1 who have representation and Plant 2 would have their representation. Based on the Plants Affected value(s), if both plants are selected then Plant 1 group and Plant 2 group would receive the task. Each group could be an any or all vote. I’m already pulling IBA values from Change Objects for other reason and using them in workflows.

Here’s the code we’re using to get IBA values from an object in the workflow. It doesn’t matter what type of object, as long as it can be casted to a wt.iba.value.IBAHolder.

ext.carrier.wc.change.changenotice.IBAReader reader = new ext.carrier.wc.change.changenotice.IBAReader((wt.iba.value.IBAHolder)primaryBusinessObject);
bomTool = reader.getValue("bomTool");

In this case we’re getting the value of bomTool. Look into the IBA holder class. We’re using it now in our Windchill 10 System. Send me an email directly if you need more information on this.

Regards,
Paul Sweet
[cid:image003.jpg@01CD3823.E1BBBB40]

Global Methods Group – Engineering Systems
Carrier Corporation
• 315-433-4540
• -<">mailtoSmiley Tongue->



dwilliams
6-Contributor
(To:psweet)

Hi Paul,

There are a couple of ways this can be done. Below is one option:



1. Assign the task to a generic role. This role should be part of
the library/product team with no assigned participants.

2. Create additional roles in the library/product that will map to
the selected IBA Value. Add the appropriate participants/groups to these
roles.

3. Use an expression prior to the task to assign the participants
to the task role based of the IBA Value and/or context.



The example below may be helpful if you decide to choose this option. In
this example, the task owner is assigned based of the context type where
the document resides.



wt.doc.WTDocument pbo = (wt.doc.WTDocument)primaryBusinessObject;



wt.inf.container.WTContainer container=pbo.getContainer();

if (container instanceof wt.pdmlink.PDMLinkProduct || container
instanceof wt.inf.library.WTLibrary)

{

contextType = "Library";

fromStringRole = "SUBMITTER";

}

else if (container instanceof wt.projmgmt.admin.Project2)

{

contextType = "Project";

fromStringRole = "CATEGORY MANAGER";

}



//SET ROLE VARIABLES

wt.project.Role to_role = wt.project.Role.toRole("TASK OWNER 1");

wt.project.Role from_role = wt.project.Role.toRole(fromStringRole);



//SET TEAM VARIABLE

wt.team.Team team =
(wt.team.Team)((wt.team.TeamManaged)(self.getObject())).getTeamId().getO
bject();



//GET PARTICIPANTS FOR THE FROM_ROLE

java.util.Enumeration participants = team.getPrincipalTarget(from_role);



while(participants.hasMoreElements())

{

wt.org.WTPrincipal wtprincipal =
((wt.org.WTPrincipalReference)participants.nextElement()).getPrincipal()
;

//ADD THE PARTICIPANTS TO THE TO_ROLE

wt.team.TeamHelper.service.addRolePrincipalMap( to_role, wtprincipal,
team );

}



Hope this helps,

Dax


Top Tags