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刪掉。
相關文章
相關標籤/搜索