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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

Custom action trigger gives 500 error

Dobi
17-Peridot

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:

  1. Create a subtype of Peer Review object (com.xxx.www.reviewObject)
  2. Create a custom workflow for the object (org/workflow templates). In my case this is nearly identical to the the OOTB
  3. In PartClient-actionModels.xml, add my action
    1. <action name="create" type="com.xxx.www.reviewObject" resourceBundle="ext.xxx.ActionDefinitionsRB" />
  4. Add the same line to custom-actionModels.xml
  5. In custom-actions.xml add my object type
    1. 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.
    2. <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> 
  6. 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. 

 

Dobi_0-1760591389685.png

 

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. 

ACCEPTED SOLUTION

Accepted Solutions
Dobi
17-Peridot
(To:Dobi)

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.

View solution in original post

4 REPLIES 4

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

Dobi
17-Peridot
(To:vnamboodheri)

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.

avillanueva
23-Emerald I
(To:Dobi)

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?

Dobi
17-Peridot
(To:Dobi)

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.

Announcements

Top Tags