ChangeVariableType.java 538 字节
Newer Older
1
package org.activiti5.examples.variables;
2

3 4
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
5 6 7

public class ChangeVariableType implements JavaDelegate {

8
	public void execute(DelegateExecution execution) {
9 10 11 12 13 14 15 16
		// Initially set to null, stored as NullType
		execution.setVariable("myVar", null);
		
		// Now set to something stored as SerializableType. This could happen much later on than this.
		execution.setVariable("myVar", new SomeSerializable("someValue"));
	}

}