Workflow criteria, make a field mandatory, but not always

We have Agile PLM 9.3.2.  We are using the ‘Default Change Orders’ workflow for a Change Order.  We have a workflow status named ‘CCB’, and the next status is named ‘Released’.
I would like to add some criteria that does the following:

We have an attribute named ‘Template’.  The Template value is saved in the Items > Parts class, PAGE_TWO.LIST03
In a Change Order, on the Affected Items tab, if you click on an item row, a list of BOM components may appear below.  If the Affected “parent” Item has a Template value of ‘Kit’, we want to make sure all the components listed below have a specific column filled in, before the user is allowed to change the status from ‘CCB’ to ‘Released’.
That specific column is a ‘Flag’ we have defined and is stored in BOM.LIST01.  The list values for this flag can be ‘Yes’, ‘No’, or ‘Optional’.

So, we want to make the flag mandatory for all the components, but ONLY if the parent item is a ‘Kit’.  Otherwise, that column can be left blank.

I see in the Workflow status how we can make certain fields mandatory upon exit, but our requirement is different since we only want to make it mandatory if the Affected Item is a ‘Kit’.

Can this be done in some sort of defined criteria?  Or in a process extension (Groovy script)?

Add Comment
3 Answer(s)

This can be achieved through Criteria, actually!

The thing to remember, if you want Exit Required Fields to be based on P2 data of the affected item, is that the P2 field needs to be visible on the Affected Items tab of the change object. This is achieved by enabling the appropriate “read-through” field.

In the Java Client go to:
Admin > Classes > Change Orders > User Interface Tabs > Affected Items > Attributes:Affected Items >*Locate and Enable “Item P2 List03”
This makes it so the Affected Items’ PageTwo.List03 value can be seen directly on the Affected Items tab without having to open the Item or select the row.

Note – the “read-through” fields can be renamed so they make more sense when viewing the Affected Items tab, but just beware that they are not class specific.  So if Document items use PageTwo.List03 for something else – that field will read-through to the same column when added to a Change Order.

Once you have the read-though field enabled on the Affected Items tab – you can use that field as the criteria for you Exit Required Fields.

“Change Orders with Kit Template Affected Items”
Criteria – Change Orders – Affected Items.Item P2 List03 in [Parts] Kit

Add this criteria to the appropriate workflow status(es) and then add the [BOM.LIST01] as your exit required field.

This makes the BOM.List01 flag is required only for affected items that have “Kit” populated in the PageTwo.List03 attribute.

Agile Angel Answered on June 8, 2017.
Add Comment

Thanks Danny, that worked!

Agile Talent Answered on June 9, 2017.
Add Comment

I just discovered something that makes this much easier and makes my original answer not entirely accurate (still works, but not all steps are actually necessary): 

It turns out you can accomplish the same thing without having to deal with the affected items read-through field at all. 

Instead of using the read-through “Item P2 List03” in your criteria – you can just use “Redline Item. P2 List 03” instead.  


“Change Orders with Kit Template Affected Items”
Criteria –
Change Orders 
Redline Item P2 List03 Contains Any [Parts] Kit

Adding this criteria to your workflow status and then adding BOM.LIST01 as an exit required field accomplishes the same thing as before, but without having to deal with the extra read-through steps at all(not to mention the confusion that they can sometimes create for users as mentioned earlier).  

Note: even though this uses a “Redline” tag – I tested this using both Change Controlled and Non Change Controlled attributes and the results were the same.

I hope this is helpful for future use and/or for others that might have similar questions.  Now I’m off to make some changes to my own criteria!



Agile Angel Answered on July 28, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.