Skip to Content
0
Former Member
Mar 19, 2009 at 01:30 PM

My custom action can not recognise types of property.

20 Views

Hi,

My custom action (code below), does not reconise type of it's properties.

It assume each property as an action.Property icon is the same with action icon in the link editor.

When i test execute transaction, it generates error that says it was not an action.

How can i solve this problem?

Thanks.

Custom Action

package com.wipro.action;

import com.sap.xmii.xacute.actions.ActionReflectionBase;

import com.sap.xmii.xacute.core.ILog;

import com.sap.xmii.xacute.core.Transaction;

public class CustomAction extends ActionReflectionBase {

private String strFirstInput;

private String strSecondInput;

private String strOutString;

public CustomAction() {

strFirstInput = "";

strSecondInput = "";

strOutString = "";

}

@Override

public String GetIconPath() {

return "resources/icons/CustomAction.png";

}

@Override

public void Invoke(Transaction trx, ILog ilog) {

try {

strOutString = strFirstInput + strSecondInput;

_success = true;

} catch (Exception e) {

_success = false;

}

}

public String getFirstInput() {

return strFirstInput;

}

public void setFirstInput(String value) {

this.strFirstInput = value;

}

public String getSecondInput() {

return strSecondInput;

}

public void setSecondInput(String value) {

this.strSecondInput = value;

}

public String getOutString() {

return strOutString;

}

//public void setOutString(String value) {

// this.strOutString = value;

//}

@Override

public String[] Inputs(Transaction tx) {

String[] inp = new String[2];

inp[0] = "strFirstInput";

inp[1] = "strSecondInput";

return inp;

}

@Override

public String[] Outputs(Transaction tx) {

String[] out = new String[1];

out[0] = "strOutString";

return out;

}

@Override

public boolean isConfigurable() {

return true;

}

}

catalog.xml

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

<ComponentCatalog>

<Category Name="Cust_Act_" Description="This is the first Action">

<Component Type="Action" Name="CustomAction" Description="" Label="Custom Action" ClassName="com.wipro.action.CustomAction" AssemblyName="CustomAction.jar" HelpFileName="" />

</Category>

</ComponentCatalog>