-
1. Re: how to use "work item" in jbpm-web-console?
tob1as Jul 25, 2011 2:26 AM (in response to victor_ma)Could you explain in more detail?
With work item you mean a domain specific tasks ?!
Something like this?
import org.drools.process.core.datatype.impl.type.StringDataType;
[
// the Notification work item
[
"name" : "Notification",
"parameters" : [
"Message" : new StringDataType(),
"From" : new StringDataType(),
"To" : new StringDataType(),
"Priority" : new StringDataType(),
],
"displayName" : "Notification",
"icon" : "icons/notification.gif"
]
]
This explains how to do it in guvnor:
This chapter gives some insight:
http://docs.jboss.org/jbpm/v5.1/userguide/ch13.html
What exactly do you want to do in the console? Simply invoke it? If yes, the video shows it.
Hope I helped you somehow.
-
2. Re: how to use "work item" in jbpm-web-console?
victor_ma Jul 25, 2011 5:20 AM (in response to tob1as)sorry ...
i want to use the service task in the jbpm-web-console, and i create a handler like this:
public class MyWorkItemHandler implements WorkItemHandler {
@Override
public void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {
System.out.println("God Like in abort!");
}
@Override
public void executeWorkItem(WorkItem arg0, WorkItemManager arg1) {
System.out.println("God Like in execute for reporttodf!");
}
}
but how to make it works? since
ksession.getWorkItemManager().registerWorkItemHandler(
"MyHandler", new MyWorkItemHandler());throw exeptions.
thanks a lot!
-
3. Re: how to use "work item" in jbpm-web-console?
tsurdilovic Jul 25, 2011 1:07 PM (in response to victor_ma)if you are using jbpm installer look in the $jbpm_installer/conf/META-INF directory. there you will find a file called CustomWorkItemHandlers.conf. You would need to register your workitem in this file and run
ant clean.demo
ant install.demo
for it to get copied to the right location. Otherwise you would need to manually copy CustomWorkItemHandler.conf and drools.session.conf into
jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/
Hope this helps.