Skip to main content
1-Visitor
Aug 25, 2015 11:11 AM UTC
Question

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

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).

8 replies

16-Pearl
Aug 25, 2015 1:04 PM UTC

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

Translate
1-Visitor
Aug 26, 2015 5:12 AM UTC

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

Translate
16-Pearl
Aug 26, 2015 7:21 PM UTC

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

Translate
1-Visitor
Dec 26, 2016 12:06 PM UTC

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

Translate
1-Visitor
Jan 20, 2017 7:19 AM UTC

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

Translate
14-Alexandrite
Jan 21, 2019 9:58 PM UTC

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.

Translate