11-05-2012 01:28 AM
07:20:48,812 SCHWERWIEGEND [org.activiti.engine.impl.interceptor.CommandContext] (http–0.0.0.0-8090-3) Error while closing command context: org.activiti.engine.ActivitiException: Incompatible type set on field declaration 'mailTemplateID' for class taskDelegations.MyMailTaskDelegation. Declared value has type org.activiti.engine.impl.el.FixedValue, while expecting java.lang.String
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.applyFieldDeclaration(ClassDelegate.java:192) [activiti-engine-5.10.jar:5.10]
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.instantiateDelegate(ClassDelegate.java:165) [activiti-engine-5.10.jar:5.10]
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.getActivityBehaviorInstance(ClassDelegate.java:135) [activiti-engine-5.10.jar:5.10]
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:112) [activiti-engine-5.10.jar:5.10]
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44) [activiti-engine-5.10.jar:5.10]
…
11-05-2012 06:03 AM
public class ReverseStringsFieldInjected implements JavaDelegate {
private Expression text1;
private Expression text2;
public void execute(DelegateExecution execution) {
String value1 = (String) text1.getValue(execution);
execution.setVariable("var1", new StringBuffer(value1).reverse().toString());
String value2 = (String) text2.getValue(execution);
execution.setVariable("var2", new StringBuffer(value2).reverse().toString());
}
}
12-11-2012 06:57 AM
public class MyMailTaskDelegation implements org.activiti.engine.delegate.JavaDelegate {
private Expression mailTemplateId;
private Expression internalUserId;
private Expression externalAdress;
private Expression externalName;
@Override
public void execute(DelegateExecution execution) throws Exception {
@Runtime(delegationClass = MyMailTask.DELEGATION)
public class MyMailTask extends AbstractCustomServiceTask {
/*
…
static strings here
…
*/
@Property(type = PropertyType.TEXT, displayName = MyMailTask.FIELD_NAME_TEMPLATE_ID, required = true)
@Help(displayHelpShort = MyMailTask.FIELD_HELP_TEMPLATE_ID)
private String mailTemplateId;
@Property(type = PropertyType.TEXT, displayName = MyMailTask.FIELD_NAME_INTERNAL)
@Help(displayHelpShort = MyMailTask.FIELD_HELP_INTERNAL)
private String internalUserId;
@Property(type = PropertyType.TEXT, displayName = MyMailTask.FIELD_NAME_EXTERNAL_MAIL)
@Help(displayHelpShort = MyMailTask.FIELD_HELP_EXTERNAL_MAIL)
private String externalAdress;
@Property(type = PropertyType.TEXT, displayName = MyMailTask.FIELD_NAME_EXTERNAL_NAME)
@Help(displayHelpShort = MyMailTask.FIELD_HELP_EXTERNAL_NAME)
private String externalName;
<serviceTask id="servicetask3" name="MyMailTask" activiti:class="my.namespace.taskDelegations.MyMailTaskDelegation">
<extensionElements>
<activiti:field name="mailTemplateId">
<activiti:string>LostPassword</activiti:string>
</activiti:field>
<activiti:field name="internalUserId">
<activiti:string>${requestingUserId}</activiti:string>
</activiti:field>
</extensionElements>
</serviceTask>
<serviceTask id="servicetask3" name="MyMailTask" activiti:class="my.namespace.taskDelegations.MyMailTaskDelegation">
<extensionElements>
<activiti:field name="mailTemplateId">
<activiti:string>LostPassword</activiti:string>
</activiti:field>
<activiti:field name="internalUserId">
<activiti:expression>${requestingUserId}</activiti:expression>
</activiti:field>
</extensionElements>
</serviceTask>
02-04-2013 04:46 AM
02-04-2013 04:55 AM
02-04-2013 07:54 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.