Alfresco activiti workflow deploy - workflow

I have a bit of a problem.
I have created a workflow with the Activiti plugin in Eclipse.
I have a model, context file and the bpmn20.xml file.
Everything is deployed in shared/alfresco/extension but:
If I deploy the workflow deleting the entire following tag in the bpmn20.xml file
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiCustomWorkflow">
(so basically without the workflow diagram), everything works fine but I can't see the workflow diagram in the Workflow details page in Alfresco Share .
If I leave that tag (so what Eclipse created in the beginning with the Activiti project),
Alfresco is not starting. (Connection rejected in browser)
Log is not telling me nothing, and Tomcat cannot be stopped normally (I have to delete the catalina.pid and the tomcat temp folder manually).
My bpmn20.xml file header is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://activiti.org/bpmn20">
Am I missing something? Or maybe Eclipse doesn't create the correct bpmn file?
Ah, Alfresco 4.0.d and Ubuntu server 10.04 LTS x64
I am using Activiti engine, and the jBPM engine is turned off.
Thanks in advance.

You might need to turn up the logging in webapps/alfresco/WEB-INF/classes/log4j.properties.
log4j.logger.org.alfresco.repo.workflow=debug
I've also got that set in webapps/share/WEB-INF/classes/log4j.properties

my Eclipse (activity designer) generates header like this
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="Onlio">
<process id="OnlioWFAdhocMultiNonEsc" name="WF name/description" isExecutable="true">
But I've had also a problem with that, so I'm using this (and this works for me :) ), so you can try it ..
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://alfresco.org">
<process id="WFID" name="WF name/description" isExecutable="true">
(there's different in targetNameSpace only)
So, good luck :)
Btw for deploy you will need a context file or workflow console :) (there should be also way how to deploy through data dictionary- I'm not sure how :) )
OT btw2 - for logging I'm setting these 2 params:
(in ..\tomcat\webapps\alfresco\WEB-INF\classes\log4j.properties)
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

Related

spring integration file splitter does not appear on the integration-graph

I have an issue similar to this problem with items missing from the integration graph. In my case I am using Spring Tool Suite (STS) (Version: 3.9.4, Build Id: 201804120850, Platform: Eclipse Oxygen.1a (4.7.1a) with Spring Integration 4.3.15.
I am using a file splitter. It is working correctly, but does not appear on the integration graph.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-file="http://www.springframework.org/schema/integration/file"
xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-4.3.xsd
http://www.springframework.org/schema/tool classpath:org/springframework/beans/factory/xml/spring-tool-4.3.xsd
http://www.springframework.org/schema/context classpath:org/springframework/context/config/spring-context-4.3.xsd
http://www.springframework.org/schema/integration classpath:org/springframework/integration/config/spring-integration-4.3.xsd
http://www.springframework.org/schema/integration/stream classpath:org/springframework/integration/stream/config/spring-integration-stream-4.3.xsd
http://www.springframework.org/schema/integration/file classpath:org/springframework/integration/file/config/spring-integration-file-4.3.xsd
http://www.springframework.org/schema/integration/xml classpath:org/springframework/integration/xml/config/spring-integration-xml-4.3.xsd
http://www.springframework.org/schema/integration/mail classpath:org/springframework/integration/mail/config/spring-integration-mail-4.3.xsd">
<int-file:splitter id="15bfileSplitter"
input-channel="PVDR15bChannel"
output-channel="PVDR15bLineChannel" />
This is a bug. Feel free to raise it here: https://github.com/spring-projects/spring-ide/issues

JCR Node imported as nt:file when using content-package-maven-plugin

I created an OSGI config JCR node in XML within my Adobe CQ project under /apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
org.apache.sling.commons.log.level="Trace"
org.apache.sling.commons.log.file="logs/myproject.log"
org.apache.sling.commons.log.file.number="5"
org.apache.sling.commons.log.file.size="5MB"
org.apache.sling.commons.log.pattern="\{0,date,HH:mm:ss.SSS} *{4}* {3} {5}"
org.apache.sling.commons.log.names="[com.mycompany.myproject]" />
Problem is that when it gets imported into the JCR, it is showing up as an nt:file instead of what it should be according to its jcr:primaryType so that it look like this in CRXDE
when it should look like this
So my XML markup starts EXACTLY as follows:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
...
What I had done originally was to create a new xml file and put in my config. There are 2 other ways I know to create nodes
By doing it in CRXDE and then using vault to export
By doing it in Eclipse using the AEM developer tools (Eclipse plugin for Apache Sling)
In the case of a vault export, the XML starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" ...
and in the case of the plugin, it starts like this
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root
xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
...
but wait, you can't see it here, the plugin actually adds a friggin blank space right after jcr:root.
So whatever XML parser is acting on these XML files to create nodes in the JRC, it behaves oddly if there is no space right after the root node name. I'm on Windows, using Maven 3.2.3, using version 0.0.20 of content-package-maven-plugin, and AEM 5.6.1.
Please check your filter definition of the content-package-maven-plugin. If your filter root is set to
<filter>
<root>
/apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT.xml
</root>
</filter>
instead of
<filter>
<root>
/apps/myproject/config/org.apache.sling.commons.log.LogManager.factory.config-MYPROJECT
</root>
</filter>
then it will likely just put the file into your repository instead of creating the configuration node.
The latter one without .xml file extension is correct.
You need to add jcr:mixinTypes="[]" type as a property to your logger. So Your configuration will be like :
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:mixinTypes="[]"
jcr:primaryType="sling:OsgiConfig"
org.apache.sling.commons.log.level="Trace"
org.apache.sling.commons.log.file="logs/myproject.log"
org.apache.sling.commons.log.file.number="5"
org.apache.sling.commons.log.file.size="5MB"
org.apache.sling.commons.log.pattern="\{0,date,HH:mm:ss.SSS} *{4}* {3} {5}"
org.apache.sling.commons.log.names="[com.mycompany.myproject]" />
Hope this will help.

cvc-complex-type.3.2.2: Attribute 'jaxb:extensionBindingPrefixes' is not allowed to appear in element 'jaxb:bindings'

I've checkoud one project... and trying solve some problems in Eclipse Luna 4.4.0. In one of the maven project I have following xjb file:
<?xml version="1.0" encoding="UTF-8"?>
<jaxb:bindings
version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
jaxb:extensionBindingPrefixes="xjc"
xmlns:xjc= "http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xsi:schemaLocation="
http://java.sun.com/xml/ns/jaxb
http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
">
...
...
but Eclipse reporting me Problem >
cvc-complex-type.3.2.2: Attribute 'jaxb:extensionBindingPrefixes' is not allowed to appear in element 'jaxb:bindings'
does anybody know why?
The bindingschema_2_0.xsd seems to be inadequate. It declares the extensionBindingPrefixes attribute, but does not to use it in the global bindings element.
The use of jaxb:extensionBindingPrefixes attribute in the code you posted looks correct to me.
Me personaly, I have never used used xsi:location in binding files. You can safely remove it.

Problems with eclipse and maven war plugin overlay

I have a project where I am replacing out the web.xml and other files using a war overlay in maven. Everything works great and then I try to import into eclipse and have all kinds of problems.
To start with I use mvn eclipse:eclipse to generate my Eclipse files. This works but the imported project does not contain the Dynamic Web facet.
Once the Dynamic Web facet (version 2.5) is added, the project still recognizes the deployment descriptor as 2.4 and gives me errors anyway even though it is;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
Has anyone struggled through this type of thing before?

Liferay - Eclipse alloy tag library error

I am developing a portlet that runs on Liferay portal (I have currently Liferay+Tomcat7 bundle, it will later run on JBoss). I am using Eclipse Helios with Liferay IDE and Liferay SDK.
In my .jsp files, I use Alloy:
<%# taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
Everything works fine - the portlet gets successfully deployed and is shown correctly.
The only problem is, that Eclipse is marking it as an error:
Description Resource Path Location Type
Can not find the tag library descriptor for "http://liferay.com/tld/aui" edit.jsp /PortletVisual-portlet/docroot line 2 JSP Problem
This is mainly a cosmetic error. Liferay IDE in Eclipse evidently doesnt understand these dependencies, although the project itself works fine. I can live with this "error marker", it doesnt bother me that much. I was just curious if there is a way to fix it.
Thanks for any tips!
EDIT: this is my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>PortletVisual-portlet</display-name>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
<taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
<taglib-location>/WEB-INF/tld/aui.tld
</taglib-location>
</taglib>
</jsp-config>
</web-app>
Try this one:
<taglib>
<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
<taglib-location>/WEB-INF/tld/liferay-aui.tld</taglib-location>
</taglib>
If not working try here
Hope I helped! Good luck!!!!