Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Windchill 12.0.2.13
Tried approach:
1. I have a custom workflow in which, through an expression, I obtain the attribute(of primary business object) that holds user value. For this user, the reporting manager(type: WTUser) is retrieved from the AD.
2. A workflow variable 'supervisor' of type WTUser is created and the WTUser value obtained in step-1 is assigned.
3. In the workflow activity(Participants tab --> Variables section), the 'supervisor' variable is defined as 'Assignee'.
Expectation: Task, if generated successfully, should be assigned to the 'supervisor' user.
However, on the task page, the variable appears as a dropdown and the task is assigned to the admin.
Workflow expression robot to assign Supervisor value:
try {
wt.doc.WTDocument doc = (wt.doc.WTDocument) primaryBusinessObject;
ext.tools.iba.IBAUtility flsIBinst = new ext.tools.iba.IBAUtility ();
String attUserValue = (String)flsIBinst .getAttributeValue(doc,"flsUserId");
ext.util.ADUtil ADUtilinst = new ext.util.ADUtil();
ADUtilinst.initialize();
Supervisor = ADUtilinst.getUsersManager(attUserValue);
} catch (Exception wfe) {
wfe.printStackTrace();
}
Appreciate any insights! Thanks
Solved! Go to Solution.
Thanks to my colleague, the solution here is to update the variable properties with:
1. Disabling visible property.
2. Declare the same variable in both 'Initialize From' and 'Copy Into'.
This ensured to assign the WTUser value generated through expression, to the approval task.
Thanks to my colleague, the solution here is to update the variable properties with:
1. Disabling visible property.
2. Declare the same variable in both 'Initialize From' and 'Copy Into'.
This ensured to assign the WTUser value generated through expression, to the approval task.