flowable6.4.1实现REST任务

根据官网报错:html

org.flowable.common.engine.api.FlowableException: Could not find org.flowable.http.HttpActivityBehavior: 
	at org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory.createHttpActivityBehavior
Caused by: java.lang.ClassNotFoundException: org.flowable.http.bpmn.impl.HttpActivityBehaviorImpl
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

解决:java

调用REST报错:github

org.flowable.common.engine.api.FlowableException: Unknown property used in expression: ${requestTimeout}
	at org.flowable.common.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
Caused by: org.flowable.common.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'requestTimeout'
	at org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstIdentifier.eval(AstIdentifier.java:97)

解决:web

  • requestTimeout需做为入参传入。
Caused by: org.apache.http.impl.execchain.RequestAbortedException: Request aborted
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:180)

解决:spring

  • requestTimeout设置了1,1毫秒过短,requestTimeout改成1000.

http://flowable.org改成http://localhost:8830/cbss报错:express

org.springframework.web.HttpMediaTypeNotAcceptableException: Could not parse 'Accept' header [text/html Cache-Control:  no-cache]: Invalid mime type "text/html Cache-Control:  no-cache": Invalid token character ' ' in token "html Cache-Control:  no-cache"
	at org.springframework.web.accept.HeaderContentNegotiationStrategy.resolveMediaTypes(HeaderContentNegotiationStrategy.java:59)
  • Accept: text/html Cache-Control: no-cache
  • Accept: application/json Cache-Control: no-cache text/html改application/json仍是错
org.springframework.web.HttpMediaTypeNotAcceptableException: Could not parse 'Accept' header [application/json Cache-Control:  no-cache]: 
Invalid mime type "application/json Cache-Control:  no-cache": Invalid token character ' ' in token "json Cache-Control:  no-cache"

解决:apache

  • Cache-Control: no-cache删掉。
相关文章
相关标签/搜索