Class ExecShellScriptWorkItemHandler

  • All Implemented Interfaces:
    org.kie.api.runtime.process.WorkItemHandler

    @Wid(widfile="ExecShellScriptDefinitions.wid",name="ExecShellScript",displayName="ExecShellScript",defaultHandler="mvel: new org.jbpm.process.workitem.exec.ExecShellScriptWorkItemHandler()",documentation="exec-workitem/index.html",category="exec-workitem",icon="ExecShellScript.png",parameters={@WidParameter(name="ShellScriptLocation",required=true),@WidParameter(name="TimeoutInMillis"),@WidParameter(name="AddEnvironmentVariable",runtimeType="java.util.Map"),@WidParameter(name="RemoveEnvironmentVariable",runtimeType="java.util.List")},results=@WidResult(name="Output"),mavenDepends=@WidMavenDepends(group="org.jbpm.contrib",artifact="exec-workitem",version="7.65.0.Final"),serviceInfo=@WidService(category="Exec",description="Execute a command",keywords="execute,shell script",action=@WidAction(title="Execute a shell script"),authinfo=@WidAuth))
    public class ExecShellScriptWorkItemHandler
    extends org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
    WorkItemHandler that is capable of executing shell script file
    • ShellScriptLocation - Absolute or relative path of shell script file - mandatory
    • TimeoutInMillis - Timeout in Milliseconds for execution. Default value is 1000 MilliSeconds
    • AddEnvironmentVariable - A Map of environment variable to be added
    • RemoveEnvironmentVariable -A List of environment variable to be removed
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String RESULT  
      • Fields inherited from class org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler

        handlingProcessId, handlingStrategy, logThrownException, retries
    • Constructor Detail

      • ExecShellScriptWorkItemHandler

        public ExecShellScriptWorkItemHandler()
    • Method Detail

      • executeWorkItem

        public void executeWorkItem​(org.kie.api.runtime.process.WorkItem workItem,
                                    org.kie.api.runtime.process.WorkItemManager manager)
      • abortWorkItem

        public void abortWorkItem​(org.kie.api.runtime.process.WorkItem workItem,
                                  org.kie.api.runtime.process.WorkItemManager manager)