≡ Menu

How to Use Workflow Template Filters

Share the knowledge

Everyone says they want more choices. But the truth is that more choices just confuse people, particularly when there is only a single right choice. This is true with workflow templates. Your users don’t want to select from a huge list workflow templates every time they want to start a new process. It’s annoying and can lead to mistakes which you have to fix.

Fortunately you can limit their choices and make both your users and your own lives easier.

Overview

There are two basic steps:

  1. Create workflow template filters.
  2. Remove the ability for users to access any workflows except those which have been assigned.

Create Workflow Template Filters

Workflow template filters define which workflows are available for a particular object type, within each group. When a user selects an object and starts a new process the dialog will only show the assigned workflows.

To create a workflow template filter you

  1. Select a group
  2. Select an object type
  3. Specify a list of workflow templates

You can do this through the GUI in the Workflow Designer application. Go to Edit → Template Filter. That works fine for setting up one or two filters. But, it can be cumbersome when you have several combinations of group and object type to configure.

That is why I prefer to create filters by setting Teamcenter preferences. That is what the GUI in Workflow Designer is actually doing.

The three steps mentioned above become:

  1. Select a group: Create a group level preference
  2. Select object type: Name the preference TC_objectType_release_procedure. objectType is the type of object the filter is applied to. Often this will be Item or ItemRevision or one of their descendants. The preference type should be string with multiple values.
  3. Specify a list of workflow templates: Add the names of the workflows as values for the preference you just created.

Hide Unassigned Templates From Ordinary Users

Change the value of the site preference CR_allow_alternate_procedures to none.

The valid values are all, Assigned or none. For all or Assigned the New Process dialog will have two radio buttons which allows users to view either all templates or just those that are assigned. The difference between all and Assigned is which button is pre-selected.

New Process Dialog with CR_allow_alternate_procedures=Assigned defaults to the list of defined workflow template filters

When you change the value to none you remove the radio buttons completely. Users can only select from the list of assigned workflow templates.

New Process Dialog with CR_allow_alternate_procedures=none allow allows users to select from the list of defined workfow process filters

Give Certain Users Special Privileges

Some users, such as DBAs and workflow designers, should be able to see all of the workflows.

Create group or user CR_allow_alternate_procedures preferences set to all or Assigned for those groups or users to override the site preference.

Export → Edit → Import

If you have several similar sets of template filters to configure:

  1. Define the preference for one group and object type
  2. Use the using the preferences_manager utility to export the preference
  3. Edit the XML if necessary to add preferences for additional object types or to list additional workflows
  4. Import the XML with preferences_manager for each group

Caveats

Template filters are not foolproof. If a user selects multiple objects of different types then they will see the list of assigned templates for only one of the object types. They will be able to submit all of the objects to any process template in that list. To absolutely ensure that only specific types are submitted to a workflow you need to add a rule handler for that to the process template.

Also be aware that users could define their own values for CR_allow_alternate_procedures, overriding the values you have set at the site or group level.

Credit Where it is Due

Logresh Rasumani did a post a while ago on his blog about setting up workflow filters using the Workflow Designer application. That pushed me to write this post about the preferences.

  • http://hooverm.pip.verisignlabs.com/ Teamcenter Heretic

    Wonderful information that too many folks forget to take advantage of.
    However, workflow filters are affected by your choice of organizational structure so if you are thinking of setting up a new system or revamping your current org structure keep in mind the behaviors of workflow filters when doing so.

  • http://www.facebook.com/menk.slot Menk Slot

    Hello Scott,

     

    I miss 1 thing in
    the Workflow template Filter:

     

    Now you only can
    select a group, but I also want to select a role. To solve this you have to use
    a handler which checks the Role an users has. 

     This handler can also solve your problem when a user
    selects multiple Item Types.

    regards,

    Menk Slot

     

  • Vaithianathan Ramasamy

    I was looking around for an option to hide the All/Assigned radio buttons. Perfect place. Thanks Scott

  • Pingback: Teamcenter Preferences | Identifiers | GUI | NX | The PLM Dojo()

  • Pingback: 10 Teamcenter Preferences You Should Know | The PLM Dojo()

  • Gus

    Very useful post, Thank you!
    Manipulating the filtering in WF-designer becomes a nightmare pretty fast, but this helps.

  • Gus

    Very useful post, Thank you!
    Manipulating the filtering in WF-designer becomes a nightmare pretty fast, but this helps.

  • Gus

    Very useful post, Thank you!
    Manipulating the filtering in WF-designer becomes a nightmare pretty fast, but this helps.

Optimization WordPress Plugins & Solutions by W3 EDGE