I'm new to Alfresco/Activiti.
Our company is using Skelta BPM.NET (in integration with our self developed RMS) and now we would like to take a look into other BPM software.
I last days I found our how to create new workflow using Eclipse and Import them into standalone installation of Activiti.
Now I would like to publish this workflow into Alfresco share. Is there any easy way to do that? I was searching whole day on Google but didn't find anything useful.
And another question about installation:
Is it possible to install Activiti with all it's webapps on the same tomcat, that alfresco is running on? That Apache Ant can build only standalone installation. So can this two application be merged?
Thanks for your info, Anze
If you place your BPMN 2.0 process definition XML somewhere in the Alfresco classpath, you can use Alfresco's workflow console to deploy the definition.
For example, I always place my workflows under WEB-INF/classes/alfresco/extension/workflows/someFolder where someFolder is a unique folder for each process definition I am using.
The workflow console is in http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp. Assuming you are using 3.4.e, which is a preview release showing Activiti integration, you can deploy a process through the workflow console with this command:
deploy activiti /alfresco/extension/workflows/activiti/activitiHelloWorld.activiti
You can see other helpful workflow console commands by typing help.
Alternatively, as Gagravarr suggests, you can use Spring to deploy your workflow when Alfresco starts up. The Spring config file must have a name ending with "-context.xml". I usually place mine in WEB-INF/classes/alfresco/extension.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="someco.workflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/workflows/activiti/activitiHelloWorld.bpmn20.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">false</prop>
</props>
</list>
</property>
<property name="models">
<list>
<value>alfresco/extension/model/scWorkflowModel.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco.extension.messages.scWorkflow</value>
</list>
</property>
</bean>
</beans>
If you'd like working examples of some simple workflows, with the same workflows implemented for both jBPM and Activiti for easy comparison, take a look at this blog post: http://ecmarchitect.com/archives/2011/04/27/1357
Jeff
For the second part of your question:
If you want to use Alfresco with Activiti, then you should try the 3.4.e release (or a recently nightly build). 3.4.e has Activiti build in, so you don't need to do any merging of webapps. It's all already there for you.
For the first part, as long as you're using 3.4.e (or a later nightly build), then you ought to be able to deploy to Activiti in much the same way that you would previously deploy to JBMP. The Workflow With Activiti wiki page ought to help you with this too, as might this wiki too.
Related
Need help, or give a link, or give a hint on this deployment,
Ignite Jar deployment case,
Say I have a jar package with the main-class defined, and put it into the ./libs folder, what will the ignite do, ignite how to launch this Jar? Which is the endpoint for Ignite launch this Jar?
Any specification for the Jar to the ./libs, btw , is there a full example of the userversion xml of ignite.xml, if put below content into the ignite.xml, ignite shows cannot recognize the userVersion tag,
<!-- User version. -->
<bean id="userVersion" class="java.lang.String">
<constructor-arg value="0"/>
</bean>
my problem is don't know what ignite launch this Jar, I expect ignite can help launch the Jar main-class, and monitoring the cache put event, and it will fire the compute/tasks. And which is a loop forever.
Thanks a lot.
Ignite is not going to launch main-classes from JARs that you put to libs/. However, your code can be used from Apache Ignite APIs and elsewhere after you do that.
I am using Eclipse's Ant view to run my build files. I have to run a couple of files in a specific order and I wonder whether there is any possibility to automate this (I'm sure there is...). However, they need to run subsequently, i.e. script two may not start until script one finished successfully. Most of my Ant scripts trigger Maven commands.
Is there any Eclipse plugin or feature that can assist me in running my Ant files automatically? Maybe even shutdown and restart my Java EE server before and after building?
I'd like to double-click just once and have my toolchain work, while I... get myself another cup of coffee.
I can think of two options:
Write a wrapper Ant script/target that calls the others in the desired order. It's been a number of years since I wrote any Ant but I remember doing that, probably using the <ant> task. It might make sense to simply define a target that has dependencies/prerequisites in the right sequence (in conjunction with the <import> task to pull in the separate buildfiles). Here is a discussion about the difference between these two approaches.
Use Eclipse's External Tool feature to invoke a batch/shell script that calls each Ant target.
This is what I finally came up with:
<project default="all" basedir=".." name="Build all projects">
<property name="folder.project.a" value="MyProjectA" />
<property name="folder.project.b" value="MyOtherProjectB" />
<!-- Target to build all projects -->
<target name="all" depends="projectA, projectB" />
<target name="projectA">
<echo>Building project A.</echo>
<ant antfile="${folder.project.a}/my_build_file.xml" />
</target>
<target name="projectB">
<echo>Building project B.</echo>
<ant antfile="${folder.project.b}/my_other_build_file.xml" />
</target>
</project>
in the internet I often find recent but contrary information on this topic..., thus I would like to ask a question on minimum requirements.
My goal is to do a very simple integration test of simple EJB 3.1 application:
Simple JPA 2.0 functionality with EclipseLink
Arquillian with JUnit for testing
Maven
Derby DB (in memory or file in ./target), JTA persistence context.
Embedded Glassfish in Arquillian
So I just want to do a simple JPA test. I get my Glassfish running in Arquillian, but when doing my JPA stuff, my app always fails to handle the Derby DB (tells me there are no tables etc.), but DDL files look sane.
I played around with providing schema name, user etc. in my persistence.xml, but nothing helps. Sometimes a come accross posts telling me about making changes in a minimal domain.xml for the embedded Glassfish to match my persistence.xml or to adapt the arquillian.xml.
My question is: for this minimal approach - do I really require that src/test/glassfish/domains/domain1/domain.xml or arquillian.xml?
I am quite sure that some time ago I managed to do so with Embedded Glassfish but using Hibernate 4 as JPA provider. I have no access to the project anylonger and thus cannot tell the difference except that I definetely did not add a domain.xml etc.
Posts like (other question here) really do confuse me.
Important is that I am not using a managed server, but an embedded one.
Thanks and cheers,
Timo
Here is one of my versions, please see my following comment.
<persistence-unit name="localiser-core" transaction-type="JTA">
<jta-data-source>jdbc/__default</jta-data-source>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="javax.persistence.jdbc.url"
value="jdbc:derby:memory:test;create=true" />
<property name="javax.persistence.jdbc.user" value="" />
<property name="javax.persistence.jdbc.password" value="" />
<property name="eclipselink.target-database" value="Derby"/>
<property name="eclipselink.ddl-generation.output-mode"
value="database" />
<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.application-location" value="target" />
<property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql"/>
<property name="eclipselink.drop-ddl-jdbc-file-name" value="drop.sql"/>
<property name="eclipselink.debug" value="ALL"/>
<property name="eclipselink.weaving" value="static"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.logging.level.sql" value="FINEST"/>
<property name="eclipselink.logging.level.cache" value="FINEST"/>
</properties>
</persistence-unit>
Since your connection URL is: jdbc:derby:memory:test;create=true, what you have told Derby is: connect to a database in the folder 'test', relative to the current working directory of wherever Derby is started, and if that database 'test' is not present in the current working directory, create it from scratch.
So one possibility is that your application has a different current working directory each time, or perhaps that something else in your application is clearing out your current working directory each time you run the application.
Thus Derby doesn't find the previous database in that location, and so it creates a fresh new one.
One way around this is to specify a more explicit location for your database, by using a connection URL such as: jdbc:derby:memory:/users/timo/testdb
Then create the database once, up front, and subsequent to that your application will find the database in the specified location and use it.
I am using alfresco 3.0 .. I followed the link below to install jbpm and start creating jbpm workflow ..
http://wiki.alfresco.com/wiki/WorkflowAdministration
In the link It says there are 2 ways of deploying .. first one through designer deploy tab and the other is manually..
I could make it work trough deploy tab.
can anyone tell how can deploy manually .. as the info in the link is insufficient..
I want to know how does it work.. like where i need to place the deployer bean .. ect
Thanks
There are two links that tell you where to put things:
first and foremost, Packaging And Deploying Extensions describe how and where to create your custom Spring configuration files, among other things
then Workflow Administration describe workflow specific configuration tasks
An old but mostly still valid article from Jeff Potts might also come in handy for you.
The first way about I know is to write bean in context file (it will be deployed while alfresco starts)- can looks like that (in \tomcat\shared\classes\alfresco\extension)
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- custom Workflow bean -->
<bean id="WorkflowID" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/nameOfTheFile.bpmn</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
</list>
</property>
</bean>
<!-- custom model BEAN -->
<bean id="SomeID2.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/Somename-model.xml</value>
</list>
</property>
</bean>
</beans>
And the second way how to deploy is workflow console
URLs, eg.:
Alf 4.2.f /alfresco/faces/jsp/admin/workflow-console.jsp
Alf 5.0.d /alfresco/s/admin/admin-workflowconsole
(write help for the help)
For deploy:
activiti - eg. deploy activiti alfresco/extension/wfFileName.bpmn
jbpm - eg. deploy jbpm alfresco/extension/wfFileName.bpmn
gl
EDIT:
That's for activiti, not sure if it could be the same :)
Btw there should be also way how to deploy through "data dictionary" :)
I'm tring to extend the example in chapter 5 of the Spring WS guide. I'm using Spring WS 1.5.9 .
I've added ...
<import namespace="http://myco.com/schemas/promotion/v1_2"
schemaLocation="http://localhost:8080/ordersService/Promotion_1_2.xsd" /> ...
But spring doesn't appear to be transforming the location of the import like it does for the port. So on my company website it still shows "localhost:8080"
I have the WSDL generation defined as such
<bean id="orders" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schema" ref="schema" />
<property name="portTypeName" value="Orders" />
<property name="locationUri" value="http://localhost:8080/ordersService/" />
Does/Can Spring Framework transform the imports some way ???
UPDATE: Some more background....
We use the same XSD with the maven JaxB2 plugin to build our response schema objects. That all works great, and we use the Catalog resolver to actually find the addional business domain XSDs in an included JAR file. We have 100's of XSDs that describe our business domain.
SO i'm trying not to break that.
What I would like to see is a more detailed example. An example where JaxB2 is used and XSD -> WSDL functionality.
Should I refactor the XSDs ?
Should I use a WSDL and not an XSD
How do I properly idenitfy the XSDs to spring ?
Do I use "classpath:My_file.xsd" ? Will I have to list possibly 100's of XSDs to schemaCollection ?
The spring Docs are great but I would like a practical example that matches.
I want to add detail on the solution we ended up with. We have been moving to Spring WS 2x. Here's an updated link...
http://static.springsource.org/spring-ws/site/reference/html/server.html#server-automatic-wsdl-exposure
The trick / key was in that section it says... "If you want to use multiple schemas, either by includes or imports, you will want to put Commons XMLSchema"
So that was the final answer to add that to our project.
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.4.7</version>
</dependency>
Now spring enables additional functionality to allow classpath resolution to work.
Spring-WS can automagically inline all schema elements directly into the WSDL, so that they appear as a single document. This avoids the problem of inaccessible <import> URLs.
See the section of the Spring WS manual which talks about CommonsXsdSchemaCollection.