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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Need a Pending Work query in Windchill

doehr
12-Amethyst

Need a Pending Work query in Windchill

Dear PTC Gurus,

I've been starting to create some smaller Queries for new reports for the users and am making progress learning the tool, but one request is a bit of a brain-bender for me on how to set up the logic: I need to make a query that will find all of the pending user tasks on an active Workflow that have not yet been started.

I know that the system only creates a User Task object the moment that task is reached in an active workflow, it doesn't create the whole potential set the instant the WF starts since that would be very inefficient, and I've made other queries that reference the created workflow tasks.

So how do I get a query to find all actively running Workflows, go inside them, find all of the user tasks that have not yet been started or disabled and subsequently the Participant roles for them, cross-reference that to the Members list on the parent object the workflow is working on, filter out non-standard tasks such as one called "Rework Change Task" and display the results by username, role, task name, parent object and host context?

Please advise (and good luck),

Daryl

5 REPLIES 5
MikeLockwood
22-Sapphire I
(To:doehr)

Can't be done - if it could, one could make quite a lot in Las Vegas

Consider a workflow template with one simple branch point - can't predict which branch it will take, so no way to report.

But, one could report on:

- all active workflow processes (process object)

- look inside the related workflow templates and report all Roles and Activities in them (all potential)

- possibly the team instance for each active workflow process (via the PBO for the process), and report all Roles / people there

Would be a bit of work and hard to say if it would be useful.  Thinking a bit more, maybe focusing on the Team instance for each PBO which has a Running workflow process might be most likely to be helpful.  If so:

- Find workflow process with state RUNNING

- Find related PBO's (e.g. Promotion Request)

- Find related Team Instance

- Report Roles / people for those Team instances; these people either have or MIGHT soon get a task

hmmm... thinking even a bit more, hard to say that this would actually be useful - but fun to think about.

doehr
12-Amethyst
(To:MikeLockwood)

I'm not worried about the branch points, I'd be happy with a report that gave absolutely every possible unstarted task through every possible branch. That can be filtered later.

Let's take this piece by piece. You mentioned it may be possible to look into active workflows and cross-reference them with the workflow templates to find the roles and activities, and I'm guessing then filter out the ones that the active workflow shows as Executed or Disabled. That's a core starting point; do you know how to do that?

Daryl

MikeLockwood
22-Sapphire I
(To:doehr)

Yep - Can get you set up for this. Have done all the pieces many times; just have to glue them together.

Please contact me at - / 714-599-1615

bsindelar
12-Amethyst
(To:doehr)

To extend Mike's logic, you COULD also do some reporting on the workflow template itself, and make a "predictive" flow based upon whatever context it were to be run in, thus setting the appropriate users/groups in the roles defined on that object's team template ... before a workflow process is even executed for this template.

I could see a few applications for this:

  1. Predictive:  find out who would act upon a Change Request if it was created in Context A without actually making an object, for example
  2. Summary Across Contexts and Workflows:  find out who is over- or underutilized among one/subset/all workflow templates across one/subset/all contexts in Windchill, again without having to create any objects, and sort by quantity of "hits" per person.

Seems to me like this can be used as an effort in pulling data to balance resource load across personnel, and something that QueryBuilder isn't equipped to handle well given the nature of the data.

You'll also have an issue using QueryBuilder or other DB query methods if you populate roles with groups, as the Windchill DB does not store user-group memberships in it.  Therefore if "User1" and "User2" exist in "GroupA" which is on "RoleB", and the workflow template assigns a task to "RoleB", you'll be able to determine that RoleB's task resolved to "GroupA", but not able to tell that it actually went to (or is supposed to go to) "User1" and "User2".  You'd need to query the LDAP to get that relationship.

My company has another method to produce some slick reports that could accomplish 1 and 2 here.  While it seems you and Mike have a strategy worked out here, best of luck with it and feel free to reach out if you'd like a 2nd opinion.

JørnAHansen
12-Amethyst
(To:doehr)

‌Hah - the Las Vegas comment with the extra bonus of a good clear explanation just made my day still smiling all over my face Mike Lockwood‌!

Announcements


Top Tags