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!
Solved! Go to Solution.
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.
My thought was that perhaps you could leverage this functionality to accomplish your goal.
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:
to get the two tables that are shown in my screenshot. I will put a larger code snippet below the screenshot.
<!-- PBO Info -->
<table border="0" cellpadding="3" width=100%>
<!-- 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 -->
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.
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.