[JBoss jBPM] - Re: write a web service to invoke a process
by Vorsorge
Hi Andy,
just to give you some idea what we did in the same situation.
We wrote some Java classes with the basic methods we want to use for our Jbpm processes:
| - JbpmServiceReturnValue startProcess(User user, String processName, HashMap<String, Object> inParameter)
|
| - JbpmServiceReturnValue resumeProcess(User user, String processName, long processID, String calledTransition, HashMap<String, Object> inParameter)
|
| - JbpmServiceReturnValue readProcess(User user, String processName, long processID)
|
|
Where:
JbpmServiceReturnValue is a class wich contains data from the process call like:
- process ID
- if process is suspended: Resumable transitions
- Process ErrorCodes and Messages
- ... some more ...
inParameters are a hash map. Its entries will be inserted in the ContextInstance as process variables.
This classes also handle the user authorisation before we even start the process.
We exposed this classes as our WebService interface for our Business Process Server. This is easy to use from all our applications.
Just to give you an architectural idea.
Martin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088333#4088333
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088333
18 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - Re: AJP Flush Packet causing text/plain output
by reisler
An update:
I neglected to note that I think the reason this flush buffer upsets Apache is that Apache is forced to flush a response without any of the header information from Tomcat. So it uses the default type, and chunked encoding (because it doesn't know the length), and can't send any of the other headers.
In despeartion, I created a patch to mod_jk 1.2.25 that seems to solve the symptom:
diff jk_ajp_common.c jk_ajp_common.orig
1742,1751d1741
< // Removing extra flush buffer if we do not need it.
< if (headeratclient == JK_FALSE) {
< int code = (int)jk_b_pget_byte(op->reply,0);
< unsigned int len = (unsigned int)jk_b_pget_int(op->reply,1);
< if ((code == JK_AJP13_SEND_BODY_CHUNK) && (len == 0)) {
< jk_log(l, JK_LOG_DEBUG, "Received flushbuffer -- ignoring");
< continue;
< }
< }
<
This might be a good check to have in mod_jk regardless, but there is still the issue as to whether Tomcat should be sending this at all.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088329#4088329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088329
18 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Quartz job doesn't start when JBoss starts but starts when n
by Pulrulczyk
Hello,
I have a problem with JBoss 4.2.0 GA when it starts. It doesn't start my job . But if I redeploy my jar file with the same files, the service and jobs start. Do you know why it doesn't take account my job when Jboss starts.
Here's my service :
<?xml version="1.0" encoding="UTF-8"?>
<!--
Wait until the DataSources deployed. This option
ensures correct deployment order at JBoss startup.
Change the 'QuartzDS' to your datasource name.
Important!==> this is NOT the JNDI name of the datasource.
(JNDI name for it is set in a separate xxx-service.xml file).
-->
<!-- jboss.jca:service=LocalTxCM,name=QuartzDS -->
<!--
jboss.jca:service=DataSourceBinding,name=OracleDS
-->
<!--
Wait for the deployment of XA-DataSource (if u have one ;)
The same as above, but for XA-compliant datasource.
Uncomment if you need it.
-->
<!--
jboss.jca:service=DataSourceBinding,name=QuartzDS-XA
-->
<!--
jboss.jca:service=XATxCM,name=QuartzDS-XA
-->
<!--
JNDI name for locating Scheduler, "Quartz" is default.
-->
Quartz
<!--
Call Scheduler.start() only if requested. Most of the time this
should be true. In some special cases you may want to have
scheduler service available but not run the jobs (for example,
if you want to administer the jobs on a particular server, only).
Default value is true.
-->
<!--
true
-->
<!--
By default a Properties file named "quartz.properties" is
loaded from the 'current working directory'. If that fails,
then the "quartz.properties" file located (as a resource)
in the org/quartz package is loaded. If you wish to use a
file other than these defaults, you must either define the
system property 'org.quartz.properties' to point to the
file you want or set the PropertiesFile attribute. You
may also specify the properties directly by setting the
Properties attribute. You must use only one of these
methods to specify the properties.
-->
<!--
Initialize the SchedulerFactory with the contents
of the Properties file with the given name.
-->
<!--
quartz.properties
-->
<!--
Initialized the SchedulerFactory with the contents
of the given Properties object.
-->
# Default Properties file for use by StdSchedulerFactory
# to create a Quartz Scheduler Instance, if a different
# properties file is not explicitly specified.
#
# org.quartz.scheduler.classLoadHelper.class =
org.quartz.scheduler.instanceName = DefaultQuartzScheduler
org.quartz.scheduler.rmi.export = false
org.quartz.scheduler.rmi.proxy = false
org.quartz.scheduler.xaTransacted = false
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 4
<!--
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource = QUARTZ
org.quartz.jobStore.nonManagedTXDataSource = QUARTZ_NO_TX
org.quartz.jobStore.tablePrefix = QRTZ_
org.quartz.dataSource.QUARTZ.jndiURL = java:/jdbc/QuartzDS
org.quartz.dataSource.QUARTZ_NO_TX.jndiURL = java:/jdbc/QuartzNoTxDS
-->
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
#============================================================================
# Configure Plugins
#============================================================================
org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin
org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger {1}.{0} fired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}
org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger {1}.{0} completed firing job {6}.{5} at {4, date, HH:mm:ss MM/dd/yyyy} with resulting trigger instruction code: {9}
org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
#org.quartz.plugin.jobInitializer.fileName = c:/jobs.xml
org.quartz.plugin.jobInitializer.fileName = jobs.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
org.quartz.plugin.jobInitializer.failOnFileNotFound = false
org.quartz.plugin.jobInitializer.useContextClassLoader = true
org.quartz.plugin.jobInitializer.validating = false
org.quartz.plugin.jobInitializer.validatingSchema = false
org.quartz.plugin.jobInitializer.scanInterval = 5
And my job.xml :
<?xml version='1.0' encoding='utf-8'?>
<quartz xmlns="http://www.quartzscheduler.org/ns/quartz"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
overwrite-existing-jobs="true">
<job-detail>
calculatorjob
JOB_GROUP
<job-class>fr.CalculatorJob</job-class>
false
false
false
</job-detail>
testTrigger
TRIGGER_GROUP
<job-name>calculatorjob</job-name>
<job-group>JOB_GROUP</job-group>
<!-- <start-time>2003-12-17 9:15:00 pm</start-time>
<end-time>2013-12-17 9:15:00 pm</end-time> -->
<cron-expression>0/10 * * ? * *</cron-expression> <!-- every 10 seconds... -->
Thank you for you help
Cédric
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088323#4088323
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088323
18 years, 7 months