本文整理汇总了Java中org.activiti.spring.annotations.ProcessVariable类的典型用法代码示例。如果您正苦于以下问题:Java ProcessVariable类的具体用法?Java ProcessVariable怎么用?Java ProcessVariable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProcessVariable类属于org.activiti.spring.annotations包,在下文中一共展示了ProcessVariable类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processVariablesFromAnnotations
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
/**
* if there any arguments with the {@link org.activiti.engine.annotations.ProcessVariable} annotation,
* then we feed those parameters into the business process
*
* @param invocation the invocation of the method as passed to the {@link org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)} method
* @return returns the map of process variables extracted from the parameters
* @throws Throwable thrown anything goes wrong
*/
protected Map<String, Object> processVariablesFromAnnotations(MethodInvocation invocation) throws Throwable {
Map<ProcessVariable, Object> vars = this.mapOfAnnotationValues(ProcessVariable.class, invocation);
Map<String, Object> varNameToValueMap = new HashMap<String, Object>();
for (ProcessVariable processVariable : vars.keySet()) {
varNameToValueMap.put(processVariable.value(), vars.get(processVariable));
}
return varNameToValueMap;
}
示例2: processVariablesFromAnnotations
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
/**
* if there any arguments with the {@link org.activiti.spring.annotations.ProcessVariable} annotation,
* then we feed those parameters into the business process
*
* @param invocation the invocation of the method as passed to the {@link org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)} method
* @return returns the map of process variables extracted from the parameters
* @throws Throwable thrown anything goes wrong
*/
protected Map<String, Object> processVariablesFromAnnotations(MethodInvocation invocation) throws Throwable {
Map<ProcessVariable, Object> vars = this.mapOfAnnotationValues(ProcessVariable.class, invocation);
Map<String, Object> varNameToValueMap = new HashMap<String, Object>();
for (ProcessVariable processVariable : vars.keySet()) {
varNameToValueMap.put(processVariable.value(), vars.get(processVariable));
}
return varNameToValueMap;
}
示例3: startProcess
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "b")
public void startProcess(@ProcessVariable("customerId") long customerId) {
log.info("starting 'b' with customerId # " + customerId);
this.methodState += 1;
log.info("up'd the method state");
}
示例4: startProcessA
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "waiter", returnProcessInstanceId = true)
public String startProcessA(@ProcessVariable("customerId") long cId) {
return null;
}
示例5: enrollCustomer
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "waiter")
public ProcessInstance enrollCustomer(@BusinessKey String key, @ProcessVariable("customerId") long customerId) {
return null;
}
示例6: startScopedProcess
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "component-waiter")
public void startScopedProcess( @ProcessVariable("customerId") long customerId){
log.info(" start scoped 'component-waiter' process.") ;
}
示例7: startProcess
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "b")
public void startProcess(@ProcessVariable("customerId") long customerId) {
log.info("starting 'b' with customerId # {}", customerId);
this.methodState += 1;
log.info("up'd the method state");
}
示例8: startScopedProcess
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "component-waiter")
public void startScopedProcess( @ProcessVariable("customerId") long customerId){
log.info("start scoped 'component-waiter' process.") ;
}
示例9: startFulfillment
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@StartProcess(processKey = "crm-order-fulfillment", returnProcessInstanceId = true)
public String startFulfillment(@ProcessVariable("customerId") long customerId) {
cart.amountDue = cart.amountDue + 10;
System.out.println("start scoped 'waiter' process with customerId = " + customerId);
return null;
}
示例10: customerOrderReview
import org.activiti.spring.annotations.ProcessVariable; //导入依赖的package包/类
@State("customer-order-review")
public void customerOrderReview(@ProcessVariable("customerId") long customerId, DelegateExecution delegateExecution) {
System.out.println(this.cart.toString());
System.out.println("the current customerId is " + customerId + ".");
// System.out.println( delegateExecution);
}