[
https://jira.jboss.org/jira/browse/JBIDE-5591?page=com.atlassian.jira.plu...
]
Aaron Pestel commented on JBIDE-5591:
-------------------------------------
Sorry, I wasn't clear hear. I actually mean neither. Instead, I'm talking about
creating a new Java class implementation of an action.
For example, if I want to create a custom ESB action or a custom jBPM action handler, both
have to implement certain interfaces and such. Right now, the user has to either know
what they are or find an existing action to copy.
For the new ESB action, I would recommend having it create a class something like this:
------------------------------------------------------------
package com.sample.action;
import org.jboss.soa.esb.actions.AbstractActionLifecycle;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
public class MyAction extends AbstractActionLifecycle
{
protected ConfigTree _config;
public MyAction(ConfigTree config) { _config = config; }
public Message process(Message message) throws Exception{
//ADD CUSTOM ACTION CODE HERE
return message;
}
}
------------------------------------------------------------
The "new | jBPM project" creates a sample action by default (which definitely
helps), but a separate capability in the "File | New | jBPM" context menu to
create an action like below would be very nice:
-------------------------------------------------------------
package com.sample.action;
import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
public class MyActionHandler implements ActionHandler {
private static final long serialVersionUID = 1L;
/**
* The message member gets its value from the configuration in the
* processdefinition. The value is injected directly by the engine.
*/
String message;
/**
* A message process variable is assigned the value of the message
* member. The process variable is created if it doesn't exist yet.
*/
public void execute(ExecutionContext context) throws Exception {
//ADD CUSTOM ACTION CODE HERE
//context.getContextInstance().setVariable("message", message);
}
}
-------------------------------------------------------------
Ideally, the user could specify the package and class name when creating the action.
Request option for creating new jBPM and ESB actions from "File
| New" menu
---------------------------------------------------------------------------
Key: JBIDE-5591
URL:
https://jira.jboss.org/jira/browse/JBIDE-5591
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: esb
Affects Versions: 3.1.0.M4
Environment: JBDS 3.0 M4
Reporter: Aaron Pestel
Fix For: 3.2.next
Requesting option to create a new jBPM action and ESB action. Without this, I always
have to go to the quickstarts and copy a default action because I can't remember what
interfaces each of the actions have to extend, what methods they have to implement, and
what the constructor has to be.
Would be nice to right-click on source dir in jBPM and ESB project (or from File menu)
and select:
New | Other | ESB | ESB Action
of
New | Other | JBoss jBPM | jBPM Action
I think it would save new users even more time, because they may not know to go look in
the quickstarts to find a template action to copy.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira