Human Task Module API and DataStructures Proposed changes
by Mauricio Salatino
Hi guys,
I'm back with more wiki pages. I was thinking about how to improve the
Human Task Module and I came back with this wiki page
that shows some proposals.
The main idea behind the proposal is to modularize as much as we can the
features provided by the human task module. I've also included
into the proposal the concept of TaskDefinition which will allow us to add
a nice integration with the form builder (in modeling and in runtime
phases).
I'm trying to move towards CDI to leverage all the mechanisms provided by
the framework and the fact that exposing CDI beans across different
platforms is extremely easy these days.
https://community.jboss.org/wiki/HumanTaskAPIAndDataStructuresProposal
I understand that the changes proposed in the wiki looks quite heavy, but I
do believe that we can fit the current code base into that structure
without loosing functionality.
The document is showing APIs and Data Structures only. i think that we can
assume that all the services implementation will represent simple stateless
services which will
insert and read information from a database, so architecturally speaking
from that perspective the service implementations should be straight
forward.
I will be filling the Data Structure Sections briefly, but I would like to
share the main concepts with you guys to gather feedback, as always.
Cheers
--
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
12 years, 5 months
ContentMarshallerHelper.unmarshall()
by Alberto R. Galdo
Hi,
I'm posting in this list because I will post very low level details
which may not fit well in the user list. Please tell me if this is correct.
We are trying to build a system using JBPM with human task, and we are
now using the recent LocalTaskService and LocalHTWorkItemHandler ... that
way:
humanTaskClient = new LocalTaskService(taskService);
....
LocalHTWorkItemHandler localHTWorkItemHandler = new
LocalHTWorkItemHandler(humanTaskClient, sesion);
....
We are facing a NullpointerException when unmarshalling the result of a
completed human task. Here's the relevant stack trace:
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1)
java.lang.NullPointerException
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.marshalling.impl.ProtobufProcessMarshaller.unmarshallVariableValue(ProtobufProcessMarshaller.java:270)
11:11:21,734 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.utils.ContentMarshallerHelper.unmarshall(ContentMarshallerHelper.java:112)
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.handleCompletedTask(GenericHTWorkItemHandler.java:230)
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler$TaskCompletedHandler.execute(GenericHTWorkItemHandler.java:204)
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.local.LocalTaskService$SimpleEventTransport.trigger(LocalTaskService.java:320)
11:11:21,750 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.event.MessagingTaskEventListener.taskCompleted(MessagingTaskEventListener.java:80)
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.event.TaskEventSupport.fireTaskCompleted(TaskEventSupport.java:46)
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.TaskServiceSession.postTaskCompleteOperation(TaskServiceSession.java:563)
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.TaskServiceSession.taskOperation(TaskServiceSession.java:495)
11:11:21,765 ERROR [stderr] (http--0.0.0.0-8080-1) at
org.jbpm.task.service.local.LocalTaskService.complete(LocalTaskService.java:82)
Some inspection lead us to locate this snippet that is
ObjectMarshallingStrategyStore objectMarshallingStrategyStore =
marshallingConfigurationImpl.getObjectMarshallingStrategyStore();
context = new MarshallerReaderContext(stream, null, null,
objectMarshallingStrategyStore, null, env);
if(classloader != null){
context.classLoader = classloader;
}else{
context.classLoader =
ContentMarshallerHelper.class.getClassLoader();
}
ExtensionRegistry registry = PersisterHelper.buildRegistry(
context, null );
Header _header =
PersisterHelper.readFromStreamWithHeader(context, registry);
Variable parseFrom =
JBPMMessages.Variable.parseFrom(_header.getPayload(), registry);
Object value =
ProtobufProcessMarshaller.unmarshallVariableValue(context, parseFrom);
which is radically different from the previous implementation (
protocol buffers appears ).
The problem is that in this code ( in ProtobufProcessMarshaller ) :
ObjectMarshallingStrategy strategy = context.usedStrategies.get(
_variable.getStrategyIndex() );
Object value = strategy.unmarshal( context.strategyContexts.get(
strategy ),
context,
_variable.getValue().toByteArray(),
(context.ruleBase ==
null)?null:context.ruleBase.getRootClassLoader() );
return value;
context.usedStrategies and context.strategyContexts are both Maps of
size 0. And so the NPE.
Our process runs ok before creating the human task and it only fails
when completing a human task.
Any insight on what can be happening here?
Greets,
Alberto R. Galdo
argaldo(a)gmail.com
12 years, 5 months
Re: [jbpm-dev] rule flow
by al so
>
>
> Looking at the patchy documentation, one is not sure if jBPM obsoletes
> Rule Flows?
> If Yes, what about *ruleflow*-*group **attribute in the Rule definition
> (.drl file) in Drools Expert?*
>
> Can one be able to just convert a .drl file into a jBPM file? jBPM
> supports Process and Rule integration.
>
>
>
12 years, 5 months
Re: [jbpm-dev] Support for Hibernate 4 and JPA2
by Marco Rietveld
Hi Ove!
I did some work on this early this year -- thanks very much for your
pull request, it made my work a lot easier.
We've done the following in the past year:
- changed jbpm-persistence-jpa so that the hibernate 3.3 dependency is
no longer hard-coded into the code, so to speak
- I know that Mauricio corrected some queries in human-task that weren't
JPA 2 compliant.
- added a "hibernate-4" maven profile that you can compile using
hibernate 4/JPA 2.
I might have done one or two other things for this, but I can't remember
them any more -- which means they also weren't of any consequence.
Regardless, see
http://mriet.wordpress.com/2012/04/03/jpa-2-with-drools-and-jbpm/
Ignore the second part (¨Developer bits and ranting"), I just reread it
and had trouble following it myself.. :/
When I initially did all of this work, there were 2 or 3 problems in
various modules -- code that worked under hib 3.3/jpa 1 but not hib
4/jpa 2. Unfortunately, while one or two might have been fixed
(human-task queries), I think that there are probably one or two still
left -- these were problems that I was at a loss to explain/fix at the
time.
Thanks,
Marco
22-06-12 19:27, Ove Ranheim:
> Hi guys,
>
> Earlier this year I provided a patch for Drools and jBPM to support Hibernate 4 and JPA2. My git commit was rejected due to committed to EAP5. Reasonable enough.
>
> Now that EAP6 is key to JBoss. What plans do you have in Drools and jBPM to support Hibernate 4 and JPA2?
>
> I'm still running on my patched version of Drools and jBPM in such respect and look forward to be able to comply with future stack releases.
>
> Cheers,
> Ove
> www.musific.com
>
>
> _______________________________________________
> jbpm-users mailing list
> jbpm-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbpm-users
--
jBPM/Drools developer
Utrecht, the Netherlands
12 years, 5 months
Human Task Module Roadmap - Feedback
by Mauricio Salatino
Hi guys,
I'm writing you to get some feedback about the proposed roadmap for the
Human Task Module:
https://community.jboss.org/wiki/HumanTaskModuleRoadMap
Feel free to leave a comment about other topics that you think that needs
to be reviewed for the Human Task Module.
I will be focused in tackling down those points ordered by priority as soon
as possible. Hopefully we can get all those
points for the next release.
Notice that I've added a priority for each of the internal points. It will
be really helpful if the core devs add what they think about
those numbers to help me to schedule my work. The external improvements
(API, Docs and Transport) doesn't have priority because
I think that those are Top priority, but I cannot start changing the APIs
without having a proposal based on the internal reviews.
I will be linking more detailed wiki pages for each of those points as soon
as I get something to show so stay tuned.
--
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
12 years, 6 months
jbpm5 show process image in custom web app
by Giovanni Marigi
Hi,
a customer wants to show in a custom web app the process image of jbpm 5
processes (as in jbpm console)
I couldn't find any API that helps me; suggestions?
Thanks,
Giovanni
--
Giovanni Marigi
Red Hat - JBoss Consultant -
email: gmarigi(a)redhat.com
Mobile: +39 3423175986
Office: +39 0687502315
Red Hat Italy
Via Andrea Doria 41m
00192 Roma - Italy
www.redhat.com
Prima di stampare, pensa all'ambiente ** Think about the environment before printing
12 years, 6 months
form builder - requirements request (+work in progress)
by Mauricio Salatino
Hi guys,
This is a quick update trying to describe the current status of the form
builder project. I've being working the project for a week now and I've
created a branch to do some big changes. I will quickly try to explain what
these changes are and why I think that are important for the project. The
following list shows the project modules that I'm trying to create inside
the form-builder-split branch in:
https://github.com/droolsjbpm/jbpm-form-builder
-Form Builder API (already existing): as the name of the project mention,
it will contain all the APIs to interact with the form builder functionality
-Form Builder Model (new): this new module contains the models that are
being used to represent forms and it was decoupled from the WAR and API
modules in order to allow us depend on the model without being tied to all
the form builder project as a dependency for the one that only wants to
consume and render the forms that were created.
-Form Builder Services (work in progress): I'm still working on this
module, but once again, the services the get the forms and the tasks
associated with a form needs to be decoupled from the Form Builder WAR
module which is the authoring tool. The ones that wants to just render a
form doesn't need to depend on the whole tool.
-Form Builder (WAR) (already existing): This war needs to be clean up in
order to only contain the classes that are used for authoring forms
-Form Builder Consumer/Client (archetype probably/ new): we need to have
clear rules and dependencies to be able to consume a form, no matter the
technology that we want to use for rendering. In theory the consumer will
use the Model and the Services + one exporter to render a form.
-Form Builder Exporters (FTL/GWT): (already existing) the exporter projects
have the mappings between the form meta model and each rendering
technology. I will be focused on GWT and I will try to dig a little bit in
HTML5 to see what can be done. At this point I don't know to much about
these projects and their limitations.
As you can see in the attached image, the services module interacts with an
storage to do different things. One of the things that I will be adding
soon is a service to manage the form builder settings. Until now, all the
services were stateless, they do not store status in no way. What I would
like to add is a way for the user to store their customizations and
configurations in a persistent storage. At this point there are a two
different things that can be stored:
1) Forms Structures / Form Item Structures / Human Task
Structures-Information
The form builder have a very cool feature to analyze Human Tasks structures
that can be retrieved from a bpmn2 file and based on that generate forms.
Those generated forms needs to be stored somewhere. Because they are
knowledge assets, guvnor looks like the right place to go. I've implemented
also a FileSystem support, to be able to use the FormBuilder without guvnor
which makes our life easier to test the component without having the whole
environment running. All this information is static and stateless in some
way. We store and load these assets from Guvnor or the FileSystem using the
existing services. (Adding support for a DB storage option probably make
sense as well)
2) Settings / Customizations per user or role
I'm planning to add a new service to manage and store settings for the form
builder. These settings can be stored in a database, and I'm not sure that
they can be considered as business assets. These settings are related to
the user that is working with an instance of the form builder and want to
customize its menus and for example choose if he/she wants to store if
he/she was using the FileSystem storage option and a set of custom Form
Items.
As soon as I have the initial version of this service to handle settings I
will be focused in creating a Generic Form Builder Consumer to demonstrate
how you can use and integrate the generated Form with your own application.
Hopefully I can get this working next week.
If you have feedback about this points or if you have some features that
you would like to see working in the form builder in the next month please
write back. I'm eager to see how people wants to use this component.
Remember that I'm working to get this component working in a "standalone"
mode, so if you have another ideas about how to use it outside of the
business process context please let us know :)
Cheers
--
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
12 years, 6 months