Skip to main content
8-Gravel
December 17, 2024
Solved

Add data utility to workflow variable

  • December 17, 2024
  • 2 replies
  • 1161 views

We are working on a task where it should have an input attribute with a suggestion box on a workflow task item.

I have created the data utility for the suggestion box. I need clue how to map it with my workflow variable(it is not straight forward as i do for type and attribute)

Kindly guide me

Best answer by avillanueva

We accomplished this with a custom JSP template for the workflow task page. In this example, I was using a drop down for a WTUser that I wanted a custom limit on what users were selectable. Variable was called "EC_Creator".

<jca:describePropertyPanel var="ecCreatorPanelDescriptor" >

 <jca:describeProperty id="EC_Creator" dataUtilityId="goodrichPrincipalSelector" />

</jca:describePropertyPanel>

You are able to add in the call out for the ID of the data utility.

<tr>
 <td align="right" valign="top" nowrap><FONT class=tabledatafont>
 <tags:taskPanelLabel propertyModel="${ecCreatorPropertyModel}" attrs="EC_Creator"/>
 </td>
 </tr>

Then later on in the template, you can call out its rendering.

2 replies

HelesicPetr
22-Sapphire II
22-Sapphire II
December 17, 2024

Hello @SK_12337814 

Here is an example how to use dropdown list in the workflow task input.

CS36017 - How to create a drop down list in a workflow instance task detail page of Windchill

Unfortunately, when I tried this example, I realized that the standard DataUtility is not supported in the task input page. 

 

PS> you can study what following DU does and get idea how to implement own one.

com.ptc.windchill.enterprise.workitem.dataUtilities.CustomVariablesDataUtility

mentioned DU is used to display Variables from workflow on the Task page.

 

PetrH

avillanueva
23-Emerald I
23-Emerald I
December 17, 2024

We accomplished this with a custom JSP template for the workflow task page. In this example, I was using a drop down for a WTUser that I wanted a custom limit on what users were selectable. Variable was called "EC_Creator".

<jca:describePropertyPanel var="ecCreatorPanelDescriptor" >

 <jca:describeProperty id="EC_Creator" dataUtilityId="goodrichPrincipalSelector" />

</jca:describePropertyPanel>

You are able to add in the call out for the ID of the data utility.

<tr>
 <td align="right" valign="top" nowrap><FONT class=tabledatafont>
 <tags:taskPanelLabel propertyModel="${ecCreatorPropertyModel}" attrs="EC_Creator"/>
 </td>
 </tr>

Then later on in the template, you can call out its rendering.

HelesicPetr
22-Sapphire II
22-Sapphire II
December 17, 2024

Hi @avillanueva 

I was thinking about the jsp and javascript solution 😄

PetrH