cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Actions in xMII 12.0

Former Member
0 Kudos

Hi all,

I'm trying to develop my own action. I followed all the steps specifieds in:

http://help.sap.com/search/highlightContent.jsp

I'm writing a class that reads an Excel file and displays it as XML (in xMII).

My Java class is already reading the file, and displaying it content, I deployed it in xMII 12.0.

It appears as a custom block in my Actions pallete, but when I try to drop the component inside a blank block, the drop fails, no error occurs, the component simply does not "enters" in my transaction.

I would appreciate some help.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Pedro,

What is the error message in your Java WebStart Console? Not knowing this I can help you with what happens and maybe it will help. When you drop an action into a Sequence the class is instantiated based on the it's definition in the catalog.xml file. Perhaps this declaration is incorrect.

-Sam

Former Member
0 Kudos

Hi Sam,

No error appears in JWSC, here is my catalog file:

<?xml version="1.0" encoding="UTF-8"?>

<ComponentCatalog>

<Category Name="Neoris" Description="Neoris Custom Components">

<Component Type="Action" Name="ExcelReader" Description="" Label="Excel Reader" ClassName="br.com.neoris.xMII.Excel.ExcelReader" AssemblyName="NeorisComponents.jar" HelpFileName=""/>

</Category>

</ComponentCatalog>

I`m deploying it using a citrix connection, i do not know if this could be a problem in visualizing the error in JWSC.

Thanks

0 Kudos

Pedro,

Unfortunately without knowing your package & class names I cannot help. All I can say is to verify that the ClassName parameter matches your package & class name values exactly (Case Sensitive). Other than this it doesn't appear to be incorrect.

Also, in the action list of the workbench does the action's icon appear?

-Sam

Former Member
0 Kudos

Hello, Pedro. Are there any additional JAR files required by your class that perhaps are not being deployed/installed?

Former Member
0 Kudos

Hi Sam,

Here some code snippet:

package br.com.neoris.xMII.Excel;

public class ExcelReader implements IConfigurable, IAction, IMappable,IInvoke {

I believe that my xml file is correct, because the icon appears as an Action Block(it is not with the png file that I defined, but the action block is there).

Thanks

Former Member
0 Kudos

Hi Rick,

I`m using the POI API poi_3_0_1.jar (for Office files manipulation).

I`m deploying my Jar and assigning the poi_3_0_1.jar as dependency.

Both files are correctly signed.

Tnx

0 Kudos

Pedro,

The dependency needs to be defined in the XML like this:

Dependencies="poi_3_0_1.jar"

-Sam

Former Member
0 Kudos

Sam,

I made the change but the problem still the same.

0 Kudos

Pedro,

Did you clear your Java WS cache to ensure that the Workbench loaded cleanly with the new JARs? Also are you sure you're looking at the JavaWS console and not simply the Java Console? I know its a frustrating question but I have to ask just to be thorough.

-Sam

Former Member
0 Kudos

Sam,

I was suspecting that this could be the problem, so I made the following test:

Changed the catalog.xml file to display a different label and deployed the new jar file.

The label changed, but the error still the same.

I cleaned my JWS console, the workbench was loaded like the first time, but the error still the same. Could this error related with the fact that I'm not seeing the png file that I specified for my action? I don`t know what else I can do.

Thanks

0 Kudos

Pedro,

Yes the fact that the icon does not appear properly is a result of the workbench not loading your action properly. My suggestion here is to make sure that you've properly implemented the interfaces and even to extend ActionReflectionBase instead of the individual Interfaces until you get the action working. You may also want to look into the path specified in the GetIconPath and LoadIcon methods:


public String GetIconPath() {
return "/br/com/neoris/xMII/Excel/resources/icons/ImageName.png";
}

public Image LoadIcon() {
return ImageUtilities.LoadIcon(this, GetIconPath());
}

From here I would also make sure that there are no messages visible in the NetWeaver Administration Logs for the xMII Application. Hope this helps.

-Sam

Former Member
0 Kudos

Sam,

I tried change the directory of the picture(I specified the path as you suggested), now I`m extending the ActionReflectionBase class. But the error still the same.

Could I send you the files ?

Do I need to specify something else in the MANIFEST file?

Thanks

0 Kudos

Pedro,

Yes you can, my email is my full name at sap.com

I probably wont be able to get to them today but will start looking them over tomorrow morning. Also which version of 12 are you using, 12.0.0 or 12.0.1?

-Sam

Former Member
0 Kudos

Sam,

I tried to sent the email to salvatorecastro@sap.com and this email does not exist.

Other thing: I`m using xMII 12.0.1

Thanks

Message was edited by:

Pedro Sena

0 Kudos

Pedro,

I received your JARs and checked over the catalog.xml and also deployed the JARs. I did not see any error messages as you had indicated earlier however without looking over the source I can't diagnose the issue any further. Since you are a Partner the source still falls under the SAP confidentiality agreement that you have with us so there should be no problem in sending it over.

-Sam

Former Member
0 Kudos

Hi Sam,

I am sending the source code to you.

Thanks for your help.

0 Kudos

Pedro,

It appears that the imports and log declaration you are using are incorrect...they read:

import com.lighthammer....

and should read either

import com.sap.xmii...

OR

import com.sap.lhcommon...

The log should be instantiated as:

new Logger(ExcelReader.class);

Hope this helps.

-Sam

I have updated your source and returned it to you.

Former Member
0 Kudos

Hi Sam,

Now im using the libs from xMII 12.0.

Everything worked fine.

Thank you very very much =).

Former Member
0 Kudos

Hi,

I also created some custom action block and was facing same problem.

Every thing was write means import and logic evrything. But still I was not able to drag drop that action.

Later what I did was, I commented all the business logic and kept only _success = true.

It worked.

Then I followed same by incommoding some business logic. It worked. Then I uncommented all the business logic it also worked.

Just to mention I also cleared the Java cache for ever deployment I did.

God knows what the problem was.

I didnu2019t do any modification to the code.

Just try this procedure when u face such issues.

Regards,

Answers (0)