Hi Guyz,
I am trying to deploy the following test workflow definition in alfresco, since from 2 dayz :(
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="helloWorld">
<start-state name="start">
<transition name="" to="hello"></transition>
</start-state>
<node name="hello">
<transition name="" to="end1">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
logger.log("Hello World!");
</script>
</action>
</transition>
</node>
<end-state name="end1"></end-state>
</process-definition>"
But when im going to deploy the above workflow definition in alfresco community 4.2 through "work-flow.jsp, it gives me following error message.
"org.alfresco.service.cmr.workflow.WorkflowException: 03200027 Workflow Component for engine id 'jbpm' is not registered"
Please Help !
JBPM is disabled by default!
Onine docs: http://docs.alfresco.com/4.1/topic/com.alfresco.enterprise.doc/tasks/adminconsole-workflow.html
Snippet:
set the following properties in your alfresco-global.properties.
system.workflow.engine.jbpm.enabled=true
system.workflow.engine.jbpm.definitions.visible=true
Related
I am trying override base email template(noupdate=1) but, unable to override. Also, search for my issue but didn't get proper solution.
So, anybody can help me for this issue.
my code is like:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- Email template for reset password -->
<delete id="auth_signup.reset_password_email" model="mail.template"/>
<record id="reset_password_email" model="mail.template">
. . .
</record>
<!-- Email template for new users -->
<delete id="auth_signup.set_password_email" model="mail.template"/>
<record id="set_password_email" model="mail.template">
. . .
</record>
</data>
</odoo>
This error comes when create new user:
ValueError: External ID not found in the system: auth_signup.reset_password_email
Thanks in advance
well, you don't need to override the existing email template. you may need a new one. you could also delete the old one
<record id="reset_password_email" model="mail.template">
<field name="name">Auth Signup: Reset Password</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="subject">Password reset</field>
<field name="email_from">"${object.company_id.name | safe}" <${(object.company_id.email or user.email) | safe}></field>
<field name="email_to">${object.email_formatted | safe}</field>
<field name="body_html" type="html">
<p>whatever email template you want & remember you could use OBJECT AS FOLLOWING</p>
<span style="font-size: 20px; font-weight: bold;">
${object.name}
</span>
</field>
<field name="lang">${object.lang}</field>
<field name="auto_delete" eval="True"/>
<field name="user_signature" eval="False"/>
</record>
please note that you custom template id would be names as custom_module.reset_password_email & it will replace auth_signup.reset_password_email.
or you could follow:
Odoo - How to update non updateable records by XML
I've seen a lot of answers on stackoverflow about multipart file upload problem in Spring MVC application.
Step by step I've make sure that I don't repeat errors others did.
Here is my form
<form class="form-horizontal" data-toggle="validator"
id="track_existing_repair"
method="post"
action="/euo/testUpload.htm"
enctype="multipart/form-data">
...
<div class="form-group required">
<label class="control-label col-sm-4" for="proofOfPurchaseInput">Select File:</label>
<div class="col-sm-8">
<input name="proofOfPurchase"
id="proofOfPurchaseInput"
type="file"
required/>
</div>
</div>
...
</form>
In pom file I have dependency
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.2</version>
</dependency>
declared multipartResolver in app-servlet.xml
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- max upload size in bytes -->
<property name="maxUploadSize" value="20971520" /> <!-- 20MB -->
<!-- max size of file in memory (in bytes) -->
<property name="maxInMemorySize" value="1048576" /> <!-- 1MB -->
</bean>
Method mapped to request in Controller class
#RequestMapping(value = {"/testUpload"},headers = "Content-Type=multipart/form-data", method = RequestMethod.POST)
public String testUpload(
#RequestPart(value = "proofOfPurchase", required = false) MultipartFile proofOfPurchaseFile
,HttpServletRequest request
) throws InvalidFormatException, IOException {
if(proofOfPurchaseFile != null){
readFile(proofOfPurchaseFile);
}
return NAV_HOME;
}
I tried #RequestParam instead #RequestPart
Without required = false I have "Required request part
'proofOfPurchase' is not present" response, so I made it not required
only to get in to examine request in debugger
So when I stop in debugger I wasn't surprised that request object shows me that file was received and even stored in jBoss temporary folder.
Could you please point out what I could miss that Spring can't see uploaded file?
The problem appears in legacy project where we also use Struts.
It's turn out that struts dispatcher somehow conflicts with spring CommonsMultipartResolver.
Once I've removed all struts servlets and filters from web.xml everything start working.
I am using a Spring Tag form element in which there are 3 parameters.
<sf:form class="form-horizontal" method="post" name="doCheck" id="checkForm" action="${url}" htmlEscape="true">
<div class="col-sm-12">
<label>Email : <span class="redStar">*</span></label>
<input type="email" name="email" class="form-control user inputIconPos" id="inputEmail3"
placeholder="Email Address"/>
</div>
</div>
//2 more fields
</sf:form>
I am using Spring MVC version 4.1.7 and HDIV version 2.1.11. And the error logged is
21:08:40.386 [http-bio-8100-exec-4] INFO org.hdiv.logs.Logger - INVALID_PARAMETER_NAME;/check_submit.html;email;null;;0:0:0:0:0:0:0:1;0:0:0:0:0:0:0:1;anonymous;
21:08:40.386 [http-bio-8100-exec-4] DEBUG o.hdiv.filter.ValidatorHelperRequest - Validation Error Detected: Parameter [email] does not exist in the state for action [/check_submit.html]
HDIV Config
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hdiv="http://www.hdiv.org/schema/hdiv"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.hdiv.org/schema/hdiv http://www.hdiv.org/schema/hdiv/hdiv.xsd">
<hdiv:config excludedExtensions="css,png,gif,jpg,jpeg,bmp,ico,js" strategy="cipher" randomName="true" errorPage="/error.html" reuseExistingPageInAjaxRequest="true">
<hdiv:sessionExpired loginPage="/login.html" homePage="/home.html"/>
<hdiv:startPages>/adminlogin.html,/home.html</hdiv:startPages>
</hdiv:config>
<hdiv:validation id="safeText">
<hdiv:acceptedPattern><![CDATA[^[a-zA-Z0-9#.\-_]*$]]> </hdiv:acceptedPattern>
</hdiv:validation>
<hdiv:editableValidations registerDefaults="true">
<hdiv:validationRule url=".*" enableDefaults="true">safeText</hdiv:validationRule>
</hdiv:editableValidations>
</beans>
I don't want to exclude these parameters from validation.
I would like to know how can configure HDIV so that these parameters are validated and not skipped.
Many thanks in advance!
You have to use Spring form tag to create form fields:
<form:input path="email" type="email" ... />
Gotzon
You need to add below configuration in your hdiv config to skip validation on the parameter -
<hdiv:paramsWithoutValidation>
<hdiv:mapping url=".*" parameters="email"/>
</hdiv:paramsWithoutValidation>
In url you can give "/check_submit.html" if you want this on this particular page.
I have been trying to validate my alfresco share workflow form for several days without success. This is what i have done.
Configured my workflow in the share-config-custom.xml located in %TOMCAT_HOME%tomcat\shared\classes\alfresco\web-extension
set my contraint handler as follows.
<constraint-handlers>
<constraint type="MANDATORY"
validation-handler="Alfresco.forms.validation.examplestaffnumber"
event="keyup" />
</constraint-handlers>
</field>
This field i have set to mandatory
< label-id="Staff Number" id="leave:staffnumber" mandatory="true">
I have created the contraint hanlder javascript and placed it at %ALFRESCO_HOME%\tomcat\webapps\share\js folder. This is both js and min.js
Finaly added the js in form.get.head.ftl located at %ALFRESCO_HOME%tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form
folder like this
<#script type="text/javascript" src="${page.url.context}/res/js/examplevalidation.js">
When I select my worflow form and key values in the staff number form nothing happens. I have checked in the firebug but there is no any call to the js.
Where could i have gone wrong?
I think you have not added dependencies for your java script. To do that add below code in your share-config-custom.xml located in %ALFRESCO_HOME%tomcat\shared\classes\alfresco\web-extension
<config>
<forms>
<dependencies>
<js src="/js/examplevalidation.js" />
</dependencies>
</forms>
</config>
And your constrains handler should be like
<field id="leave:staffnumber" label-id="Staff Number" mandatory="true">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
<constraint-handlers>
<constraint type="MANDATORY" validation-handler="Alfresco.forms.validation.examplestaffnumber" event="blur"/>
</constraint-handlers>
</field>
And function in your js should be like this:
Alfresco.forms.validation.examplestaffnumber = function examplestaffnumber(
field, args, event, form, silent, message) {
// your code with return statement
}
Hope this helps!!!
I'm creating a voicexml appliacation.
I want to store an user input into a global variable.
I wondered, the input should be stored in the fieldvar. shouldn't it? After I tried it with this, i tried to store it in an global variable:
<assign name="myvar" expr="'myinput'"/>
but somehow it didn't work. I used value expr="var" as expr.
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd"
version="2.0">
<var name="myProdukt" />
<form id="test">
<field name="var">
<prompt bargein="true" bargeintype="hotword" >Sagen Sie ein Produkt</prompt>
<grammar root="main" version="1.0" xml:lang="de-DE">
<rule id="main" scope="public">
<one-of>
<item> p1 </item>
<item> p2 </item>
<item> p3 </item>
<item> p4 </item>
</one-of>
</rule>
</grammar>
<filled>
<assign name="myProdukt" expr="<value expr="var"/>"/>
</filled>
</field>
</form>
<<!--[...] Here i want to use the input.-->
</vxml>
thanks in advance
---------------EDIT:
now i used this:
<filled>
test
<assign name="myProdukt" expr="var" />
</filled>
I only changed that. The Applications says "test" but then there is an error.
It isn'T allowed to use "var" instead I used an other name :-)
Did you try a simple assignment of field var to the variable myProdukt like so ?
<filled>
<assign name="myProdukt" expr="var"/>
</filled>
Which would be fine except that according to Section 5.1, Variables and Expressions of the Voice XML specification:
VoiceXML variables, including form
item variables, must not contain
ECMAScript reserved words.
So, you'll need to rename the field var to something that is not a reserved word in ECMAscript, say productSelection:
<field name="productSelection">
<!-- .. prompt, grammar as before .. -->
<filled>
<assign name="myProdukt" expr="productSelection"/>
</filled>
</field>