Package org.jbpm.process.workitem.exec
Class ExecWorkItemHandler
- java.lang.Object
-
- org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
-
- org.jbpm.process.workitem.exec.ExecWorkItemHandler
-
- All Implemented Interfaces:
org.kie.api.runtime.process.WorkItemHandler
@Wid(widfile="ExecDefinitions.wid",name="Exec",displayName="Exec",defaultHandler="mvel: new org.jbpm.process.workitem.exec.ExecWorkItemHandler()",documentation="exec-workitem/index.html",category="exec-workitem",icon="Exec.png",parameters={@WidParameter(name="Command",required=true),@WidParameter(name="Arguments",runtimeType="java.util.List"),@WidParameter(name="TimeoutInMillis",runtimeType="java.lang.String")},results=@WidResult(name="Output"),mavenDepends=@WidMavenDepends(group="org.jbpm.contrib",artifact="exec-workitem",version="7.62.0.Final"),serviceInfo=@WidService(category="Exec",description="Execute a command",keywords="execute,comand",action=@WidAction(title="Execute a command"),authinfo=@WidAuth)) public class ExecWorkItemHandler extends org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
-
-
Constructor Summary
Constructors Constructor Description ExecWorkItemHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)protected StringexecuteCommand(String command, List<String> arguments, long timeout)voidexecuteWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)StringgetParsedCommandStr()protected longparseTimeout(String durationStr)voidsetDefaultTimeout(long defaultTimeout)
-
-
-
Field Detail
-
RESULT
public static final String RESULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeWorkItem
public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
-
parseTimeout
protected long parseTimeout(String durationStr)
-
executeCommand
protected String executeCommand(String command, List<String> arguments, long timeout) throws IOException
- Throws:
IOException
-
abortWorkItem
public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
-
setDefaultTimeout
public void setDefaultTimeout(long defaultTimeout)
-
getParsedCommandStr
public String getParsedCommandStr()
-
-