07-05-2012 09:37 AM
07-05-2012 09:45 AM
07-05-2012 10:08 AM
07-05-2012 10:09 AM
07-05-2012 10:25 AM
07-05-2012 10:42 AM
07-05-2012 12:57 PM
07-06-2012 02:20 AM
if (modelValue != null) {
if (variableName != null) {
execution.setVariable(variableName, modelValue);
} else if (variableExpression != null) {
variableExpression.setValue(modelValue, execution);
} else {
execution.setVariable(id, modelValue);
}
}
07-06-2012 04:18 AM
<userTask id="usertask1" name="Describe the accident" activiti:assignee="kermit">
<extensionElements>
<activiti:taskListener event="create" class="mhcc.app.incidentservice.app.internal.Listener" />
</extensionElements>
</userTask>
package mhcc.app.incidentservice.app.internal;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
/**
* Listener for Task
*/
public class Listener implements TaskListener {
/**
* @see org.activiti.engine.delegate.TaskListener#notify(org.activiti.engine.delegate.DelegateTask)
*/
@Override
public void notify( DelegateTask delegateTask ) {
delegateTask.setVariable( "Vehicle", "Funkerss" );
}
}
07-06-2012 05:16 AM
Ronald, you can. However, this only works when the form-property is read-only. If that's not the case, when submitting the values, the expression will be used to "set" (which will fail).
if (modelValue != null) {
if (variableName != null) {
execution.setVariable(variableName, modelValue);
} else if (variableExpression != null) {
variableExpression.setValue(modelValue, execution);
} else {
execution.setVariable(id, modelValue);
}
}
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.