Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Dear All
Looking for some advice on Workflow expressions, I am attempting to customise the Workflow assignments as per the link below, I have added the REWORK_ASSINGEE to the roles, and the change team but when I run the syntax check I get the error below.
I have also added the roles of rework and reworkRole to the system and change team without success
Can you advise what I am missing.
I am on Windchill 11.2.1.4
Checking Syntax...
WfExpression_5148.java:62: error: ';' expected
rework role on the change team.
^
WfExpression_5148.java:62: error: ';' expected
rework role on the change team.
^
WfExpression_5148.java:62: error: ';' expected
rework role on the change team.
^
WfExpression_5148.java:64: error: ';' expected
rework tasks.
^
4 errors
Syntax check complete.
Best Regards
David
Solved! Go to Solution.
At least some of your problems are caused by formatting resulting from pasting the code:
// 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.
Here you have a multi line comment that is broken up. The bold lines need to be commented as well.
Hi David,
Can you share the code exactly as you have it entered in the workflow expression?
Hi Gravel
Please find below the syntax that I added is it taken from the support document verbatim
I would note that i see in the Change task type there is attributes for the following roles but not the re-assignee role
Name, Internal Name
Assignee, ROLE_ASSIGNEE
Reviewer, ROLE_REVIEWER
I have added the re-assignee role to the change team
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);
At least some of your problems are caused by formatting resulting from pasting the code:
// 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.
Here you have a multi line comment that is broken up. The bold lines need to be commented as well.