Codota Logo
ExecWorkItemHandler.setLogThrownException
Code IndexAdd Codota to your IDE (free)

How to use
setLogThrownException
method
in
org.jbpm.process.workitem.exec.ExecWorkItemHandler

Best Java code snippets using org.jbpm.process.workitem.exec.ExecWorkItemHandler.setLogThrownException (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.jbpm.contrib/exec-workitem

  @Test
  public void testExecCommandInvalidParam() throws Exception {
    TestWorkItemManager manager = new TestWorkItemManager();
    WorkItemImpl workItem = new WorkItemImpl();

    ExecWorkItemHandler handler = new ExecWorkItemHandler();
    handler.setLogThrownException(true);

    handler.executeWorkItem(workItem,
                manager);

    assertNotNull(manager.getResults());
    assertEquals(0,
           manager.getResults().size());
  }
}
origin: org.jbpm.contrib/exec-workitem

@Test
public void testExecCommandWithArguments() throws Exception {
  TestWorkItemManager manager = new TestWorkItemManager();
  WorkItemImpl workItem = new WorkItemImpl();
  workItem.setParameter("Command",
             "java");
  List<String> argumentList = new ArrayList<>();
  argumentList.add("-version");
  workItem.setParameter("Arguments",
             argumentList);
  ExecWorkItemHandler handler = new ExecWorkItemHandler();
  handler.setLogThrownException(true);
  handler.executeWorkItem(workItem,
              manager);
  assertNotNull(manager.getResults());
  assertEquals(1,
         manager.getResults().size());
  assertTrue(manager.getResults().containsKey(workItem.getId()));
  Map<String, Object> results = ((TestWorkItemManager) manager).getResults(workItem.getId());
  String result = (String) results.get(ExecWorkItemHandler.RESULT);
  assertEquals("[java, -version]",
         handler.getParsedCommandStr());
  assertNotNull(result);
  assertTrue(result.contains("java version") || result.contains("jdk version"));
}
origin: org.jbpm.contrib/exec-workitem

@Test
public void testExecCommand() throws Exception {
  TestWorkItemManager manager = new TestWorkItemManager();
  WorkItemImpl workItem = new WorkItemImpl();
  workItem.setParameter("Command",
             "java -version");
  ExecWorkItemHandler handler = new ExecWorkItemHandler();
  handler.setLogThrownException(true);
  handler.executeWorkItem(workItem,
              manager);
  assertNotNull(manager.getResults());
  assertEquals(1,
         manager.getResults().size());
  assertTrue(manager.getResults().containsKey(workItem.getId()));
  Map<String, Object> results = ((TestWorkItemManager) manager).getResults(workItem.getId());
  String result = (String) results.get(ExecWorkItemHandler.RESULT);
  assertEquals("[java, -version]",
         handler.getParsedCommandStr());
  assertNotNull(result);
  assertTrue(result.contains("java version") || result.contains("jdk version"));
}
origin: org.jbpm/jbpm-workitems-exec

  @Test
  public void testExecCommand() throws Exception {
    TestWorkItemManager manager = new TestWorkItemManager();
    WorkItemImpl workItem = new WorkItemImpl();
    workItem.setParameter("Command",
               "java -version");
    ExecWorkItemHandler handler = new ExecWorkItemHandler();
    handler.setLogThrownException(true);

    handler.executeWorkItem(workItem,
                manager);

    assertNotNull(manager.getResults());
    assertEquals(1,
           manager.getResults().size());
    assertTrue(manager.getResults().containsKey(workItem.getId()));
  }
}
org.jbpm.process.workitem.execExecWorkItemHandlersetLogThrownException

Popular methods of ExecWorkItemHandler

  • <init>
  • executeWorkItem
  • getParsedCommandStr
  • handleException

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now