[jBPM] - How to get parameters in script action
by martin steve
martin steve [https://community.jboss.org/people/martin_2013] created the discussion
"How to get parameters in script action"
To view the discussion, visit: https://community.jboss.org/message/792880#792880
--------------------------------------------------------------
Hello everybody.I have a question, then need your help.
I start a process by session and set a map of parameters.The name of a parameter is "person". As follows:
KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kBuilder.add(ResourceFactory.newClassPathResource("hello.bpmn"),
ResourceType.BPMN2);
KnowledgeBase kBase = kBuilder.newKnowledgeBase();
StatefulKnowledgeSession kSession = kBase.newStatefulKnowledgeSession();
Map<String, Object> params = new HashMap<String, Object>();
Person person = new Person();
person.setName("martin");
params.put("person", person);
ProcessInstance pInstance = kSession.startProcess("com.sample.hello", params);
then I think print the name of person in a script action.Code as follows:
System.out.println(person.getName());
I run my codes and then get a exception:
[main] ERROR builder.impl.KnowledgeBuilderImpl.newKnowledgeBase - Process Compilation error : org.drools.lang.descr.ProcessDescr@79024994
defaultPackage/Process_defaultPackage_Sample_Process_4419562b234b4de3b32f940de6602c9f.java (11:468) : person cannot be resolved
Exception in thread "main" java.lang.IllegalArgumentException: Could not parse knowledge.
at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilderImpl.java:79)
at com.sample.JBPMTest.main(JBPMTest.java:23)
How to get parameters in script action?
Thank you!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/792880#792880]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - Unable to Complete a Reserved Task
by Sandra Renaud
Sandra Renaud [https://community.jboss.org/people/joploya] created the discussion
"Unable to Complete a Reserved Task"
To view the discussion, visit: https://community.jboss.org/message/793227#793227
--------------------------------------------------------------
Hello all,
I am stopped at the end of the first step of my flow by this error :
org.jbpm.task.service.PermissionDeniedException: User '[User:'renauds']' was unable to execution operation 'Complete' on task id 1 due to a no 'current status' match
Going on the TaskServiceSession (evalCommand function) I don't find where it starts to be wrong.
Before to call the complete function
getTaskService().completeWithResults(task.getId(), ((UserLDAP)identity.getUser()).getUser().getLogin(), results);
I print these lines :
System.out.println("task id "+task.getId()+" has status "+getTaskService().getTask(task.getId()).getTaskData().getStatus()+" and is assigned to "+getTaskService().getTask(task.getId()).getTaskData().getActualOwner());
=>
User renauds wants to complete task id 1
task id 1 has status Reserved and is assigned to [User:'renauds']
DEBUG [task.management.MyUserGroupCallbackImpl] (http--127.0.0.1-8080-1) Seaching for user existence with filter renauds
If someone have an hint...
Best regards,
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793227#793227]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[JBoss AOP] - Unable to instantiate service for Class 'org.drools.compiler.BPMN2ProcessProvide in jBPM
by ananda Dayyala
ananda Dayyala [https://community.jboss.org/people/dayyala] created the discussion
"Unable to instantiate service for Class 'org.drools.compiler.BPMN2ProcessProvide in jBPM"
To view the discussion, visit: https://community.jboss.org/message/793155#793155
--------------------------------------------------------------
Hi Friends,
I am ananda reddy dayyala, working fro Ericsson. Just i started working with JBPM. I am getting the below error when i start ProcessMain.java file from the eclipse.Can any one help me to solve this issue . your help will be appreciated .
Exception in thread "main" java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.compiler.BPMN2ProcessProvider'
at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166)
at org.drools.compiler.BPMN2ProcessFactory.loadProvider(BPMN2ProcessFactory.java:28)
at org.drools.compiler.BPMN2ProcessFactory.getBPMN2ProcessProvider(BPMN2ProcessFactory.java:20)
at org.drools.compiler.BPMN2ProcessFactory.configurePackageBuilder(BPMN2ProcessFactory.java:11)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:708)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:51)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:40)
at com.sample.ProcessMain.readKnowledgeBase(ProcessMain.java:25)
at com.sample.ProcessMain.main(ProcessMain.java:17)
Caused by: java.lang.IllegalArgumentException: Unable to instantiate 'org.jbpm.bpmn2.BPMN2ProcessProviderImpl'
at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:217)
at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:209)
at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:164)
... 8 more
Caused by: java.lang.ClassNotFoundException: org.jbpm.bpmn2.BPMN2ProcessProviderImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:214)
... 10 more
Thanks,
Ananda
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793155#793155]
Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[jBPM] - How to show process diagram displaying all nodes executed in that process instance?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"How to show process diagram displaying all nodes executed in that process instance?"
To view the discussion, visit: https://community.jboss.org/message/783795#783795
--------------------------------------------------------------
Hi,
How do we show a process diagram displaying not just the current active node (like the one in jbpm-console), but also displaying / marking all the nodes that has been executed in that given process instance.
The goal is to give the user a good idea on how this process instance executed or what are the path taken in this process instance.
I think of some ways to do this:
1. parsing the bpmn process definition, store all the x, y, width, and height of nodes in a table, later on, join this table with NodeInstanceLog and then somehow use the x and y coordinates to overlay a picture or div on top of static png process image.
2. I am not sure about this, but maybe it is possible to use the process designer, display the process and put some overlay there based on information I got in NodeInstanceLog. Possible? how?
Anyone has a solution for this?
Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783795#783795]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months
[JBoss Tools] - Error on @GeneratedValue validation
by edersondonde
edersondonde [https://community.jboss.org/people/edersondonde] created the discussion
"Error on @GeneratedValue validation"
To view the discussion, visit: https://community.jboss.org/message/793215#793215
--------------------------------------------------------------
Hello all,
I'm using JBoss tools 4.0.0 on Eclipse Juno, and I'm having a validation problem. Making it fast, here is the simplified code:
{code}
@Entity
public class ClassA {
@Id
@GenericGenerator(name="testGen", strategy="identity")
@GeneratedValue(generator="testGen")
private Integer id;
private String name;
}
{code}
Well, the @GeneratedValue line is giving a validation error, "No generator named "testGen" is defined in the persistence unit". I saw some old bug on JBoss Tools that looks related, https://issues.jboss.org/browse/JBIDE-3454 JBIDE-3454, that should be fixed on 3.3, but it looks like it is back on 4.0.0. Am I missing something?
The test project is attached
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793215#793215]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 2 months