Discussion:
[jboss-user] [jBPM] - Re: jBPM Console Server can't find WorkItem Handler Implementation
Ashutosh Kumar
2013-02-26 11:35:35 UTC
Permalink
Ashutosh Kumar [https://community.jboss.org/people/ashu.itbhu] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/799589#799589

--------------------------------------------------------------
In you processmain java file you have to register the handler like this

ksession.getWorkItemManager().registerWorkItemHandler(
       "Activo1", new defaultPackage.Activo1());

Hope this will help you to some extent...

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799589#799589]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
José Tomás Tocino
2013-02-26 11:37:25 UTC
Permalink
José Tomás Tocino [https://community.jboss.org/people/theom3ga] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/799590#799590

--------------------------------------------------------------
As I stated, I want to launch the process *from the console*. I don't have any ProcessMain java file or any other java file other than the WorkItemHandler Implementation.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799590#799590]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-02-26 18:29:27 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/799689#799689

--------------------------------------------------------------
you need to put your custom jar inside jbpm-gwt-console-server.war/WEB-INF/lib so it will be found on runtime. Alternatively you can drop it in jbpm-installer/dependencies and rerun installation so it will get included automatically.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799689#799689]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
José Tomás Tocino
2013-02-27 09:20:38 UTC
Permalink
José Tomás Tocino [https://community.jboss.org/people/theom3ga] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/799822#799822

--------------------------------------------------------------
I thought it would be possible to change the files in runtime so I don't have to be stopping and rebuilding the server every time...
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799822#799822]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
José Tomás Tocino
2013-03-04 09:14:52 UTC
Permalink
José Tomás Tocino [https://community.jboss.org/people/theom3ga] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/800526#800526

--------------------------------------------------------------
So... is it definitely impossible to modify the JAR in runtime?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/800526#800526]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Ashutosh Kumar
2013-03-08 07:42:31 UTC
Permalink
Ashutosh Kumar [https://community.jboss.org/people/ashu.itbhu] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/801495#801495

--------------------------------------------------------------
In my application i have implemented a WI handler for all my DB integrations. This is working fine for in general but not in once case.

1. Lets say in my wid  i have sth as return type defined

"results" : [

     "DB_OPS" : new ObjectDataType("com.sample.Employee")

]

2. In my process i have defined vaiable employee as Object(com.sample.Employee)

3. In my WI handler class i have sth like


Map<String, Object> outputMap = new HashMap<String, Object>();
Employee employee = new Employee()
employee.setFirstName("Joe");
outputMap.put("DB_OPS" , (Object) employee);
manager.completeWorkItem(workItem.getId(), outputMap);

4. This is throwing error while setting value in bean ie doing operation employee.setFirstName("Joe");

5. Error :"APPLICATION ERROR: transaction still active in request with status 0"







--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/801495#801495]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Stephan Pampel
2013-04-09 09:31:53 UTC
Permalink
Stephan Pampel [https://community.jboss.org/people/stephan_p] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/807163#807163

--------------------------------------------------------------
I had the same problem recently and like to share my solution because it took me a lot of time to figure it out.

*1. Extract the jbpm-gwt-console-server.war*
Extract the jbpm-gwt-console-server.war in <server>/standalone/deployments/ (with 7zip), make sure the directory name is jbpm-gwt-console-server.war. Remove the jbpm-gwt-console-server.war file from the directory. Start the server and test if the console iscorrectly deployed. If not re the README.txt in the deployments folder and create a  jbpm-gwt-console-server.war.dodeploy file

*2. Create .jars of your custom work item handlers*
If you are using Eclipse you can simply right click one the file you want to have in the jar an click export. The choose "JAR file" and in the next step select all the classes you want to include. Place your *.jar files in <server>/standalone/deployments/jbpm-gwt-console-server.war/WEB-INF/lib

*3. publicize your config files to the console*
Put your drools.rulebase.conf, drools.session.conf, workItemHandlers.conf etc. in the <server>/standalone/deployments/jbpm-gwt-console-server.war/WEB-INFclasses/META-INF so they can be found by the console.

Please test this and watch server.log for problems (maybe I have forgotten something).

Hope this helps someone
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/807163#807163]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-04-10 05:59:45 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/807332#807332

--------------------------------------------------------------
Thanks a lot for this Stephan!

Just one comment about point 3, you could use session template config file to register handler, event listeners etc, check out http://docs.jboss.org/jbpm/v5.4/userguide/ch.console.html#d0e4698 documentation on this, might be easier to work with console. But jars with custom classes must be placed within console-server.war as you described.

Cheers
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/807332#807332]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Stephan Pampel
2013-04-11 11:48:46 UTC
Permalink
Stephan Pampel [https://community.jboss.org/people/stephan_p] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/807693#807693

--------------------------------------------------------------
I edited my post above. Do you know if there is a posibility to add custom work item handlers via the guvnor repository? So i don't have to edit the session template every time and can keep the config in one place.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/807693#807693]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
David Harris
2013-05-31 15:29:33 UTC
Permalink
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/820713#820713

--------------------------------------------------------------
Hi Maciej,

Could you produce a complete tutorial on how to deploy a process that contains Java code and work items from the web Process Designer.   We're all trying a bunch of different things, thinking/hoping that they work.  Many of us are not getting our questions answered on this.  It would help if the tutorial had some screen shots instead of just text.

This appears to be an easy process and probably is, but a bunch of people are spending a lot of time trying to figure it out and a straightforward description would save us a lot of time. What do you think?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820713#820713]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-06-03 10:30:22 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/820948#820948

--------------------------------------------------------------
David, I beliee you have quite complete description https://community.jboss.org/thread/224360?tstart=0 here but that might be anyway to capture all that insngle documentation/blog page. Could you please fine a jira (documentation) issue for this?

Cheers
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820948#820948]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
alvinuw
2013-06-03 13:31:59 UTC
Permalink
alvinuw [https://community.jboss.org/people/alvinuw] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/820999#820999

--------------------------------------------------------------
Hi Maciej,

Do you have any idea about this error "*APPLICATION ERROR: transaction still active in request with status 0.*"?
Thank you.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820999#820999]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-06-03 16:22:11 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/821049#821049

--------------------------------------------------------------
alvinuw, please open new thread for new question and provide as much details as you have to help with problem analysis.

Cheers
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821049#821049]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
alvinuw
2013-06-04 12:59:55 UTC
Permalink
alvinuw [https://community.jboss.org/people/alvinuw] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/821264#821264

--------------------------------------------------------------
Hi Maciej,

The new thread was opened at https://community.jboss.org/thread/228748?tstart=0 https://community.jboss.org/thread/228748?tstart=0
Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/821264#821264]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
alvinuw
2013-05-29 17:05:59 UTC
Permalink
alvinuw [https://community.jboss.org/people/alvinuw] created the discussion

"Re: jBPM Console Server can't find WorkItem Handler Implementation"

To view the discussion, visit: https://community.jboss.org/message/820183#820183

--------------------------------------------------------------
Hi Ashutosh Kumar,

Did you solve the *APPLICATION ERROR: transaction still active in request with status 0.*
I have the same error, but don't " *https://community.jboss.org/message/807693#807693 Console Server can't find WorkItem Handler Implementation*" error.
In my handler, I have

Map<String, Object> results = new HashMap<String, Object>();
results.put("MsgId", id);
results.put("Checker", recipient);
manager.completeWorkItem(workItem.getId(), results);

Both "MsgId" and "Checker" are variables of the process.

Any suggestions are appreciated.
Thanks.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/820183#820183]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...