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

We are happy to announce the new Windchill Customization board! Learn more.

Updating Display of Comments on WF Task from Simultaneous Task

jevans-2
1-Newbie

Updating Display of Comments on WF Task from Simultaneous Task

We have a fairly complex workflow where we have included all the previous tasks comments in the Instruction area through an expression on the tasks Complete Transition. What we do is read the global comment variable in and add the current comments to the variable and save it back to the global variable. This works well for tasks that are sequential. The problem is that we have many instances where we sent out multiple task simultaneously and, because the comment variable is read in during the creation of the tasks, the last of the simultaneous tasks completed is the only comment that is added to the variable. ... the last one in wins!

I'm looking for a way to update the comments on a task so the global variable will be re-read prior to adding the new comment text to the variable. This should capture and updates to the variable after the task was created.

Any help will be greatly appreciated!

John

1 ACCEPTED SOLUTION

Accepted Solutions
LoriSood
22-Sapphire II
(To:jevans-2)

I worked with John on this via a tech support case, and came up with the solution that is now documented in CS182596.

View solution in original post

4 REPLIES 4
BenPerry
13-Aquamarine
(To:jevans-2)

John,

This is very clever! Kudos!

I don't have much of a solution for you, but I do have a preliminary idea. Maybe it will generate some thoughts for you or others. There is a document showing how to immediately terminate the workflow task if a 1 of many users in the task selects a certain vote or routing such as "Rejected" or something similar. The task will immediately complete even if other users haven't completed the task yet.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS135465

My thought was that perhaps you could leverage this functionality to accomplish your goal.

Another idea:

I've been doing some slight investigation with Task Form Templates. I found a way to add some tables to the work item page. In my example, the work item's PBO is a Change Notice. I added the tag at the bottom of the page:

<tags:tablePageLink path="/netmarkets/jsp/attachments/attachments_table.jsp"/>

and

<tags:tablePageLink path="/netmarkets/jsp/changeNotice/changeWorkItemsTable.jsp"/>

to get the two tables that are shown in my screenshot. I will put a larger code snippet below the screenshot.

taskFormTemplateExample.png

<!-- PBO Info -->

<table border="0" cellpadding="3" width=100%>

<tr>

<td colspan="3">

<!-- show the entire routing history & reassignment history tables -->

<!-- tags:routingStatus dispProcess="ALL"/ -->

<!-- show the reassignment history within a table -->

<!-- tags:reassignHistory showRH="table"/ -->

<!-- displayType options are "table" or "link". This tag only works when PBO implements interface SubjectOfNotebook -->

<!-- workItem:notebook displayType="table"/ -->

<!-- displayType options are "table" or "link". This tag only works when PBO implements interface SubjectOfForum -->

<!-- workItem:discussions displayType="table"/ -->

<!-- show the ECO form -->

<tags:tablePageLink path="/netmarkets/jsp/attachments/attachments_table.jsp"/>

<!--tags:tablePageLink path="/netmarkets/jsp/changeNotice/implementationPlanStep.jsp"/-->

<tags:tablePageLink path="/netmarkets/jsp/changeNotice/changeWorkItemsTable.jsp"/>

<!--tags:tablePageLink path="${mvc:getTypeBasedComponentURL('changemanagement.affecteddatatable')}"/-->

<!--tags:infoPageLink-->

</td>

</tr>

</table>

LoriSood
22-Sapphire II
(To:jevans-2)

I worked with John on this via a tech support case, and came up with the solution that is now documented in CS182596.

BenPerry
13-Aquamarine
(To:LoriSood)

Lori,

Awesome solution. The use case I was thinking of was that there were multiple assignees for Activity 1 or Activity 1a in your example. But taking a look at your method...I think the solution is valid for that use case also.

LoriSood
22-Sapphire II
(To:BenPerry)

Hi Ben,

From what I saw in my testing, all the comments from the different assignees of a given task were propagated forward to the next task(s) without having to do my workaround. It was only if different tasks were running simultaneously that the comments could be dropped from the later tasks.

Either way, updating the global variable directly should work in both cases.

Thanks,

Lori

Top Tags