IBZWFFeignClient.java.ftl 2.4 KB
Newer Older
zhouweidong's avatar
zhouweidong committed
1 2 3
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
zhouweidong's avatar
zhouweidong committed
4 5 6 7 8 9 10 11 12
<#assign isDynaSys =false>
<#if sys.getAllPSSystemModules()??>
	<#list sys.getAllPSSystemModules() as module>
		<#if module.getDynaInstMode()?? && (module.getDynaInstMode()?c=='1' || module.getDynaInstMode()?c=='2'  )>
			<#assign isDynaSys =true>
			<#break>
		</#if>
	</#list>
</#if>
zhouweidong's avatar
zhouweidong committed
13 14 15 16
package ${pub.getPKGCodeName()}.util.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
17
import com.alibaba.fastjson.JSONObject;
zhouweidong's avatar
zhouweidong committed
18
import java.util.*;
zhouweidong's avatar
zhouweidong committed
19

20
@FeignClient(value = "${r'${ibiz.ref.service.wf:ibzwf-api}'}",contextId = "wf",fallback = IBZWFFallback.class)
zhouweidong's avatar
zhouweidong committed
21 22 23 24 25 26 27 28 29 30
public interface IBZWFFeignClient
{
	@RequestMapping(method = RequestMethod.GET, value = "/{system}-app-{appname}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks")
	List<String> getbusinesskeys(@PathVariable("system") String system, @PathVariable("appname") String appname,
														@PathVariable("entity") String entity, @PathVariable("processDefinitionKey") String processDefinitionKey, @PathVariable("taskDefinitionKey") String taskDefinitionKey);


	@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks")
	List<String> getbusinesskeysByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId,
																@PathVariable("entity") String entity,@PathVariable("processDefinitionKey") String processDefinitionKey,@PathVariable("taskDefinitionKey") String taskDefinitionKey);
zhouweidong's avatar
zhouweidong committed
31 32 33

	@RequestMapping(method = RequestMethod.POST, value = "/deploybpmn")
	Boolean deployBpmnFile(@RequestBody List<Map<String,Object>> bpmnfiles);
34 35 36 37 38

	@RequestMapping(method = RequestMethod.POST, value = "/{system}-app-{appname}/{entity}/{businessKey}/process-instances")
	JSONObject wfstart(@PathVariable("system") String system, @PathVariable("appname") String appname,
					   @PathVariable("entity") String entity,
					   @PathVariable("businessKey") String businessKey, @RequestBody JSONObject instance);
zhouweidong's avatar
zhouweidong committed
39
	<#if isDynaSys>
zhouweidong's avatar
zhouweidong committed
40
	@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{dynainstid}/{entity}/tasks")
zhouweidong's avatar
zhouweidong committed
41 42 43
	Map<String,Map<String,Object>> getDynaBusinesskeysByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId,
										 @PathVariable("entity") String entity,@PathVariable("dynainstid") String dynainstid);
	</#if>
zhouweidong's avatar
zhouweidong committed
44
}