How are you creating the page that contains the portlets? Are you using an xmlImport.xml file that is included in your application?
If so, you can set the alias in there via the ‘alias’ attribute of the portlet element. For example:
<CONFIG>
<CONTEXT alias="folder.public">
<folder name="MyPage">
<page>
<row attributes="top,one">
<column attributes="thin,left,one"
width="100%">
<mycustomapp___SearchBar
name="SearchBar" alias="my.custom.searchbar" />
<mycustomapp___SearchResult
name="SearchResult">
<wiring name="queryString"
portlet="my.custom.searchbar" property="lastSearchState" />
</mycustomapp___SearchResult>
</column>
</row>
</page>
</folder>
</CONTEXT>
</CONFIG>
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods