Reza Ghalavand [
https://community.jboss.org/people/allgreenphosphor] created the
discussion
"WorkItemHandler Deployment Problem"
To view the discussion, visit:
https://community.jboss.org/message/761106#761106
--------------------------------------------------------------
Hi everyone,
I'm new to JBoss. I've been using demo installer for a few days testing it, and
right now I'm trying to register a workitemhandler of my own.
so far I've edited CustomWorkItemHandlers.conf in notepad just as everyone says and
made a WorkItemHandler class.
here's my CustomWorkItemHandlers.conf:
[
"Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
* "MyLog": new com.myTask.WorkItemHandler(),*
*]*
and here's the WorkItemHandler class itself in java:
package com.myTask;
import java.io.FileWriter;
import java.io.IOException;
import org.drools.runtime.process.WorkItem;
import org.drools.runtime.process.WorkItemHandler;
import org.drools.runtime.process.WorkItemManager;
public class MyTaskHandler implements WorkItemHandler {
@Override
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
}
@Override
public void executeWorkItem(WorkItem arg0, WorkItemManager arg1) {
FileWriter out;
try {
out = new FileWriter("C:\\out.txt");
out.write("Greetings from handler!");
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
the problem is I have no prior experience with JBoss AS (nor with any other Java AS) and I
have difficulty figuring out where to actually put my jar file so it gets deployed
correctly. it's hard to tell because demo installer uses temproary folders which get
deleted each time I stop/restart server. I'm kind of confused.
thanks in advance
PS: It's jBPM 5.3.0
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/761106#761106]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]