Skip to main content
1-Visitor
June 22, 2016
Question

Need a Pending Work query in Windchill

  • June 22, 2016
  • 5 replies
  • 3894 views

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

22-Sapphire I
June 22, 2016

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.

doehr1-VisitorAuthor
1-Visitor
June 22, 2016

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

22-Sapphire I
June 22, 2016

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

1-Visitor
June 22, 2016

‌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‌!