Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Version: Windchill 13.0
Use Case: I'm trying to replicate functionality for custom actions triggering a particular workflow. In my case, it's a peer review workflow. Following the customization guide I get almost to the end and then get a /ptc1/tcomp/defineItemAttributesWizStep error.
Description:
In my environment today I do have custom action menus for certain things - like our own ECN triggers. I was trying to do the same for a Peer Review object but it's misbehaving and at this point I'm not sure why.
Order of events:
<action name="create" type="com.xxx.www.reviewObject" resourceBundle="ext.xxx.ActionDefinitionsRB" /><objecttype name="com.xxx.www.reviewObject" class="wt.change2.WTChangeReview" resourceBundle="ext.xxx.ActionDefinitionsRB">
<action name="create" uicomponent="CREATE_CHANGEREVIEW" ajax="component" >
<command method="execute" class="com.ptc.windchill.enterprise.change2.forms.processors.CreateChangeReviewFormProcessor" windowType="popup"/>
<includeFilter name="changeReviewFilter"/>
<includeFilter name="OptionSetLocalRuleContextFilter"/>
<includeFilter name="sandboxSharingValidationSimple"/>
<includeFilter name="restrictGuestMembers"/>
<includeFilter name="manAuthorized"/>
<includeFilter name="adminLockModifyChangeObjectsFilter"/>
</action>
</objecttype> So that's all well and good. On server restart, my custom action with correct text and gif shows up in the right-click menu and folder actions for WTParts.
When I click it, though, there is an error.
In the method server logs it says that:
com.ptc.jca.error <my user name is here> - Cannot read the array length because "<parameter1>" is null jakarta.
I also referenced this absolute gem: Triggering a workflow from custom actions.
In my case, I'm trying to have my Peer Review object just start as is with my workflow. There isn't a custom workflow bit of code for ECNs... but that specific workflow is explicitly called out in preferences for the context whereas the review workflow isn't.
The defineItemAttributesWizStep works just fine for other calls. So something somewhere is missing and I don't know where to go look.
Solved! Go to Solution.
Solution found!
At the beginning of the JSP the subtype needs to be fully defined:
<jca:initializeItem operation="${createBean.create}" baseTypeName="wt.change2.WTChangeReview|wt.change2.PeerReview|com.xxx.www.reviewObject"
attributePopulatorClass="com.ptc.windchill.enterprise.change2.forms.populators.FlexibleChangeReviewAttributePopulator"/>
I had this be just the soft type without the full path and PTC was able to replicate this.
Hi @Dobi,
Thank you for your question.
Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.
Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.
Best Regards,
Vivek N
Community Moderation Team
I have a tech support ticket open on this... will update as that works it's way through as well but was hoping someone might have run into this already.
The dreaded null pointer exception. Any more information you can see as to where it was failing? I have only done this whole thing once for an access request custom action that someone else wrote. I just was tweaking it. Might be useful as a reference because it has all the same pieces. Anything in debugging setting you can turn on?
Solution found!
At the beginning of the JSP the subtype needs to be fully defined:
<jca:initializeItem operation="${createBean.create}" baseTypeName="wt.change2.WTChangeReview|wt.change2.PeerReview|com.xxx.www.reviewObject"
attributePopulatorClass="com.ptc.windchill.enterprise.change2.forms.populators.FlexibleChangeReviewAttributePopulator"/>
I had this be just the soft type without the full path and PTC was able to replicate this.
