本文整理匯總了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);
}