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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Workflow assignments for REWORK_ASSINGEE

dbailey-2
7-Bedrock

Workflow assignments for REWORK_ASSINGEE

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

https://support.ptc.com/help/wnc/r11.2.0.0/en/index.html#page/Windchill_Help_Center/WCCG_BusLogicCust_WorkflowAdmin_ChangeAssignments.html

 

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

ACCEPTED SOLUTION

Accepted Solutions

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. 

View solution in original post

3 REPLIES 3

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. 

Announcements

Top Tags