Skip to main content
1-Visitor
August 25, 2015
Question

How to get a variable dropdown list in wf task page?

  • August 25, 2015
  • 2 replies
  • 6462 views

How to get a variable dropdown list(Attributes like Plant location, some attributes) inside workflow task page? further to it, based on selected attribute value it should route to respective users.

Does it requires to customize the Work flow JSP template?, if yes kindly provide the code and source code location(path).

2 replies

16-Pearl
August 25, 2015

Hi Krishna,

A preferred way would be to create a custom enumerated class and defining your values in an RBinfo file. And when you create a variable in workflow, select type as “Other Class…”, and input the customized class.

e.g:

  • Class file:

package ext;

import com.ptc.windchill.annotations.metadata.GenAsEnumeratedType;

@GenAsEnumeratedType

public class MyEnumeration extends _MyEnumeration {

  /**

  * Enumerated class file for code enumeration.

  * Refer corresponding RBInfo file for the changes

  */

  private static final long serialVersionUID = 1L;

}

  • RbInfo file

ResourceInfo.class=wt.tools.resource.EnumResourceInfo

FirstChoice.value=FirstChoice

FirstChoice.order=10

SecondChoice.value=SecondChoice

SecondChoice.order=20

Example is for Windchill 10.x. This may require Info* Modeler. Let me know if this information was helpful


Regards,

Bhushan

1-Visitor
August 26, 2015

Hi Bhushan,

Thanks for your reply,

Can we achieve the same in Windchill 9.1M070?.

How to Fetch these Enumarated values to WT Document.

Kindly suggest.

Thanks

Krishna

16-Pearl
August 26, 2015

Hi Krishna,

9.1 has a separate procedure of creating enumerated class, customization guide talks about it. If you want to update these values to WTDocument attributes, in 9.1 Info* Engine task can be used.

Regards,

Bhushan

1-Visitor
December 26, 2016

Hi,

I could come up with the correct solution without the requirement of Windchill information modeler. I had similar requirement for this. As my customer doesnt have windchill information modeler. i was working on it. it is working for me.

Requirement:

I have bring drop down in the document for giving the reason for rejection.

Steps:

1. Compile RejectReason.java and RejectReasonRB.java (tis will have entry in the RB file)

2. resourceBuild the RB file to get RB.ser file. (if u wanted to add some entries using ENUMCUSTOMIZE in future)

Let me know if this works

1-Visitor
January 20, 2017

Hi ,

I am looking for similar solution but the values should be multi select, can you please help me with any idea you have.

Thanks in advance

14-Alexandrite
January 21, 2019

This is old but I had a similar requirement for multi-select and thought I would share what I did. Create boolean variables for each entry in the list. They display on the task page as a list with a checkbox, so you can select or not select any multiple of them. It works well if you have a manageable number of variables. No custom class required since using the OOTB Boolean type.