Custom action trigger gives 500 error
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:
- Create a subtype of Peer Review object (com.xxx.www.reviewObject)
- Create a custom workflow for the object (org/workflow templates). In my case this is nearly identical to the the OOTB
- In PartClient-actionModels.xml, add my action
<action name="create" type="com.xxx.www.reviewObject" resourceBundle="ext.xxx.ActionDefinitionsRB" />
- Add the same line to custom-actionModels.xml
- In custom-actions.xml add my object type
- For this, I kept it simple and copied the OOTB Peer Review section from changeManagement-actions.xml and updated my objecttype name to match the above.
<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>
- Create the package/jsp. Again, kept it simple and copied the existing changeReview but renamed to the above.
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.

