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

Drop Down on the Task Page of an Activity

SOLVED
Newbie

Drop Down on the Task Page of an Activity

Hi ,

I have a requirement:-

In a workflow for a particular activity , when a user recieves the task , user should see two attributes 1. Company 2. Country in the task page.

Also the input for the attributes should ONLY be a drop down list.

In the Workflow template , i have created two variables in the activity of type name : wt.org.WTUser to achieve the drop down but this only gives the names of users in the Windchill system in the drop down list.

Please suggest. Please refer the screenshot attached.

Thanks

Ishaan

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Drop Down on the Task Page of an Activity

Hello Lori ,

I have created a custom class . Now when i try to put the name of my custom class after other class option , it gives a error which says : Only evolvable or persistable classes can be made as a type of variable in a workflow.

Error.png

Does that mean i have to make the values persistable using persistence helper in my class?

or anything else?

Thanks

Ishaan Nayyar

View solution in original post

9 REPLIES 9

Re: Drop Down on the Task Page of an Activity

The wt.org.WTUser type will only display user information in the pull-down list. From what I've been able to determine the CustomVariablesDataUtility.java is the data utility class used to render workflow variables on a task's page. The class checks for the variable type and if it is Enumerated type (i.e. extends the EnumeratedType class) then it renders the variable as a drop-down list. You will probably need to create a custom class that will extend EnumeratedType and specify the class as the task variable.

Re: Drop Down on the Task Page of an Activity

Hi Lori Lee Sood,

About your solution I have one question.

How will I specify my own extended Class as workflow variable ??

Cause I can only specify some predefined windchill class and only those classes which implements Persistable and Evolable as workflow variable.

Thanks and Regards,

Kaushik

Re: Drop Down on the Task Page of an Activity

Hi Kaushik,

In my Type Name drop-down list I have the option to select Other Class... and then I can specify a different class other than those listed. Do you not have this same option?

workflow_variable.png

Re: Drop Down on the Task Page of an Activity

Hello Lori ,

I have created a custom class . Now when i try to put the name of my custom class after other class option , it gives a error which says : Only evolvable or persistable classes can be made as a type of variable in a workflow.

Error.png

Does that mean i have to make the values persistable using persistence helper in my class?

or anything else?

Thanks

Ishaan Nayyar

View solution in original post

Re: Drop Down on the Task Page of an Activity

Hi,

See this thread "http://communities.ptc.com/message/190099#190099".

1. Update the wt.properties and set the property

wt.workflow.definer.variable.ShowWfEvolvableWarning=true,

  • So that the non persistable and non evolvable classes can be used to define workflow variables.
    The user will receive a warning message but he can save or update non-persistable and non evolvable objects into variables.

This can be done by making changes in site.xconf and automatically the property is propagated in wt.properties

-------changes in site.xconf---------------

<Property name="wt.workflow.definer.variable.ShowWfEvolvableWarning" overridable="true"

targetFile="codebase/wt.properties"

value="true"/>

Now go to windchill shell and run a command -->xconfmanager -p

Thanks And Regards,

Kaushik

Re: Drop Down on the Task Page of an Activity

Genious Kau Das

I did this already by the way. The class is now persistable , it gives a error message though but later Windchill accepts.

Thanks

Ishaan Nayyar

Re: Drop Down on the Task Page of an Activity

Great, Kaushik! I have to admit that I have not yet been trained on all the ins and outs of Windchill customization (that's coming very soon) so it was taking me some time to figure out which step was missing. I'm glad you got it figured out.

Re: Drop Down on the Task Page of an Activity

Thank you Lori,

Hope after your customization training we will get more and more answer from you.

Thanks And Regards ,

Kaushik

Re: Drop Down on the Task Page of an Activity

Hi,

I am looking for similar solution but the values in the drop down list should be multi select. can you please help me with any idea.

Thanks in advance.