SDK配置示例

private static final String LOGINID = "xu_tao";
	private static final String USERORGID = "199";
	private static final String TEAMCODE = "NJDTOA";
	private static final String SECRETKEY = "NJDTOA";
	private static final boolean NEEDAUTHORIZATION = true;
	private static final String AUTHORIZATIONNAME = "WFUser";
	private static final String AUTHORIZATIONKEY = "jtusnpj8yp";
	private static final String URL ="http://127.0.0.1:8080/api/engine";
	
	public void saveOrUpdateWorkflow(){

		WorkflowEngineClient client = new WorkflowEngineClient();
		client.setLoginId(LOGINID);
		client.setSecretKey(SECRETKEY);
		client.setTeamCode(TEAMCODE);
		client.setUrl(URL);
		client.setNeedauthorization(NEEDAUTHORIZATION);
		client.setAuthorizationName(AUTHORIZATIONNAME);
		client.setAuthorizationKey(AUTHORIZATIONKEY);
		client.setUserOrgId(USERORGID);
		
		String appCode = "week_detail";//testRefinitionByAppCode
		WorkflowRequest workflowRequest = this.buildWorkflowRequest();
		workflowRequest.setAppCode(appCode);
		workflowRequest.setProcName("测试流程");
		
		Map<String, Object> formData = this.buildFormDataJsons();
		
		Long startDate = System.currentTimeMillis();
		
		//新增
		ResultEntity<WorkflowRequest> resultEntity = client.saveOrUpdateWorkflow(workflowRequest,formData);
		Long endDate = System.currentTimeMillis();
		
		System.out.println(endDate - startDate);
		String result = JSONObject.fromObject(resultEntity,getJsonConfig()).toString();
	}