當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcessVariable類代碼示例

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

}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:20,代碼來源:ProcessStartingMethodInterceptor.java

示例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;

}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:20,代碼來源:ProcessStartingMethodInterceptor.java

示例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");
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:7,代碼來源:ProcessInitiatingPojo.java

示例4: startProcessA

import org.activiti.spring.annotations.ProcessVariable; //導入依賴的package包/類
@StartProcess(processKey = "waiter", returnProcessInstanceId = true)
public String startProcessA(@ProcessVariable("customerId") long cId) {
	return null;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:5,代碼來源:ProcessInitiatingPojo.java

示例5: enrollCustomer

import org.activiti.spring.annotations.ProcessVariable; //導入依賴的package包/類
@StartProcess(processKey = "waiter")
public ProcessInstance enrollCustomer(@BusinessKey String key, @ProcessVariable("customerId") long customerId) {
	return null;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:5,代碼來源:ProcessInitiatingPojo.java

示例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.") ;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:5,代碼來源:ProcessInitiatingPojo.java

示例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");
}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:7,代碼來源:ProcessInitiatingPojo.java

示例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.") ;
}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:5,代碼來源:ProcessInitiatingPojo.java

示例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;
}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:7,代碼來源:Main.java

示例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);
}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:7,代碼來源:Main.java


注:本文中的org.activiti.spring.annotations.ProcessVariable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。