cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Action Problem

Former Member
0 Kudos

Hello All,

I am trying to develop a custom action block and I'm having a little trouble. I have what is basically an empty custom action, just trying to get it to load in MII before I go adding more functionality. Here is the source,

package com.idexx.xmii.CustomActions.SPCEngine;

import com.sap.xmii.xacute.actions.ActionReflectionBase;
import com.sap.xmii.xacute.core.ILog;
import com.sap.xmii.xacute.core.Transaction;

public class SPCEngine extends ActionReflectionBase {

	public SPCEngine() {}

    public void Invoke(Transaction transaction, ILog log) throws Exception {
        try {
            _success = true;
        } catch (Exception e) {
            log.error(e.getMessage());
            _success = false;
        }
    }
    
    public boolean isConfigurable(){
    	return false;
    }
  
}

My catalog.xml is as follows,

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

<ComponentCatalog>
    <Category Name="Idexx SPC" Description="Custom SPC action block">
        <Component Type="Action"
                   Name="SPCEngine"
                   Description="Calculates SPC"
                   Label="SPCEngine"
                   ClassName="com.idexx.xmii.CustomActions.SPCEngine.SPCEngine"
                   AssemblyName="SPCEngine.jar" />
    </Category>
</ComponentCatalog>

I originally had some other functionality but as soon as I encountered errors I removed it so as to start simple. This will deploy fine, I make a simple BLS transaction with this action, but when I run the transaction I'm getting an error "Item 'SPCEngine' is not an Action."

I've checked the java compatibility, initially I was building it with 1.6 but realized that our system is at version 1.4 so I am now building using 1.4 compatibility. I'm not sure what else could be wrong here, any ideas?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You must add input and output parameters. So you must add some set and get functions in your program.

Former Member
0 Kudos

Try removing the default constructor you have in there.

Former Member
0 Kudos

Removed the constructor, still the same error.

Former Member
0 Kudos

Did you clear the web start cache on your workstation?

Former Member
0 Kudos

Yes, I clear the cache every time I deploy a new custom action.

Former Member
0 Kudos

Just a guess but I wonder if the Dependencies and HelpFileName params still need to be in the Component xml even if they are blank?

Former Member
0 Kudos

That's a good thought, but I added them and still have the problem. Are there any configuration steps in MII that I need to do to allow custom actions?

Former Member
0 Kudos

Helo,

I try with your code above and works fine (Java Library SDK 1.4 for compile). I get only your error,

when I am using the wrong Java Library (>=JDK1.5 for compile). Verify your settings in your project.

BR

Pedro Iglesias