[jBPM] - Re: Event Based Gateway Split - xml parsing error
by Tihomir Surdilovic
Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion
"Re: Event Based Gateway Split - xml parsing error"
To view the discussion, visit: http://community.jboss.org/message/627900#627900
--------------------------------------------------------------
Yes, this is an issue because the OMG Semantic.xsd defines a specific sequence for the process element
<xsd:complexType name="tProcess">
<xsd:complexContent>
<xsd:extension base="tCallableElement">
<xsd:sequence>
<xsd:element ref="auditing" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="monitoring" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="laneSet" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="flowElement" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="resourceRole" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="correlationSubscription" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="supports" type="xsd:QName" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="processType" type="tProcessType" default="None"/>
<xsd:attribute name="isClosed" type="xsd:boolean" default="false"/>
<xsd:attribute name="isExecutable" type="xsd:boolean"/>
<xsd:attribute name="definitionalCollaborationRef" type="xsd:QName" use="optional"/>
</xsd:extension>
</xsd:complexContent>
eclipse.bpmn2 on the other hand cannot follow this sequence as defined. Bypassing Semantic.xsd fixes the issue :)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/627900#627900]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[Javassist] - Class loader issue in javassist
by Arash Bijanzadeh
Arash Bijanzadeh [http://community.jboss.org/people/armita] created the discussion
"Class loader issue in javassist"
To view the discussion, visit: http://community.jboss.org/message/619450#619450
--------------------------------------------------------------
I am trying to get a hold on javassist for one of our companies projects. I wrote this simple class for testing
public class Main {
public void test(){
ClassPool cp = ClassPool.getDefault();
CtClass entity = cp.makeClass("Entity");
try {
entity.addField(CtField.make(" public Integer id;",entity));
entity.addField(CtField.make(" public String name;", entity));
entity.addMethod(CtNewMethod.make("public void say() { System.out.println(12222);}",entity));
Class EntityClass = entity.toClass();
entity.writeFile("/tmp");
Object e= EntityClass.newInstance();
Field name = EntityClass.getField("name");
name.set("Ooldooz", e);
System.out.println(name.get(e));
} catch (CannotCompileException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (InstantiationException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (IllegalAccessException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (NoSuchFieldException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
} catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
public static void main(String[] args){
Main main = new Main();
main.test();
}
}
Trying to run, I get this error:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Can not set java.lang.String field Entity.name to java.lang.String
> at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
> at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
> at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
> at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
> at java.lang.reflect.Field.set(Field.java:657)
> at Main.test(Main.java:26)
>
Can anybody help me out please?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619450#619450]
Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Loading processInstance/session via JPA, workItem executes before able to register workItems
by Ryan Peterson
Ryan Peterson [http://community.jboss.org/people/rrpeterson] created the discussion
"Loading processInstance/session via JPA, workItem executes before able to register workItems"
To view the discussion, visit: http://community.jboss.org/message/627859#627859
--------------------------------------------------------------
Hey guys,
I've got a process that I run the 1st half until it hits a timer, at which time I persist the process instances to the DB. This portion works fine.
When retrieving the sessions, I find (based on stack exceptions & debugging) JBPM calls JPAWorkItemManager.internalExecuteWorkItem before I can register my workItemHandlers.
Right now I'm calling JPAKnowledgeService.loadStatefulKnowledgeSession, and immediately after calling ksession.getWorkItemManager().registerWorkItemHandler, but it seems like some kind of race condition occurs and the engine wants to execute immediately upon loading from the database.
Has anyone else run into this problem before?
org.drools.RuntimeDroolsException: Unexpected exception executing action org.jbpm.process.instance.event.DefaultSignalManager$SignalProcessInstanceAction@4b04cf88
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:996)
at org.drools.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:845)
at org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:89)
at org.jbpm.process.instance.timer.TimerManager$ProcessJob.execute(TimerManager.java:164)
at org.drools.time.impl.JDKTimerService$JDKCallableJob.call(JDKTimerService.java:151)
at org.drools.persistence.jpa.JpaJDKTimerService$JpaJDKCallableJob.internalCall(JpaJDKTimerService.java:80)
at org.drools.persistence.jpa.JpaJDKTimerService$JpaJDKCallableJob.access$100(JpaJDKTimerService.java:63)
at org.drools.persistence.jpa.JpaJDKTimerService$JDKCallableJobCommand.execute(JpaJDKTimerService.java:96)
at org.drools.persistence.jpa.JpaJDKTimerService$JDKCallableJobCommand.execute(JpaJDKTimerService.java:84)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:292)
at org.drools.persistence.jpa.JpaJDKTimerService$JpaJDKCallableJob.call(JpaJDKTimerService.java:75)
at org.drools.persistence.jpa.JpaJDKTimerService$JpaJDKCallableJob.call(JpaJDKTimerService.java:63)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.drools.WorkItemHandlerNotFoundException: Could not find work item handler for SendEmail
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.throwWorkItemNotFoundException(JPAWorkItemManager.java:60)
at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)
at org.jbpm.workflow.instance.node.TimerNodeInstance.triggerCompleted(TimerNodeInstance.java:135)
at org.jbpm.workflow.instance.node.TimerNodeInstance.signalEvent(TimerNodeInstance.java:125)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:333)
at org.jbpm.process.instance.event.DefaultSignalManager$SignalProcessInstanceAction.execute(DefaultSignalManager.java:117)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:994)
... 18 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/627859#627859]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months